/* ==========================================================================================================
   Akkidly · app.css · the FOUNDATION (redesign 2026-11-21, direction B "Soft modern app")
   Source of truth for the look: akkidly-mockups/b-soft-app (SYSTEM.md, tokens.css, the five mockups).
   Hand-off for the page builders: .sdd/akkidly-redesign/FOUNDATION.md.

   This file holds ONLY what every page shares: tokens, base, type, the shells, the shared components.
   Page-specific rules live in seller.css (seller + logged-out pages), admin.css (admin) and store.css (the
   buyer store). Linked as /static/app.css?v=<hash> (+ the page sheet), the store as /_store/static/…

   Rules of the codebase this file lives within:
   - Both directions: <html dir="rtl"> (Arabic) and dir="ltr" (English). Logical properties ONLY: never
     the words left / right, no one-sided border-radius shorthand, no asymmetric 4-value margin/padding
     (test/i18n/layout_scan.test.js scans every stylesheet).
   - CSP: no inline style anywhere; icons are inline <svg> (src/web/icons.js icon()) or the --i-* mask
     data URIs below. The buyer store's CSP has NO data: images, so every data-URI rule here is scoped
     with :where(.shell) (the seller / admin / logged-out wrapper) and never reaches the store.
   - Focus is always visible (2 px emerald ring); motion is a help only (prefers-reduced-motion).

   Contents
     1. Tokens (+ the legacy names kept as aliases)
     2. Icons (--i-* masks, generated from src/web/icons.js cssIconVars())
     3. Reset and base
     4. Typography
     5. Utilities (sr, num, ltr, muted, hidden, mob-only / desk-only)
     6. Icon helpers (.ic inline svg, .mi mask)
     7. Brand
     8. Buttons
     9. Cards, sections, folds
    10. Forms (inputs, selects, textareas, labels, hints, errors, groups, search, checks, switch)
    11. Segmented control
    12. Chips: filter chips, option chips
    13. Status pills (.chip-<status>, .st-*)
    14. Notices and flash
    15. Dialog
    16. Tables, definition lists, history, quotes, tags
    17. Empty state
    18. Stepper, price, badge, icon button, avatar
    19. Toast, sheet, scrim
    20. Shell: wrapper, content width
    21. Shell: app bar (brand row, store chip, language, title, crumb)
    22. Shell: seller tab bar + «المزيد» bottom sheet (phone, < 1024 px)
    23. Shell: rail (desktop, >= 1024 px), seller + admin
    24. Shell: admin nav on a phone
    25. Shell: action bar (sub-pages)
    26. Shell: logged-out pages
    27. Direction (RTL / LTR)
    28. Reduced motion
   ========================================================================================================== */

