/* zeneon-market — buyer-page tokens (checkpoint 1 · 2026-10-23 · type scale reduced per D74, same day)
   Prefix --zm-. Loaded on the storefront, the checkout, the tracking page, buy.js's button and the badge.
   The product faces (courier app, merchant office, ops office) do NOT load this file — they use qcc-ds (D19).
   Structure: this file = the base every theme shares (type, space, radius, sizes, motion, Zeneon's own colours).
              theme-<name>.css = the palette and the shape overrides of one theme; one theme loads at a time.
              The merchant's accent is written by the server as --zm-accent / --zm-accent-ink / --zm-accent-soft
              from the accent list in theme-<name>.css (never a free hex). */

:root {
  /* ---- Zeneon's own colours: the badge, the guarantee line, nothing else on a merchant's shop ---- */
  --zm-zeneon-ink:        #0A101B;   /* the badge square; Zeneonix ink-950 */
  --zm-zeneon-amber:      #F5AB1B;   /* the badge bar; never text, never a button on buyer pages */
  --zm-zeneon-amber-deep: #8A5A00;   /* "Market" in the lockup; the guarantee line's link; 5.9:1 on white */

  /* ---- Ink ramp (text and lines; shared by every light theme; Zeneonix ramp) ---- */
  --zm-ink-950: #0A101B;  /* body text — 19:1 on white */
  --zm-ink-800: #1D2838;  /* chip text on ink-100 — 13.6:1 */
  --zm-ink-700: #313E52;  /* secondary text — 10.8:1 */
  --zm-ink-600: #4A5A72;  /* muted text, captions — 7.0:1; the lowest text colour allowed */
  --zm-ink-500: #6B7C94;  /* icons that carry no meaning, placeholders only (4.25:1 — not for text) */
  --zm-ink-300: #BDC8D6;  /* strong borders, disabled fills */
  --zm-ink-200: #DAE1EA;  /* borders, hairlines (3:1 is not needed for decorative rules) */
  --zm-ink-150: #E8EDF3;  /* table rules */
  --zm-ink-100: #F1F5F9;  /* chip fill, pressed surface */
  --zm-white:   #FFFFFF;

  /* ---- State colours (one each; the state chips are tonal ink, see below) ---- */
  --zm-ok:        #1E7A4A;  /* "in stock", accepted tick — 5.3:1 on white */
  --zm-ok-soft:   #E3F2EA;
  --zm-danger:    #B42318;  /* errors: wrong code, out of stock, expired — 6.6:1 on white */
  --zm-danger-soft:#FBE9E7;
  --zm-attention: #8A5A00;  /* flags: Disputed, Waiting on courier; the refund countdown — amber-deep, 5.9:1 */
  --zm-attention-soft: #FFF7E8;

  /* ---- Focus ring: solid, 3:1 or better on every surface ---- */
  --zm-focus: #0A101B;
  --zm-focus-ring: 0 0 0 2px var(--zm-white), 0 0 0 4px var(--zm-focus);

  /* ---- Type: IBM Plex Sans Arabic for every script (Latin falls to IBM Plex Sans), Plex Mono for codes and table money ---- */
  --zm-font:      "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, "Segoe UI", sans-serif;
  --zm-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* phone scale (360), D74: titles about 22 px, body 16, labels 13–14, line prices 16; only the total and the order code go larger.
     Latin line-heights; the RTL overrides below add 1 px on titles and body and keep the leading tight. */
  --zm-text-display: 28px; --zm-lh-display: 34px;   /* the price on the product page only — never a checkout or tracking page */
  --zm-text-h1:      22px; --zm-lh-h1: 28px;        /* page title (the shop's name, "Your order from …", "Where should we deliver?") */
  --zm-text-h2:      20px; --zm-lh-h2: 26px;
  --zm-text-h3:      17px; --zm-lh-h3: 24px;        /* product name on its page, card titles, section heads */
  --zm-text-body:    16px; --zm-lh-body: 24px;      /* 1.5 — never below 16 on a phone */
  --zm-text-small:   14px; --zm-lh-small: 20px;     /* helper lines, notes, meta, the policy line, variant labels */
  --zm-text-label:   13px; --zm-lh-label: 18px;     /* labels and eyebrows: mono, +0.14em, uppercase in Latin; Plex Sans Arabic 500, no tracking, in RTL */
  --zm-text-price:   16px; --zm-lh-price: 22px;     /* money on lines and cards: SemiBold, tabular digits, Western digits by default */
  --zm-text-total:   22px; --zm-lh-total: 28px;     /* the cart total: the one money figure allowed larger */
  --zm-text-code:    24px; --zm-lh-code: 30px;      /* order codes: Plex Mono 500, Latin, never localised */
  --zm-tracking-heading: -0.02em;  /* Latin only; 0 in RTL */
  --zm-tracking-label:    0.14em;  /* Latin only; 0 in RTL */
  --zm-weight-regular: 400; --zm-weight-medium: 500; --zm-weight-semibold: 600; --zm-weight-bold: 700;

  /* ---- Space: 4 px base, Zeneonix steps ---- */
  --zm-space-1: 4px;  --zm-space-2: 8px;  --zm-space-3: 12px; --zm-space-4: 16px;
  --zm-space-5: 24px; --zm-space-6: 32px; --zm-space-7: 48px; --zm-space-8: 64px;
  --zm-gutter: 16px;          /* phone side margin (24 px from 768 up) */
  --zm-safe-bottom: 24px;     /* nothing important within this of the screen bottom (gesture bar) */

  /* ---- Radius ---- */
  --zm-radius-sm:   4px;      /* tags, chips' inner */
  --zm-radius-md:   8px;      /* buttons, inputs, the Buy button */
  --zm-radius-lg:  12px;      /* cards, photos, sheets */
  --zm-radius-pill: 999px;    /* state chips, the badge pill, variant chips */
  --zm-radius-mark: 22%;      /* the badge square only */

  /* ---- Sizes ---- */
  --zm-control: 48px;         /* buttons, inputs, quantity stepper, code boxes: min touch target */
  --zm-control-sm: 40px;      /* chips and secondary controls inside a row */
  --zm-badge-sm: 24px; --zm-badge-md: 48px; --zm-badge-lg: 200px;   /* the three badge sizes */
  --zm-photo-card: 1 / 1; --zm-photo-gallery: 4 / 5; --zm-photo-cover: 16 / 9;
  --zm-container: 1240px;

  /* ---- Elevation: borders, not shadows. One shadow, for the floating cart only ---- */
  --zm-shadow-float: 0 6px 24px rgba(10,16,27,0.18), 0 1px 3px rgba(10,16,27,0.12);

  /* ---- Motion (Zeneonix) ---- */
  --zm-ease: cubic-bezier(.2,.7,.2,1);
  --zm-dur-fast: 140ms; --zm-dur: 260ms; --zm-dur-slow: 520ms;
}

/* RTL (Kurdish, Arabic): same tokens, 1 px up on titles and body, no tracking, leading no looser than 1.6 (D74) */
:root:where([dir="rtl"]), [dir="rtl"] {
  --zm-text-h1: 24px;    --zm-lh-h1: 32px;
  --zm-lh-h2: 28px;      --zm-lh-h3: 26px;   --zm-lh-display: 38px;
  --zm-text-body: 17px;  --zm-lh-body: 27px;
  --zm-lh-small: 22px;   --zm-lh-label: 20px; --zm-lh-price: 24px;
  --zm-tracking-heading: 0; --zm-tracking-label: 0;
}

/* Laptop (storefront and legal pages only; the checkout stays a 360–480 centred column) */
@media (min-width: 768px) {
  :root { --zm-gutter: 24px; }
}
@media (min-width: 1280px) {
  :root { --zm-gutter: 56px; --zm-text-h1: 30px; --zm-lh-h1: 38px; --zm-text-display: 36px; --zm-lh-display: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --zm-dur-fast: 0ms; --zm-dur: 0ms; --zm-dur-slow: 0ms; }
}