/* 1. Tokens ------------------------------------------------------------------------------------------------ */
:root {
  /* Type: Readex Pro for Arabic and Latin. Scale 12 / 14 / 16 / 18 / 22 / 28 / 36. */
  --font: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-22: 1.375rem;
  --fs-28: 1.75rem;
  --fs-36: 2.25rem;
  --lh-tight: 1.3;
  --lh-body: 1.65;

  /* Space: a 4 px base. */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Neutrals. */
  --bg: #F5F3EE;
  --bg-sunk: #EDEAE3;
  --surface: #FFFFFF;
  --ink: #0D1B2A;
  --ink-2: #545F6D;
  --ink-3: #8C939D;  /* 3.1:1 on white: icons, borders, disabled ONLY; never informative text (use --ink-2). */
  --line: #E8E4DB;
  --line-2: #D8D2C6;

  /* Accent: emerald to teal. The gradient is for primary buttons, the brand mark and «طلب جديد» only;
     --brand-300 is for use on navy only. */
  --brand-800: #064F43;
  --brand-700: #076553;
  --brand-600: #0A7F62;
  --brand-500: #109A78;
  --brand-300: #5ED6B4;
  --brand-100: #D3EFE4;
  --brand-50: #EAF6F0;
  --teal-600: #0A7276;
  --grad-brand: linear-gradient(135deg, #0A7F62 0%, #0A7276 100%);

  /* Status: text on its tint >= 4.5:1. */
  --st-turn-bg: #FFEFCC; --st-turn-fg: #744600; --st-turn-dot: #E39A0C;
  --st-sent-bg: #E2ECFB; --st-sent-fg: #1C4A96;
  --st-ok-bg: #D9F1E6;   --st-ok-fg: #075E49;
  --st-wait-bg: #FCE5DA; --st-wait-fg: #9A3412;
  --st-edit-bg: #F7E3EE; --st-edit-fg: #8E1F53;
  --st-off-bg: #ECEAE6;  --st-off-fg: #57534E;
  --st-ship-bg: #DDE4EE; --st-ship-fg: #1A2C44;
  --danger: #B42318;     --danger-bg: #FDECEA;

  /* Radius: 10 thumbnails · 14 inputs, rows · 20 cards · 28 sheets and bars · pill. */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Elevation: e1 every resting card · e2 floating things only · e3 sheets. */
  --e-1: 0 1px 2px rgba(13, 27, 42, .04), 0 0 0 1px rgba(13, 27, 42, .045);
  --e-2: 0 10px 28px -10px rgba(13, 27, 42, .22), 0 2px 6px rgba(13, 27, 42, .06);
  --e-3: 0 -12px 40px -8px rgba(13, 27, 42, .25);

  /* Focus: --focus is the ring COLOUR (outline), --focus-ring the input halo (box-shadow). */
  --focus: #109A78;
  --focus-ring: 0 0 0 4px var(--brand-100);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tap: 48px;

  /* Layout. */
  --gutter: 16px;
  --content-w: 720px;
  --rail-w: 104px;
  --tabbar-h: 72px;

  /* Legacy names (the pre-redesign app.css): kept as aliases so the page markup that still uses them keeps
     its look. New rules use the names above. --midnight / --paper are the PWA's theme and background
     colours (src/web/app_shell.js, pinned by test/web/push_pages.test.js). */
  --midnight: #0D1B2A;
  --paper: #F5F3EE;
  --mint: var(--brand-300);
  --mint-dark: var(--brand-600);
  --mint-ink: var(--brand-700);
  --mint-50: var(--brand-50);
  --mint-100: var(--brand-100);
  --muted: var(--ink-2);
  --card: var(--surface);
  --ink-soft: #2C3A48;
  --line-soft: var(--line);
  --line-strong: var(--line-2);
  --sunk: #FAF8F4;
  --warn: var(--st-turn-fg);
  --warn-bg: var(--st-turn-bg);
  --bad: var(--danger);
  --bad-bg: var(--danger-bg);
  --info: var(--st-sent-fg);
  --info-bg: var(--st-sent-bg);
  --radius: var(--r-lg);
  --radius-sm: var(--r-md);
  --radius-lg: var(--r-lg);
  --shadow-1: var(--e-1);
  --shadow-2: var(--e-2);
  --shadow-pop: 0 18px 48px rgba(13, 27, 42, .28);
}

/* 2. Icons: masks (black = shown), --iw-* white drawings for the gradient tiles, --is-* 2-stroke status
   icons, --it-inbox the tinted empty-state drawing. Generated: node -e "process.stdout.write(require(
   './src/web/icons').cssIconVars())" (test/web/icons.test.js checks this block matches). ---------------------- */
:root {
/* @icons:start */
  --i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M12 7.75v5'/%3E%3Cpath d='M12 16.25v.01' stroke-width='2.4'/%3E%3C/svg%3E");
  --i-arrow-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E");
  --i-arrow-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --i-bag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.2 8h13.6l-.95 11.1a2 2 0 0 1-2 1.85H8.15a2 2 0 0 1-2-1.85z'/%3E%3Cpath d='M9 10.5V6.75a3 3 0 0 1 6 0v3.75'/%3E%3C/svg%3E");
  --i-ban: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='m6.2 6.2 11.6 11.6'/%3E%3C/svg%3E");
  --i-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16.25V11a6 6 0 0 1 12 0v5.25l1.5 1.75h-15z'/%3E%3Cpath d='M10 20.5a2.2 2.2 0 0 0 4 0'/%3E%3C/svg%3E");
  --i-box: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 20 7.75v8.5L12 20.5 4 16.25v-8.5z'/%3E%3Cpath d='M4 7.75 12 12l8-4.25M12 12v8.5M8 5.6l8 4.3'/%3E%3C/svg%3E");
  --i-card: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.75' y='5.25' width='18.5' height='13.5' rx='2.75'/%3E%3Cpath d='M2.75 9.75h18.5M6.5 15h3'/%3E%3C/svg%3E");
  --i-cash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.75' y='6' width='18.5' height='12' rx='2.5'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3Cpath d='M6 9.75v4.5M18 9.75v4.5'/%3E%3C/svg%3E");
  --i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.75a8.25 8.25 0 0 0-7.1 12.45L3.75 20.25l4.15-1.1A8.25 8.25 0 1 0 12 3.75Z'/%3E%3Cpath d='m8.6 12.1 2.3 2.3 4.6-4.7'/%3E%3C/svg%3E");
  --i-chat-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.75a8.25 8.25 0 0 0-7.1 12.45L3.75 20.25l4.15-1.1A8.25 8.25 0 1 0 12 3.75Z'/%3E%3Cpath d='M8.4 12h.01M12 12h.01M15.6 12h.01' stroke-width='2.6'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.2 4.2L19 7'/%3E%3C/svg%3E");
  --i-check2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.75 12.75 6 17l8.5-9.5'/%3E%3Cpath d='M11.25 15.75 12.5 17l9-10'/%3E%3C/svg%3E");
  --i-chev-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  --i-chev-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m14.5 6-6 6 6 6'/%3E%3C/svg%3E");
  --i-chev-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9.5 6 6 6-6 6'/%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M12 7.75V12l2.75 1.75'/%3E%3C/svg%3E");
  --i-code: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8.5 7.5-4.5 4.5 4.5 4.5M15.5 7.5l4.5 4.5-4.5 4.5'/%3E%3C/svg%3E");
  --i-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.75' y='8.75' width='11.5' height='11.5' rx='2.75'/%3E%3Cpath d='M15.25 8.75v-2a2.75 2.75 0 0 0-2.75-2.75h-6a2.75 2.75 0 0 0-2.75 2.75v6a2.75 2.75 0 0 0 2.75 2.75h2'/%3E%3C/svg%3E");
  --i-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6h.01M12 12h.01M12 18h.01' stroke-width='2.8'/%3E%3C/svg%3E");
  --i-edit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.25 19.75h3.9L18.9 9a2.76 2.76 0 0 0-3.9-3.9L4.25 15.85z'/%3E%3Cpath d='m13.6 6.5 3.9 3.9'/%3E%3C/svg%3E");
  --i-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.75 12S6.25 5.5 12 5.5 21.25 12 21.25 12 17.75 18.5 12 18.5 2.75 12 2.75 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.75'/%3E%3C/svg%3E");
  --i-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.75 3.75H7.25a2 2 0 0 0-2 2v12.5a2 2 0 0 0 2 2h9.5a2 2 0 0 0 2-2v-9.5z'/%3E%3Cpath d='M13.75 3.75v5h5M9 13h6M9 16.5h4'/%3E%3C/svg%3E");
  --i-gauge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.6 17.75a8.25 8.25 0 1 1 14.8 0'/%3E%3Cpath d='m12 14 3.75-4.25'/%3E%3Ccircle cx='12' cy='14.25' r='1.25'/%3E%3C/svg%3E");
  --i-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M3.75 12h16.5M12 3.75c2.3 2.4 3.4 5.15 3.4 8.25s-1.1 5.85-3.4 8.25c-2.3-2.4-3.4-5.15-3.4-8.25s1.1-5.85 3.4-8.25Z'/%3E%3C/svg%3E");
  --i-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6.5' height='6.5' rx='2'/%3E%3Crect x='13.5' y='4' width='6.5' height='6.5' rx='2'/%3E%3Crect x='4' y='13.5' width='6.5' height='6.5' rx='2'/%3E%3Crect x='13.5' y='13.5' width='6.5' height='6.5' rx='2'/%3E%3C/svg%3E");
  --i-help: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M9.75 9.6a2.3 2.3 0 0 1 4.45.75c0 1.55-2.2 1.9-2.2 3.4'/%3E%3Cpath d='M12 16.9v.01' stroke-width='2.4'/%3E%3C/svg%3E");
  --i-history: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12a7.5 7.5 0 1 0 2.2-5.3L4.5 9'/%3E%3Cpath d='M4.5 4.75V9h4.25M12 8v4l2.75 1.75'/%3E%3C/svg%3E");
  --i-hourglass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.75h10M7 20.25h10M8 3.75v2.5a4 4 0 0 0 1.6 3.2L12 11.25l2.4-1.8A4 4 0 0 0 16 6.25v-2.5M8 20.25v-2.5a4 4 0 0 1 1.6-3.2l2.4-1.8 2.4 1.8a4 4 0 0 1 1.6 3.2v2.5'/%3E%3C/svg%3E");
  --i-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.25' y='4.25' width='17.5' height='15.5' rx='3'/%3E%3Ccircle cx='9' cy='9.75' r='1.75'/%3E%3Cpath d='m4 17.25 4.4-4.4a1.5 1.5 0 0 1 2.1 0l1.9 1.9 2.4-2.4a1.5 1.5 0 0 1 2.1 0l3.85 3.85'/%3E%3C/svg%3E");
  --i-inbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.75 13.5 6 5.9a2 2 0 0 1 1.9-1.4h8.2A2 2 0 0 1 18 5.9l2.25 7.6v4.25a2 2 0 0 1-2 2H5.75a2 2 0 0 1-2-2z'/%3E%3Cpath d='M3.75 13.5h4.5l1.25 2h5l1.25-2h4.5'/%3E%3C/svg%3E");
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M12 11v5.25'/%3E%3Cpath d='M12 7.75v.01' stroke-width='2.4'/%3E%3C/svg%3E");
  --i-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.2 13.8a3.8 3.8 0 0 0 5.4 0l3.1-3.1a3.8 3.8 0 0 0-5.4-5.4l-1 1'/%3E%3Cpath d='M13.8 10.2a3.8 3.8 0 0 0-5.4 0l-3.1 3.1a3.8 3.8 0 0 0 5.4 5.4l1-1'/%3E%3C/svg%3E");
  --i-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.25 4.75h3a2 2 0 0 1 2 2v10.5a2 2 0 0 1-2 2h-3'/%3E%3Cpath d='M10.5 8 6.5 12l4 4M6.5 12h9.25'/%3E%3C/svg%3E");
  --i-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
  --i-new: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E");
  --i-pause: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M10 9.25v5.5M14 9.25v5.5'/%3E%3C/svg%3E");
  --i-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.6 3.75h2.5l1.4 4-1.85 1.25a10.5 10.5 0 0 0 6.35 6.35l1.25-1.85 4 1.4v2.5a2.1 2.1 0 0 1-2.25 2.1A16.4 16.4 0 0 1 4.5 6a2.1 2.1 0 0 1 2.1-2.25Z'/%3E%3C/svg%3E");
  --i-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20.75s-6.5-5.4-6.5-10.9a6.5 6.5 0 0 1 13 0c0 5.5-6.5 10.9-6.5 10.9Z'/%3E%3Ccircle cx='12' cy='9.75' r='2.4'/%3E%3C/svg%3E");
  --i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --i-pulse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l2.25-5.5 4.5 11L16 12h5'/%3E%3C/svg%3E");
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E");
  --i-send: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.25 3.75 10.4 13.6M20.25 3.75l-6.1 16.5-3.75-6.65L3.75 9.85z'/%3E%3C/svg%3E");
  --i-share: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 14.5V3.75M7.75 8 12 3.75 16.25 8'/%3E%3Cpath d='M5 12v6.25a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V12'/%3E%3C/svg%3E");
  --i-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 19 6v5.5c0 4.5-3 7.75-7 9-4-1.25-7-4.5-7-9V6z'/%3E%3Cpath d='m9 12 2.2 2.2 4-4.2'/%3E%3C/svg%3E");
  --i-sliders: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h9M17 7h3M4 17h3M11 17h9'/%3E%3Ccircle cx='15' cy='7' r='2'/%3E%3Ccircle cx='9' cy='17' r='2'/%3E%3C/svg%3E");
  --i-spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v4M12 16v4M4 12h4M16 12h4M6.3 6.3l2.2 2.2M15.5 15.5l2.2 2.2M6.3 17.7l2.2-2.2M15.5 8.5l2.2-2.2'/%3E%3C/svg%3E");
  --i-store: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5 5.3 4.75h13.4L20 9.5'/%3E%3Cpath d='M4 9.5a2.67 2.67 0 0 0 5.33 0 2.67 2.67 0 0 0 5.34 0 2.67 2.67 0 0 0 5.33 0'/%3E%3Cpath d='M5.25 12v8.25h13.5V12M10 20.25v-4.5h4v4.5'/%3E%3C/svg%3E");
  --i-tag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.75 12.6V5.25a1.5 1.5 0 0 1 1.5-1.5h7.35l7.65 7.65a1.5 1.5 0 0 1 0 2.1l-7.25 7.25a1.5 1.5 0 0 1-2.1 0z'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3C/svg%3E");
  --i-toggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.75' y='7' width='18.5' height='10' rx='5'/%3E%3Ccircle cx='16.25' cy='12' r='2.75'/%3E%3C/svg%3E");
  --i-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 7h15M9.5 7V5.25h5V7M6.5 7l.8 11.25a2 2 0 0 0 2 1.85h5.4a2 2 0 0 0 2-1.85L17.5 7'/%3E%3C/svg%3E");
  --i-truck: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.25 16V7.5a1.5 1.5 0 0 0-1.5-1.5h-8.5a1.5 1.5 0 0 0-1.5 1.5V16h2.4M9.1 16h5.15'/%3E%3Cpath d='M14.25 9.5h3.6l3.4 3.6V16h-1.8M14.25 16h1.4'/%3E%3Ccircle cx='7' cy='16.75' r='2'/%3E%3Ccircle cx='17.6' cy='16.75' r='2'/%3E%3C/svg%3E");
  --i-upload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4.5M7.75 8.75 12 4.5l4.25 4.25M4.75 15.5v2.75a2 2 0 0 0 2 2h10.5a2 2 0 0 0 2-2V15.5'/%3E%3C/svg%3E");
  --i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.5' r='3.75'/%3E%3Cpath d='M4.75 20a7.25 7.25 0 0 1 14.5 0'/%3E%3C/svg%3E");
  --i-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8.5' r='3.25'/%3E%3Cpath d='M3.25 19.25a5.75 5.75 0 0 1 11.5 0'/%3E%3Cpath d='M15.25 5.4a3.25 3.25 0 0 1 0 6.2M17.5 14.1a5.75 5.75 0 0 1 3.25 5.15'/%3E%3C/svg%3E");
  --i-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.4 4.9a1.85 1.85 0 0 1 3.2 0l7.05 12.3a1.85 1.85 0 0 1-1.6 2.8H4.95a1.85 1.85 0 0 1-1.6-2.8z'/%3E%3Cpath d='M12 9.75v3.75'/%3E%3Cpath d='M12 16.6v.01' stroke-width='2.4'/%3E%3C/svg%3E");
  --i-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
  --iw-new: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E");
  --is-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M12 7.75v5'/%3E%3Cpath d='M12 16.25v.01' stroke-width='2.4'/%3E%3C/svg%3E");
  --is-ban: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='m6.2 6.2 11.6 11.6'/%3E%3C/svg%3E");
  --is-chat-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.75a8.25 8.25 0 0 0-7.1 12.45L3.75 20.25l4.15-1.1A8.25 8.25 0 1 0 12 3.75Z'/%3E%3Cpath d='M8.4 12h.01M12 12h.01M15.6 12h.01' stroke-width='2.6'/%3E%3C/svg%3E");
  --is-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.2 4.2L19 7'/%3E%3C/svg%3E");
  --is-check2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.75 12.75 6 17l8.5-9.5'/%3E%3Cpath d='M11.25 15.75 12.5 17l9-10'/%3E%3C/svg%3E");
  --is-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M12 7.75V12l2.75 1.75'/%3E%3C/svg%3E");
  --is-edit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.25 19.75h3.9L18.9 9a2.76 2.76 0 0 0-3.9-3.9L4.25 15.85z'/%3E%3Cpath d='m13.6 6.5 3.9 3.9'/%3E%3C/svg%3E");
  --is-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.75 12S6.25 5.5 12 5.5 21.25 12 21.25 12 17.75 18.5 12 18.5 2.75 12 2.75 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.75'/%3E%3C/svg%3E");
  --is-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M12 11v5.25'/%3E%3Cpath d='M12 7.75v.01' stroke-width='2.4'/%3E%3C/svg%3E");
  --is-pause: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M10 9.25v5.5M14 9.25v5.5'/%3E%3C/svg%3E");
  --is-truck: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.25 16V7.5a1.5 1.5 0 0 0-1.5-1.5h-8.5a1.5 1.5 0 0 0-1.5 1.5V16h2.4M9.1 16h5.15'/%3E%3Cpath d='M14.25 9.5h3.6l3.4 3.6V16h-1.8M14.25 16h1.4'/%3E%3Ccircle cx='7' cy='16.75' r='2'/%3E%3Ccircle cx='17.6' cy='16.75' r='2'/%3E%3C/svg%3E");
  --is-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.4 4.9a1.85 1.85 0 0 1 3.2 0l7.05 12.3a1.85 1.85 0 0 1-1.6 2.8H4.95a1.85 1.85 0 0 1-1.6-2.8z'/%3E%3Cpath d='M12 9.75v3.75'/%3E%3Cpath d='M12 16.6v.01' stroke-width='2.4'/%3E%3C/svg%3E");
  --it-inbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23076553' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.75 13.5 6 5.9a2 2 0 0 1 1.9-1.4h8.2A2 2 0 0 1 18 5.9l2.25 7.6v4.25a2 2 0 0 1-2 2H5.75a2 2 0 0 1-2-2z'/%3E%3Cpath d='M3.75 13.5h4.5l1.25 2h5l1.25-2h4.5'/%3E%3C/svg%3E");
/* @icons:end */
  /* The selected tab's pill (a rounded rect in --brand-50) as a background image. */
  --pill-tab: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 32'%3E%3Crect width='56' height='32' rx='16' fill='%23EAF6F0'/%3E%3C/svg%3E");
}

/* 3. Reset and base ---------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
img { max-inline-size: 100%; block-size: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* Admin event bodies (JSON) wrap inside their card. */
pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: var(--fs-14); }
code { font-size: .92em; }
hr { border: 0; block-size: 1px; background: var(--line); margin-block: var(--s-4); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* 4. Typography -------------------------------------------------------------------------------------------- */
a { color: var(--brand-700); text-underline-offset: .2em; }
a:hover { color: var(--brand-800); }
h1, h2, h3, h4 { line-height: var(--lh-tight); color: var(--ink); }
h1 { font-size: var(--fs-28); font-weight: 600; letter-spacing: -.01em; margin-block: var(--s-1) var(--s-4); }
h2 { font-size: var(--fs-18); font-weight: 600; margin-block: var(--s-8) var(--s-3); }
h3 { font-size: var(--fs-16); font-weight: 600; margin-block: 0 var(--s-2); }
h4 { font-size: var(--fs-14); font-weight: 600; margin-block: 0 var(--s-1); }
p { margin-block: var(--s-2); }
small { font-size: var(--fs-12); }
b, strong { font-weight: 600; }

/* 5. Utilities --------------------------------------------------------------------------------------------- */
.sr, .sr-only {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* Numbers, phones, order ids, sizes, URLs: isolated LTR inside Arabic text. */
.num, bdi.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--ink-2); font-size: var(--fs-14); }
.nw { white-space: nowrap; }
.inline { display: inline; }
.spaced { margin-block-start: var(--s-4); }
.stack { display: grid; gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-3); align-items: end; }
.eyebrow { font-size: var(--fs-12); font-weight: 500; color: var(--ink-2); letter-spacing: .01em; }
.section-title { font-size: var(--fs-18); font-weight: 600; margin: 0; }
.divider { block-size: 1px; background: var(--line); border: 0; margin: 0; }
.tag-on { color: var(--brand-700); font-weight: 600; }
.tag-off { color: var(--danger); font-weight: 600; }
.tag-warn { color: var(--st-turn-fg); font-weight: 600; }
@media (min-width: 1024px) { .mob-only { display: none !important; } }
@media (max-width: 1023.98px) { .desk-only { display: none !important; } }

/* 6. Icon helpers ------------------------------------------------------------------------------------------ */
/* Inline: icon(name) in src/web/icons.js prints <svg class="ic"> (24) / ic-16 / ic-18 / ic-20. */
.ic {
  inline-size: 24px; block-size: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: middle;
}
.ic-16 { inline-size: 16px; block-size: 16px; }
.ic-18 { inline-size: 18px; block-size: 18px; }
.ic-20 { inline-size: 20px; block-size: 20px; }
/* A mask icon (seller / admin pages): <span class="mi" aria-hidden="true"></span> with --ico set by a page
   rule, e.g. .x .mi { --ico: var(--i-truck); }. */
:where(.shell) .mi {
  display: inline-block; flex: none; inline-size: 24px; block-size: 24px; background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}

/* 7. Brand ------------------------------------------------------------------------------------------------- */
/* The REAL logo only (founder 2026-11-21), printed by html.js brandLogo(): <img class="logo logo-dark|light|mark">
   with the brand name as alt, width / height attributes, never below 24 px high, never wrapped. The app bar's
   <a class="brand"> holds the light logo (navy bar, phone) and the dark one (flat header, desktop); CSS shows one.
   Founder 2026-11-21 ("where is the Akkidly logo?"): the FULL logo is in the app bar of EVERY page, sub-pages
   and admin included, at every width (a sub-page's back link sits on its own line under it, section 21); the
   desktop rails add the mark. The logo file carries its own padding, so 44 px reads like a ~30 px wordmark
   (html.js prints it at 44 so the <img> attributes match); 38 px under 380 px; 52 px on a desktop. Nothing
   else may hide .brand / .logo (test/web/html.test.js "logo X1.1" scans every app sheet). */
.logo { display: block; flex: none; max-inline-size: none; inline-size: auto; min-block-size: 24px; }
.logo-mark { border-radius: 26%; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex: none; white-space: nowrap;
  color: inherit; text-decoration: none; min-block-size: 44px;
}
.brand:hover { color: inherit; }
.brand .logo { block-size: 44px; }
.appbar .brand .logo-dark { display: none; }
@media (max-width: 379.98px) {
  .brand .logo { block-size: 38px; }
}
@media (min-width: 1024px) {
  .appbar .brand .logo { block-size: 52px; }
  .appbar .brand .logo-light { display: none; }
  .appbar .brand .logo-dark { display: block; }
}
/* Legacy text brand (kept for markup not yet on brandLogo; do not use in new markup). */
.brand-word { font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; line-height: 1; }
.brand-tick { color: var(--brand-300); font-weight: 700; }

/* 8. Buttons ----------------------------------------------------------------------------------------------- */
/* ONE primary per view (review fix X1.5, FOUNDATION.md §5):
   .btn-primary (alias .btn-mint) = THE action of a screen, the gradient pill: exactly one per view (the page's
     main save / send). Everything else is secondary or quieter:
   .btn alone   = SECONDARY: white with a navy outline (never filled), so a plain .btn never competes with the
                  primary. A second "save" on the same view is a plain .btn.
   .btn-ghost   = tertiary: white with a light line · .btn-soft = tinted (copy, small helpers)
   .btn-ink     = navy fill: only the confirm button of the layout's dialog (no other primary on screen there)
   .btn-danger (alias .btn-bad) = a quiet destructive action · .btn-danger-text = text only
   Sizes: .btn-sm (alias .btn-small, 44) · default 48 · .btn-lg 56 · .btn-block full width. */
.btn {
  --h: var(--tap);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-block-size: var(--h); padding-block: 0; padding-inline: var(--s-6);
  border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font: inherit; font-size: var(--fs-16); font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
  white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s, filter .2s;
}
.btn:hover { color: var(--ink); background: var(--bg); }
.btn:active { transform: scale(.98); }
.btn-primary, .btn-mint {
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 8px 20px -10px rgba(10, 127, 98, .8), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.btn-primary:hover, .btn-mint:hover { background: var(--grad-brand); color: #fff; filter: brightness(1.06); }
.btn-ink, .dialog .btn[value="ok"] { background: var(--ink); color: #fff; box-shadow: none; }
.btn-ink:hover, .dialog .btn[value="ok"]:hover { background: #1B2B3D; color: #fff; }
.btn-soft { background: var(--brand-50); color: var(--brand-700); box-shadow: none; }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-800); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-danger, .btn-bad { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(180, 35, 24, .35); }
.btn-danger:hover, .btn-bad:hover { background: var(--danger-bg); color: var(--danger); }
.btn-danger-text { background: transparent; color: var(--danger); box-shadow: none; }
.btn-danger-text:hover { background: var(--danger-bg); color: var(--danger); }
.btn-sm, .btn-small { --h: 44px; font-size: var(--fs-14); padding-inline: var(--s-4); }
.btn-lg { --h: 56px; font-size: var(--fs-18); padding-inline: var(--s-8); }
.btn-block { inline-size: 100%; }
.btn-primary.btn-block, .btn-mint.btn-block { --h: 56px; font-size: var(--fs-18); }
.btn .ic { inline-size: 20px; block-size: 20px; }
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] {
  background: var(--bg-sunk); color: var(--ink-3); box-shadow: none; cursor: not-allowed; filter: none; transform: none;
}
/* A row of actions: on a phone the buttons of a card share its width (big targets). */
.actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-block: var(--s-4) 0; }
.actions form { margin: 0; }
.actions + .orders, .actions + .card { margin-block-start: var(--s-4); }
@media (max-width: 767.98px) {
  .card .actions > .btn, .card .actions > form { flex: 1 1 auto; }
  .card .actions > form > .btn { inline-size: 100%; }
  form.card .actions > .btn[type="submit"] { flex-basis: 100%; }
}

/* 9. Cards, sections, folds -------------------------------------------------------------------------------- */
/* .card = a padded white card (e1). .card-flush = no padding (the page lays out its inside). .card-pad =
   the mockups' explicit padding. .card-float = floating (e2: the card over the app bar). */
.card {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e-1);
  padding: var(--s-5); margin-block: 0 var(--s-4); margin-inline: 0;
}
.card > :first-child { margin-block-start: 0; }
.card > :last-child { margin-block-end: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-pad { padding: var(--s-5); }
.card-float { box-shadow: var(--e-2); }
.card h2 { font-size: var(--fs-18); margin-block: 0 var(--s-3); }
/* A folded card (<details class="card fold"><summary>…</summary>…</details>), closed by default: a 48 px
   summary with a turning chevron. */
.fold > summary {
  cursor: pointer; font-weight: 600; min-block-size: var(--tap); display: flex; align-items: center; gap: var(--s-2);
  list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
:where(.shell) .fold > summary::after {
  content: ''; flex: none; margin-inline-start: auto; inline-size: 20px; block-size: 20px; background-color: var(--ink-2);
  -webkit-mask: var(--i-chev-d) center / contain no-repeat; mask: var(--i-chev-d) center / contain no-repeat;
  transition: transform .2s var(--ease);
}
.fold[open] > summary::after { transform: rotate(180deg); }
.fold[open] > summary { margin-block-end: var(--s-2); }

/* 10. Forms ------------------------------------------------------------------------------------------------ */
/* Bare elements are styled (the pages print <label> + <input> without classes); .input does the same for
   anything else. A field: <div class="field"><label for=…>…</label><input …><p class="hint">…</p></div>. */
label { display: block; font-weight: 500; font-size: var(--fs-14); color: var(--ink); margin-block: var(--s-4) 6px; }
.field { display: grid; gap: 6px; margin-block: var(--s-4) 0; }
.field > label { margin: 0; }
.label { font-size: var(--fs-14); font-weight: 500; color: var(--ink); }
input[type="text"], input[type="tel"], input[type="search"], input[type="number"], input[type="date"], input[type="email"],
input[type="password"], input[type="url"], select, textarea, .input {
  inline-size: 100%; min-block-size: 52px; padding-block: 12px; padding-inline: var(--s-4);
  border: 1.5px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-16); line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
/* Placeholders often say what to type (informative): --ink-2 (AA on white); --ink-3 is decoration / disabled only. */
input::placeholder, textarea::placeholder { color: var(--ink-2); }
input:hover, select:hover, textarea:hover, .input:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus, .input:focus {
  outline: none; border-color: var(--brand-600); box-shadow: var(--focus-ring);
}
input[readonly], textarea[readonly] { background: var(--bg); border-style: dashed; }
input:disabled, select:disabled, textarea:disabled { background: var(--bg-sunk); color: var(--ink-3); cursor: not-allowed; }
textarea { min-block-size: 112px; resize: vertical; line-height: var(--lh-body); }
textarea.short { min-block-size: 0; }
:where(.shell) select {
  -webkit-appearance: none; appearance: none; padding-inline-end: 44px;
  background-image: var(--i-chev-d); background-repeat: no-repeat; background-size: 20px;
}
[dir="rtl"] :where(.shell) select { background-position: 14px 50%; }
[dir="ltr"] :where(.shell) select { background-position: calc(100% - 14px) 50%; }
[aria-invalid="true"] { border-color: var(--danger); }
input[type="file"] {
  display: block; inline-size: 100%; font: inherit; font-size: var(--fs-14); padding: var(--s-2);
  border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: var(--bg); color: var(--ink-2);
}
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; margin-inline-end: var(--s-3); padding-block: 8px; padding-inline: var(--s-4);
  min-block-size: 40px; border: 0; border-radius: var(--r-pill); background: var(--ink); color: #fff; cursor: pointer;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-600); inline-size: 20px; block-size: 20px; flex: none; margin: 0; }
.hint { color: var(--ink-2); font-size: var(--fs-12); margin-block: 6px 0; }
.field-error {
  display: flex; align-items: flex-start; gap: var(--s-2); margin-block: 6px 0;
  padding-block: 8px; padding-inline: var(--s-3); border-radius: var(--r-sm);
  background: var(--danger-bg); color: var(--danger); font-size: var(--fs-14); font-weight: 500;
}
/* A check row: <label class="check"><input type="checkbox"> text</label>. */
.check { display: flex; align-items: center; gap: var(--s-3); min-block-size: var(--tap); font-weight: 400; font-size: var(--fs-16); margin-block: var(--s-1); }
/* An input with an add-on: <div class="input-group"><span class="addon">+962</span><input class="input"></div>. */
.input-group {
  display: flex; align-items: stretch; border-radius: var(--r-md); background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-2); overflow: hidden;
}
.input-group:focus-within { box-shadow: inset 0 0 0 2px var(--brand-600), var(--focus-ring); }
.input-group > input, .input-group > .input { border: 0; box-shadow: none; background: transparent; border-radius: 0; }
.input-group > input:focus, .input-group > .input:focus { box-shadow: none; }
.input-group .addon {
  display: grid; place-items: center; padding-inline: var(--s-4); color: var(--ink-2); font-size: var(--fs-14);
  font-weight: 500; background: var(--bg); white-space: nowrap;
}
.input-group .btn { margin: 4px; --h: 44px; }
/* Search: <form class="search"><input type="search" …><button class="btn">…</button></form> (legacy) or
   <label class="search-box"><span class="sr">…</span>{icon('search')}<input type="search"></label>. */
.search { display: flex; gap: var(--s-2); margin-block: 0 var(--s-3); }
.search input { flex: 1; min-inline-size: 0; border-radius: var(--r-pill); min-block-size: var(--tap); }
.search .btn { min-block-size: var(--tap); }
.search-box { position: relative; display: block; margin: 0; }
.search-box .ic { position: absolute; inset-inline-start: 16px; inset-block-start: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-box input { padding-inline-start: 48px; border-radius: var(--r-pill); min-block-size: var(--tap); }
/* A switch: <label class="switch"><input type="checkbox" …><span></span></label>. */
.switch { position: relative; display: inline-block; inline-size: 52px; block-size: 32px; flex: none; margin: 0; }
/* The invisible checkbox reaches 6 px past the 32 px track above and below: a 44 px hit area. */
.switch input { position: absolute; inset-block: -6px; inset-inline: 0; opacity: 0; margin: 0; inline-size: 100%; block-size: 100%; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--line-2); transition: background-color .2s var(--ease); }
.switch span::after {
  content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 26px; block-size: 26px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(13, 27, 42, .25); transition: inset-inline-start .2s var(--ease);
}
.switch input:checked + span { background: var(--brand-600); }
.switch input:checked + span::after { inset-inline-start: 23px; }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* 11. Segmented control ------------------------------------------------------------------------------------ */
/* <div class="seg"><a href=… aria-current="true">اليوم</a><a href=…>هذا الأسبوع</a></div> (links or buttons
   with aria-pressed / aria-selected). Legacy: .tabs (same look). .seg.on-ink = on the navy app bar. */
.seg, .tabs {
  display: flex; padding: 3px; gap: 3px; border-radius: var(--r-pill); background: var(--bg-sunk); margin-block: 0 var(--s-3);
}
.seg > a, .seg > button, .seg > label, .tabs > a {
  flex: 1; min-block-size: 44px; padding-block: 0; padding-inline: var(--s-5); margin: 0; border: 0; border-radius: var(--r-pill);
  background: transparent; font-size: var(--fs-14); font-weight: 500; color: var(--ink-2); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s;
}
.seg > [aria-current="true"], .seg > [aria-current="page"], .seg > [aria-pressed="true"], .seg > [aria-selected="true"],
.tabs > a[aria-current="true"] {
  background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(13, 27, 42, .12);
}
.seg.on-ink { background: rgba(255, 255, 255, .08); }
.seg.on-ink > a, .seg.on-ink > button { color: rgba(255, 255, 255, .72); }
.seg.on-ink > [aria-current="true"], .seg.on-ink > [aria-pressed="true"] { background: #fff; color: var(--ink); }

/* 12. Chips ------------------------------------------------------------------------------------------------ */
/* Filter chips (seller): a row that scrolls sideways on a phone; the chosen one turns navy.
   <div class="chips"><a class="fchip" href=… aria-current="true">الكل <span class="n">6</span></a>…</div> */
.chips {
  display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding-block: 2px;
  margin-block: 0 var(--s-3); margin-inline: 0;
}
.chips::-webkit-scrollbar { display: none; }
.fchip, .chips > a {
  flex: none; min-block-size: 44px; padding-block: 0; padding-inline: var(--s-4); border: 0; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-14); font-weight: 500;
  color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.fchip:hover, .chips > a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.fchip .n, .chips > a small { font-size: var(--fs-12); color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.fchip[aria-pressed="true"], .fchip[aria-current="true"], .chips > a[aria-current="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.fchip[aria-pressed="true"] .n, .fchip[aria-current="true"] .n, .chips > a[aria-current="true"] small { color: rgba(255, 255, 255, .7); }
/* Legacy: a status chip inside a filter link reads as the filter's plain label. */
.chips > a .chip { background: none; color: inherit; padding: 0; min-block-size: 0; font-weight: inherit; box-shadow: none; }
:where(.shell) .chips > a .chip::before { content: none; }
/* Option chips (buyer options, choices): 48 px, an emerald ring when chosen.
   <div class="opts"><button class="opt" aria-pressed="true">M</button>…</div> */
.opts { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.opt {
  min-block-size: var(--tap); min-inline-size: 56px; padding-block: 0; padding-inline: var(--s-4); border: 0; border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); font-weight: 500; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); transition: box-shadow .15s var(--ease);
}
.opt:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.opt[aria-pressed="true"], .opt[aria-checked="true"], input:checked + .opt {
  box-shadow: inset 0 0 0 2px var(--brand-600); background: var(--brand-50); color: var(--brand-800); font-weight: 600;
}
.opt .sw { inline-size: 18px; block-size: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(13, 27, 42, .18); }
.opt:disabled { color: var(--ink-3); text-decoration: line-through; box-shadow: inset 0 0 0 1.5px var(--line); cursor: not-allowed; }

/* 13. Status pills ----------------------------------------------------------------------------------------- */
/* html.js statusChip(status) prints <span class="chip chip-<status>">label</span> and heldChip(reason)
   <span class="chip chip-held chip-held-<reason>">; the colours and icons come from here (seller / admin).
   The sent and confirmed labels carry their own ✓ / ✓✓, so they get no drawn icon. The word always says
   the status (never colour alone). For static markup (a legend): <span class="st st-turn">{icon}…</span>. */
.chip, .st {
  display: inline-flex; align-items: center; gap: 6px; min-block-size: 32px; padding-block: 0; padding-inline: 12px;
  border-radius: var(--r-pill); font-size: var(--fs-14); font-weight: 600; line-height: 1.2; white-space: nowrap;
  vertical-align: middle; background: var(--st-off-bg); color: var(--st-off-fg);
}
.st .ic { inline-size: 18px; block-size: 18px; stroke-width: 2; }
.st-lg { min-block-size: 40px; padding-inline: 16px; font-size: var(--fs-16); }
.chip-draft, .chip-awaiting_seller, .chip-held, .st-turn { background: var(--st-turn-bg); color: var(--st-turn-fg); }
.chip-sent, .st-sent { background: var(--st-sent-bg); color: var(--st-sent-fg); }
/* Seller form plan Task 12: waiting for the buyer's details form (his turn, like sent; its label has no ✓). */
.chip-awaiting_buyer { background: var(--st-sent-bg); color: var(--st-sent-fg); }
.chip-confirmed, .st-ok { background: var(--st-ok-bg); color: var(--st-ok-fg); }
.chip-no_reply, .st-wait { background: var(--st-wait-bg); color: var(--st-wait-fg); }
.chip-edit_requested, .st-edit { background: var(--st-edit-bg); color: var(--st-edit-fg); }
.chip-cancelled, .chip-unknown, .chip-hidden, .st-off { background: var(--st-off-bg); color: var(--st-off-fg); }
.chip-shipped, .st-ship { background: var(--st-ship-bg); color: var(--st-ship-fg); }
.chip-test { background: var(--st-sent-bg); color: var(--st-sent-fg); }
.chip-source { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
:where(.shell) :is(.chip-draft, .chip-awaiting_seller, .chip-awaiting_buyer, .chip-no_reply, .chip-edit_requested, .chip-cancelled, .chip-shipped, .chip-held)::before {
  content: ''; flex: none; inline-size: 18px; block-size: 18px; background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.chip-draft, .chip-awaiting_seller { --ico: var(--is-clock); }
.chip-no_reply { --ico: var(--is-chat-dots); }
.chip-awaiting_buyer { --ico: var(--is-clock); }
.chip-edit_requested { --ico: var(--is-edit); }
.chip-cancelled { --ico: var(--is-ban); }
.chip-shipped { --ico: var(--is-truck); }
.chip-held { --ico: var(--is-pause); }
[dir="rtl"] .chip-shipped::before { transform: scaleX(-1); }
h1 .chip, h2 .chip { font-size: var(--fs-14); }
h1:has(> .chip) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }

/* 14. Notices and flash ------------------------------------------------------------------------------------ */
/* The layout's flash: <p class="flash flash-ok|flash-warn" role="status">…</p>. The same look in a page:
   <div class="notice notice-ok|warn|bad|info">…</div>. Icon + tint; text is never colour alone. */
.flash, .notice {
  display: flex; align-items: flex-start; gap: var(--s-3); margin-block: 0 var(--s-4); margin-inline: 0;
  padding-block: 14px; padding-inline: var(--s-4); border-radius: var(--r-md); font-size: var(--fs-14); font-weight: 500;
  background: var(--st-sent-bg); color: var(--st-sent-fg); line-height: 1.55;
}
:where(.shell) :is(.flash, .notice)::before {
  content: ''; flex: none; inline-size: 20px; block-size: 20px; margin-block-start: 1px; background-color: currentColor;
  -webkit-mask: var(--ico, var(--is-info)) center / contain no-repeat; mask: var(--ico, var(--is-info)) center / contain no-repeat;
}
.flash-ok, .notice-ok { background: var(--st-ok-bg); color: var(--st-ok-fg); --ico: var(--is-check); }
.flash-warn, .notice-warn { background: var(--st-turn-bg); color: var(--st-turn-fg); --ico: var(--is-warn); }
.flash-bad, .notice-bad { background: var(--danger-bg); color: var(--danger); --ico: var(--is-alert); }
.flash-info, .notice-info { background: var(--st-sent-bg); color: var(--st-sent-fg); --ico: var(--is-info); }
.notice > :first-child { margin-block-start: 0; }
.notice > :last-child { margin-block-end: 0; }
/* Muted info lines (a held order, the self test): a side rule. */
.held-note, .test-note { border-inline-start: 3px solid var(--line-2); padding-inline-start: var(--s-3); }
.held-note { border-inline-start-color: var(--st-turn-dot); }
.test-note { border-inline-start-color: var(--st-sent-fg); }

/* 15. Dialog ----------------------------------------------------------------------------------------------- */
/* The layout's <dialog id="ak-dialog" class="dialog"> (form[data-confirm], never confirm()). */
.dialog {
  border: 0; border-radius: var(--r-xl); padding: var(--s-6); inline-size: min(92vw, 420px);
  color: var(--ink); background: var(--surface); box-shadow: var(--e-2), 0 24px 64px -16px rgba(13, 27, 42, .4);
}
.dialog::backdrop { background: rgba(13, 27, 42, .45); }
.dialog p { font-weight: 500; font-size: var(--fs-18); line-height: 1.5; margin-block: 0 var(--s-2); }
.dialog .actions { margin-block-start: var(--s-5); }
.dialog .actions .btn { flex: 1 1 0; }
.dialog[open] { animation: ak-pop .2s var(--ease); }
@keyframes ak-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* 16. Tables, definition lists, history, quotes ------------------------------------------------------------ */
/* A wide table scrolls inside its own region (div.table-scroll role="region" tabindex="0"), never the
   page; the table keeps display: table (Safari / VoiceOver). */
.table-scroll { max-inline-size: 100%; overflow: auto; margin-block: var(--s-2) var(--s-4); border-radius: var(--r-md); }
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.main table { inline-size: 100%; min-inline-size: 30rem; border-collapse: collapse; font-size: var(--fs-14); }
.main th, .main td {
  padding-block: 10px; padding-inline: 12px; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top;
  overflow-wrap: break-word;
}
.main th { font-weight: 600; font-size: var(--fs-12); color: var(--ink-2); white-space: nowrap; background: var(--bg); }
.main td code { white-space: nowrap; }
/* <dl class="kv"><dt>…</dt><dd>…</dd>…</dl>: label / value pairs. */
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); margin: 0; font-size: var(--fs-14); }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 500; min-inline-size: 0; }
/* A timeline: <ul class="history"><li>…</li></ul>. */
.history { list-style: none; margin: 0; padding: 0; }
.history li {
  position: relative; padding-block: 10px; padding-inline-start: var(--s-6); border-block-end: 1px solid var(--line);
  font-size: var(--fs-14);
}
.history li::before {
  content: ''; position: absolute; inset-inline-start: 4px; inset-block-start: 17px; inline-size: 10px; block-size: 10px;
  border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--brand-500);
}
.history li:last-child { border-block-end: 0; }
/* A quoted buyer / seller text. */
.quote {
  display: block; background: var(--bg); border-radius: var(--r-md); padding-block: 8px; padding-inline: 12px;
  margin-block-start: var(--s-1); white-space: pre-line;
}

/* 17. Empty state ------------------------------------------------------------------------------------------ */
/* <div class="empty"><p>…</p></div> (a second .empty right after it is its sub-line). */
.empty { text-align: center; color: var(--ink-2); padding-block: var(--s-10); padding-inline: var(--s-4); }
.empty + .empty { padding-block-start: 0; margin-block-start: calc(var(--s-6) * -1); }
:where(.shell) .empty:not(.empty + .empty)::before {
  content: ''; display: block; inline-size: 64px; block-size: 64px; margin-block: 0 var(--s-4); margin-inline: auto;
  border-radius: 50%; background: var(--it-inbox) center / 30px no-repeat, var(--brand-50);
}
.card.empty { padding-block: var(--s-10); }

/* 18. Stepper, price, badge, icon button, avatar ----------------------------------------------------------- */
/* <div class="stepper"><button type="button" aria-label=…>{icon('minus')}</button><output>2</output><button …>{icon('plus')}</button></div> */
.stepper { display: inline-flex; align-items: center; border-radius: var(--r-pill); background: var(--bg-sunk); padding: 3px; gap: 2px; }
.stepper button {
  position: relative; inline-size: 44px; block-size: 44px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink);
  display: grid; place-items: center; box-shadow: 0 1px 2px rgba(13, 27, 42, .1);
}
.stepper button .ic { inline-size: 18px; block-size: 18px; stroke-width: 2.2; }
.stepper button:disabled { background: transparent; box-shadow: none; color: var(--ink-3); cursor: not-allowed; }
.stepper output { min-inline-size: 32px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
/* The small stepper keeps a 32 px circle; an invisible ring around it makes the hit area 44 px. */
.stepper.sm button { inline-size: 32px; block-size: 32px; }
.stepper.sm button::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
/* <span class="price"><b>18</b><small>دينار</small></span> */
.price { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 600; white-space: nowrap; }
.price b { font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { font-size: .72em; font-weight: 500; color: var(--ink-2); }
.price-off b { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-2); }
/* A count on an icon button: <span class="badge">3</span>. */
.badge {
  position: absolute; inset-block-start: 3px; inset-inline-end: 1px; min-inline-size: 19px; block-size: 19px; padding-inline: 5px;
  border-radius: var(--r-pill); background: var(--brand-600); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px var(--surface);
}
/* A round 48 px icon-only button: <button class="icon-btn" aria-label=…>{icon(…)}</button>. */
.icon-btn {
  display: inline-grid; place-items: center; inline-size: var(--tap); block-size: var(--tap); border-radius: var(--r-pill);
  border: 0; background: transparent; color: inherit; position: relative; flex: none; text-decoration: none;
}
.icon-btn:hover { background: rgba(13, 27, 42, .06); }
.icon-btn.on-ink:hover { background: rgba(255, 255, 255, .1); }
/* A round initial: <span class="av" aria-hidden="true">ف</span>. */
.av {
  display: inline-grid; place-items: center; flex: none; inline-size: 44px; block-size: 44px; border-radius: 50%;
  background: var(--bg-sunk); color: var(--ink-2); font-weight: 600;
}

/* 19. Toast, sheet, scrim (a page script toggles .show / .open) -------------------------------------------- */
.toast {
  position: fixed; z-index: 80; inset-inline: 0; margin-inline: auto; inset-block-start: 16px; inline-size: max-content;
  max-inline-size: calc(100% - 32px); display: flex; align-items: center; gap: var(--s-3);
  padding-block: 10px; padding-inline: 12px 18px; border-radius: var(--r-pill); background: var(--ink); color: #fff;
  box-shadow: var(--e-2); font-size: var(--fs-14); font-weight: 500;
  transform: translateY(-140%); opacity: 0; transition: transform .35s var(--ease), opacity .25s;
}
.toast.show { transform: none; opacity: 1; }
.toast .tick { inline-size: 28px; block-size: 28px; border-radius: 50%; background: var(--brand-500); display: grid; place-items: center; }
.toast a { color: var(--brand-300); font-weight: 600; padding-block: 4px; padding-inline: 8px; }
.scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(13, 27, 42, .42); opacity: 0; pointer-events: none; transition: opacity .3s;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 70; inset-inline: 0; inset-block-end: 0; max-block-size: 92dvh; display: flex; flex-direction: column;
  background: var(--bg); border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl); box-shadow: var(--e-3);
  transform: translateY(105%); transition: transform .4s var(--ease);
}
.sheet.open { transform: none; }
.sheet .grab { inline-size: 40px; block-size: 5px; border-radius: 3px; background: var(--line-2); margin-block: 10px 2px; margin-inline: auto; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding-block: var(--s-2) var(--s-3); padding-inline: var(--s-5); flex: none; }
.sheet-body { overflow-y: auto; padding-block: 0 var(--s-4); padding-inline: var(--s-4); }
.sheet-foot {
  flex: none; padding-block: var(--s-3) calc(var(--s-4) + env(safe-area-inset-bottom)); padding-inline: var(--s-4);
  background: var(--surface); box-shadow: 0 -1px 0 var(--line);
}
@media (min-width: 1024px) {
  .sheet {
    inset-inline: auto; inset-inline-end: 24px; inset-block: 24px; inline-size: 440px; max-block-size: none; border-radius: var(--r-xl);
  }
  [dir="rtl"] .sheet { transform: translateX(-120%); }
  [dir="ltr"] .sheet { transform: translateX(120%); }
  .sheet.open { transform: none; }
}

/* 20. Shell: wrapper and content width --------------------------------------------------------------------- */
/* <div class="shell shell-seller|shell-admin|shell-plain [shell-wide] [has-actionbar]"> (html.js layout). */
.shell { min-block-size: 100dvh; }
.shell-wide { --content-w: 1200px; }
.main {
  max-inline-size: calc(var(--content-w) + 2 * var(--gutter)); margin-inline: auto;
  padding-block: var(--s-4) var(--s-10); padding-inline: var(--gutter);
}
.main img { max-inline-size: 100%; block-size: auto; }
.shell-seller .main { padding-block-end: calc(var(--tabbar-h) + 48px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) {
  :root { --gutter: 40px; }
  .shell-seller, .shell-admin { padding-inline-start: var(--rail-w); }
  .shell-seller .main { padding-block-end: var(--s-10); }
}

/* 21. Shell: the app bar ----------------------------------------------------------------------------------- */
/* Phone: a navy bar with a rounded bottom (brand · store chip · language), the title area under it.
   >= 1024 px: flat, on the canvas, aligned with the content. */
.appbar {
  position: relative; overflow: hidden; background: var(--ink); color: #fff;
  padding-block: max(var(--s-3), env(safe-area-inset-top)) var(--s-5); padding-inline: var(--gutter);
  border-end-start-radius: var(--r-xl); border-end-end-radius: var(--r-xl);
}
.appbar::before {
  content: ""; position: absolute; inset-block-start: -120px; inset-inline-end: -80px; inline-size: 280px; block-size: 280px;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(16, 154, 120, .32), transparent); pointer-events: none;
}
.appbar > * { position: relative; }
.appbar-titled { padding-block-end: var(--s-6); }
.appbar-lift { padding-block-end: var(--s-16); }
/* A card that overlaps the app bar (phone): <section class="card lift">. */
.lift { position: relative; z-index: 2; margin-block-start: -60px; box-shadow: var(--e-2); }
/* A flash on a lifted page floats over the app bar in the card's place; the card then follows it. */
.main:has(> .lift) > .flash:first-child { position: relative; z-index: 3; margin-block-start: -60px; box-shadow: var(--e-2); }
.main > .flash + .lift { margin-block-start: 0; }
.top-row { display: flex; align-items: center; gap: var(--s-3); min-block-size: var(--tap); }
.appbar-spacer { flex: 1 1 auto; }
.appbar .brand { color: #fff; }
.appbar a:focus-visible, .appbar button:focus-visible { outline-color: var(--brand-300); }
/* The store context: <span class="store-chip"><span class="av">ف</span><bdi>فراشة</bdi></span>. It takes the
   room left in the row (the name is never cut while there is room; a very long name ends in an ellipsis). */
.store-chip {
  display: inline-flex; align-items: center; gap: var(--s-2); min-inline-size: 0; flex: 0 1 auto;
  padding-block: 4px; padding-inline: 4px 12px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08); font-size: var(--fs-14); font-weight: 500;
}
.store-chip bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-chip .av { inline-size: 32px; block-size: 32px; background: #F3D9C4; color: #7A3E14; font-weight: 700; font-size: 14px; }
/* The language toggle (a POST form). Under 480 px it keeps its globe and its accessible name (the button's
   text, font-size 0) but drops the visible word, which gives the row back to the logo and the store name. */
.lang-switch { margin: 0; flex: none; }
.btn-lang {
  --h: 44px; padding-inline: 14px; font-size: var(--fs-14); font-weight: 600;
  background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.btn-lang:hover { background: rgba(255, 255, 255, .1); color: #fff; }
:where(.shell) .btn-lang::before {
  content: ''; inline-size: 18px; block-size: 18px; background-color: currentColor;
  -webkit-mask: var(--i-globe) center / contain no-repeat; mask: var(--i-globe) center / contain no-repeat;
}
@media (max-width: 479.98px) {
  .appbar .top-row { gap: var(--s-2); }
  .appbar .btn-lang { font-size: 0; gap: 0; padding-inline: 12px; min-inline-size: var(--tap); justify-content: center; }
}
@media (max-width: 379.98px) {
  .appbar .top-row { gap: 6px; }
  .store-chip { padding-inline: 4px 10px; gap: 6px; }
  .store-chip .av { inline-size: 28px; block-size: 28px; }
}
/* A sub-page's way back: <a class="crumb" href="/orders">الطلبات</a>, the header's own line right under the
   logo row (html.js prints it after the row), so the full logo stays on every page at every width. */
.crumb {
  display: inline-flex; align-items: center; gap: 2px; min-block-size: var(--tap); flex: none;
  padding-inline: 4px 12px; margin-inline-start: -8px; border-radius: var(--r-pill);
  color: rgba(255, 255, 255, .85); font-size: var(--fs-14); font-weight: 500; text-decoration: none;
}
.appbar > .crumb { display: flex; inline-size: fit-content; max-inline-size: calc(100% + 8px); margin-block: var(--s-1) 0; }
.crumb:hover { background: rgba(255, 255, 255, .08); color: #fff; }
:where(.shell) .crumb::before {
  content: ''; flex: none; inline-size: 24px; block-size: 24px; background-color: currentColor;
  -webkit-mask: var(--i-chev-l) center / contain no-repeat; mask: var(--i-chev-l) center / contain no-repeat;
}
[dir="rtl"] .crumb::before { transform: scaleX(-1); }
/* The admin identity: «الإدارة» next to the brand. */
.admin-badge {
  display: inline-flex; align-items: center; gap: 6px; min-block-size: 28px; padding-inline: 10px; border-radius: var(--r-pill);
  background: rgba(94, 214, 180, .16); color: var(--brand-300); font-size: var(--fs-12); font-weight: 600; white-space: nowrap; flex: none;
}
:where(.shell) .admin-badge::before {
  content: ''; inline-size: 16px; block-size: 16px; background-color: currentColor;
  -webkit-mask: var(--i-shield) center / contain no-repeat; mask: var(--i-shield) center / contain no-repeat;
}
/* The title area: layout({heading, sub, headActions}). */
.head-title { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3); margin-block-start: var(--s-3); }
.head-text { min-inline-size: 0; }
.crumb + .head-title { margin-block-start: var(--s-1); }
.appbar .title { font-size: var(--fs-28); font-weight: 600; letter-spacing: -.01em; margin: 0; color: inherit; }
.appbar .sub { color: rgba(255, 255, 255, .66); font-size: var(--fs-14); margin-block: 2px 0; }
.head-actions { display: none; }
@media (min-width: 1024px) {
  .appbar {
    background: transparent; color: var(--ink); overflow: visible; border-radius: 0;
    max-inline-size: calc(var(--content-w) + 2 * var(--gutter)); margin-inline: auto;
    padding-block: var(--s-8) var(--s-2); padding-inline: var(--gutter);
  }
  .appbar::before { display: none; }
  .appbar-titled, .appbar-lift { padding-block-end: var(--s-2); }
  .lift { margin-block-start: 0; box-shadow: var(--e-1); }
  .main:has(> .lift) > .flash:first-child { margin-block-start: 0; box-shadow: none; }
  .appbar .brand { color: var(--ink); }
  .appbar .sub { color: var(--ink-2); }
  .appbar a:focus-visible, .appbar button:focus-visible { outline-color: var(--focus); }
  .appbar .store-chip { background: var(--surface); box-shadow: var(--e-1); }
  .appbar .btn-lang { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
  .appbar .btn-lang:hover { background: var(--bg-sunk); }
  .crumb { color: var(--ink-2); }
  .crumb:hover { background: rgba(13, 27, 42, .06); color: var(--ink); }
  .admin-badge { background: var(--brand-50); color: var(--brand-700); }
  .head-title { align-items: center; margin-block-start: var(--s-2); }
  .head-actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; justify-content: flex-end; }
}

/* 22. Shell: the seller tab bar (phone and tablet, < 1024 px) ----------------------------------------------- */
/* <nav class="nav"> after the header: «الطلبات» · «طلب جديد» (the gradient tile) · «الشحن» · «المزيد» (a
   <details class="nav-more">, no JS, its menu a bottom sheet). Links are text only: the icons come from the
   href (section 23 sets --ico). The current tab: aria-current="page" (a pill); on a «المزيد» page the summary
   is marked (.nav-more-active). */
.shell-seller > .nav {
  position: fixed; z-index: 50; inset-inline: 12px; inset-block-end: calc(12px + env(safe-area-inset-bottom));
  max-inline-size: 560px; margin-inline: auto; block-size: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex-wrap: nowrap; padding: 6px; border-radius: 26px;
  background: var(--surface); box-shadow: var(--e-2), 0 0 0 1px rgba(13, 27, 42, .05);
}
.nav > a, .nav-more > summary {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  padding-block: 4px 0; padding-inline: 2px; border-radius: 20px; white-space: nowrap;
  color: var(--ink-2); font-size: var(--fs-12); font-weight: 500; line-height: 1.4; text-decoration: none;
  cursor: pointer; list-style: none;
}
.nav > a:hover, .nav-more > summary:hover { color: var(--ink); }
.nav > a:focus-visible, .nav-more > summary:focus-visible { outline-offset: -2px; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-caret { display: none; }
:where(.shell) :is(.nav > a, .nav-more > summary, .nav-menu a, .rail a)::before {
  content: ''; flex: none; inline-size: 56px; block-size: 32px; background-color: currentColor;
  -webkit-mask: var(--ico) center / 24px 24px no-repeat; mask: var(--ico) center / 24px 24px no-repeat;
}
.shell-seller > .nav > a[aria-current="page"], .shell-seller > .nav > .nav-more-active > summary {
  color: var(--brand-700); font-weight: 600; background: var(--pill-tab) 50% 4px / 56px 32px no-repeat;
}
/* «طلب جديد»: the gradient tile with a white plus (no mask). */
:where(.shell) :is(.nav > a, .rail a):is([href="/paste"], [href="/orders/new"])::before {
  inline-size: 40px; block-size: 32px; border-radius: 12px; -webkit-mask: none; mask: none;
  background: var(--iw-new) center / 22px no-repeat, var(--grad-brand); box-shadow: 0 6px 14px -6px rgba(10, 127, 98, .9);
}
.shell-seller > .nav > a:is([href="/paste"], [href="/orders/new"])[aria-current="page"] { background: none; }
/* «المزيد» as a bottom sheet over a dimmed page; a tap on the dim area closes it (the summary's ::after). */
.nav-more { position: relative; flex: none; display: flex; }
.nav-more > summary { flex: 1; }
.nav-more[open] > summary::after {
  content: ''; position: fixed; inset: 0; z-index: 1; background: rgba(13, 27, 42, .42); cursor: default;
}
.nav-menu {
  position: fixed; z-index: 2; inset-inline: 0; inset-block-end: 0; max-inline-size: 600px; margin-inline: auto;
  max-block-size: 82dvh; overflow: auto; display: flex; flex-direction: column; gap: 2px;
  padding-block: var(--s-2) calc(var(--s-4) + env(safe-area-inset-bottom)); padding-inline: var(--s-3);
  background: var(--surface); border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl); box-shadow: var(--e-3);
}
.nav-menu::before {
  content: ''; flex: none; inline-size: 40px; block-size: 5px; border-radius: 3px; background: var(--line-2);
  margin-block: 4px var(--s-3); margin-inline: auto;
}
.nav-more[open] > .nav-menu { animation: ak-sheet .3s var(--ease); }
@keyframes ak-sheet { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.nav-menu a {
  display: flex; align-items: center; gap: var(--s-3); min-block-size: 56px; padding-inline: var(--s-2) var(--s-4);
  border-radius: var(--r-md); color: var(--ink); font-size: var(--fs-16); font-weight: 500; text-decoration: none;
}
.nav-menu a::before { inline-size: 40px; block-size: 40px; background-color: var(--ink-2); }
.nav-menu a:hover { background: var(--bg); color: var(--ink); }
.nav-menu a[aria-current="page"] { background: var(--brand-50); color: var(--brand-800); font-weight: 600; }
.nav-menu a[aria-current="page"]::before { background-color: var(--brand-700); }
/* The icons, chosen by href (seller, then admin). */
:is(.nav, .rail) a[href="/orders"] { --ico: var(--i-inbox); }
:is(.nav, .rail) a[href="/ship"] { --ico: var(--i-truck); }
.nav-more > summary { --ico: var(--i-grid); }
:is(.nav, .rail) a[href="/products"] { --ico: var(--i-box); }
:is(.nav, .rail) a[href="/upload"] { --ico: var(--i-upload); }
:is(.nav, .rail) a[href="/subscription"] { --ico: var(--i-card); }
:is(.nav, .rail) a[href="/settings"] { --ico: var(--i-sliders); }
:is(.nav, .rail) a[href="/help"] { --ico: var(--i-help); }
:is(.nav-menu, .rail) a[href="/admin"] { --ico: var(--i-shield); }
.shell-admin .nav a[href="/admin"] { --ico: var(--i-users); }
.nav a[href="/admin/waitlist"] { --ico: var(--i-hourglass); }
.nav a[href="/admin/switches"] { --ico: var(--i-toggle); }
.nav a[href="/admin/caps"] { --ico: var(--i-gauge); }
.nav a[href="/admin/health"] { --ico: var(--i-pulse); }
.nav a[href="/admin/selfserve"] { --ico: var(--i-store); }
.nav a[href="/admin/payments"] { --ico: var(--i-cash); }
.nav a[href="/admin/number"] { --ico: var(--i-phone); }
[dir="rtl"] :is(.nav, .rail) a[href="/ship"]::before { transform: scaleX(-1); }
@media (min-width: 1024px) {
  .shell-seller > .nav { display: none; }
}

/* 23. Shell: the rail (desktop, >= 1024 px) ---------------------------------------------------------------- */
/* Seller: <nav class="rail"> (the mark, the row links, a separator, the «المزيد» links shown flat, the store's
   initial). Admin: its <nav class="nav"> becomes the same rail. Below 1024 px the seller rail is hidden. */
.rail { display: none; }
:where(.shell) :is(.rail, .shell-admin .nav) > .rail-mark::before { content: none; }
@media (min-width: 1024px) {
  .rail, .shell-admin .nav {
    position: fixed; z-index: 40; inset-block: 0; inset-inline-start: 0; inline-size: var(--rail-w);
    display: flex; flex-direction: column; align-items: center; gap: var(--s-1); overflow-y: auto; scrollbar-width: none;
    padding-block: var(--s-5); padding-inline: var(--s-2); margin: 0; background: var(--ink); color: rgba(255, 255, 255, .72);
  }
  .rail a, .shell-admin .nav > a {
    inline-size: 84px; flex: none; padding-block: 8px; padding-inline: 2px; border-radius: 18px;
    display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; white-space: normal;
    font-size: var(--fs-12); font-weight: 500; line-height: 1.3; color: inherit; text-decoration: none; position: relative;
    transition: background-color .15s, color .15s; background: none; box-shadow: none; min-block-size: 0;
  }
  :where(.shell) :is(.rail a, .shell-admin .nav > a)::before { inline-size: 44px; block-size: 32px; }
  .rail a:hover, .shell-admin .nav > a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  .rail a[aria-current="page"], .shell-admin .nav > a[aria-current="page"] { background: rgba(94, 214, 180, .14); color: #fff; }
  .rail a[aria-current="page"]::before, .shell-admin .nav > a[aria-current="page"]::before { background-color: var(--brand-300); }
  .rail a:focus-visible, .shell-admin .nav > a:focus-visible { outline-color: var(--brand-300); outline-offset: -2px; }
  /* The real mark at the top of both rails (seller <nav class="rail">, admin <nav class="nav">): its navy
     square gets a hairline so it reads on the navy rail. */
  :is(.rail, .shell-admin .nav) > .rail-mark {
    flex: none; inline-size: auto; min-block-size: 0; padding: 0; border-radius: 12px; margin-block: 0 var(--s-5); background: none;
  }
  :is(.rail, .shell-admin .nav) > .rail-mark .logo { inline-size: 44px; block-size: 44px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); border-radius: 12px; }
  :is(.rail, .shell-admin .nav) > .rail-mark:hover { background: none; filter: brightness(1.15); }
  .rail-sep { flex: none; inline-size: 40px; block-size: 1px; background: rgba(255, 255, 255, .12); margin-block: var(--s-3); }
  .rail-spacer { flex: 1 1 auto; min-block-size: var(--s-4); }
  .rail-me {
    flex: none; display: grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 50%;
    background: #F3D9C4; color: #7A3E14; font-weight: 700;
  }
}

/* 24. Shell: the admin nav on a phone (< 1024 px): a row of chips in the app bar that scrolls sideways. */
@media (max-width: 1023.98px) {
  .shell-admin .nav {
    display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap;
    margin-block: var(--s-3) 0; margin-inline: calc(var(--gutter) * -1); padding-block: 2px; padding-inline: var(--gutter);
  }
  .shell-admin .nav::-webkit-scrollbar { display: none; }
  /* The rail's mark: the phone bar already shows the full logo right above the chips. */
  .shell-admin .nav > .rail-mark { display: none; }
  .shell-admin .nav > a {
    flex: none; flex-direction: row; gap: 6px; min-block-size: 44px; padding-block: 0; padding-inline: 10px 14px;
    border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .82);
    font-size: var(--fs-14); align-items: center;
  }
  :where(.shell) .shell-admin .nav > a::before { inline-size: 20px; block-size: 20px; -webkit-mask-size: 20px 20px; mask-size: 20px 20px; }
  .shell-admin .nav > a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
  /* The current section's chip is never off-screen (review fix X1.7, no JS, DOM / keyboard order unchanged):
     it is sticky inside the scroller, so when it would sit past either edge it stays pinned at that edge
     (a navy ring separates it from the chips that slide under it). The end offset clears the fade mask
     (admin.css section 12). */
  .shell-admin .nav > a[aria-current="page"] {
    background: #fff; color: var(--ink); font-weight: 600;
    position: sticky; z-index: 1; inset-inline-start: var(--gutter); inset-inline-end: 28px; box-shadow: 0 0 0 6px var(--ink);
  }
  .shell-admin .nav > a:focus-visible { outline-color: var(--brand-300); }
}

/* 25. Shell: the action bar of a sub-page (layout({actionBar})) -------------------------------------------- */
/* Phone: fixed at the bottom in place of the tab bar. Desktop: a floating bar that sticks to the bottom of
   the content column. */
.actionbar {
  position: fixed; z-index: 50; inset-inline: 0; inset-block-end: 0; display: grid; gap: var(--s-2);
  padding-block: var(--s-3) calc(var(--s-4) + env(safe-area-inset-bottom)); padding-inline: var(--s-4);
  background: var(--surface); border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl);
  box-shadow: 0 -1px 0 var(--line), 0 -12px 32px -12px rgba(13, 27, 42, .18);
}
.actionbar form { margin: 0; display: grid; }
.actionbar .btn-danger-text, .actionbar .btn-danger { --h: 44px; }
.has-actionbar > .nav { display: none; }
.shell.has-actionbar .main { padding-block-end: 200px; }
@media (min-width: 1024px) {
  .actionbar {
    position: sticky; inset-inline: auto; inset-block-end: var(--s-4); display: flex; flex-wrap: wrap; align-items: center;
    justify-content: flex-end; gap: var(--s-3); max-inline-size: var(--content-w); margin-block: 0 var(--s-6); margin-inline: auto;
    padding: var(--s-3); border-radius: var(--r-lg); box-shadow: var(--e-2);
  }
  .actionbar form { display: block; }
  .actionbar .btn-block { inline-size: auto; }
  .shell.has-actionbar .main { padding-block-end: var(--s-6); }
}

/* 26. Shell: logged-out pages (login, join, help, error pages): the navy bar, the brand alone. */
.shell-plain .appbar-row { justify-content: center; }
.shell-plain .appbar-spacer { display: none; }
@media (min-width: 1024px) {
  .shell-plain .appbar { padding-block: var(--s-6) var(--s-2); }
}

/* 27. Direction -------------------------------------------------------------------------------------------- */
[dir="rtl"] .mirror { transform: scaleX(-1); }
/* Readex Pro covers Latin too: the same family in English pages. */
[dir="ltr"] body { font-family: var(--font); }
/* Text the buyer or the seller wrote is often Arabic: each line takes its own direction inside an English page. */
[dir="ltr"] .wa-card, [dir="ltr"] .quote { unicode-bidi: plaintext; text-align: start; }
[dir="ltr"] .store-chip bdi { unicode-bidi: plaintext; }

/* 28. Reduced motion: motion is a help only. --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
