/* ============================================================
   xmesh DS · _space.css — radii, spacing, motion (alias layer).

   Radii alias `--md-sys-shape-corner-*`; motion aliases
   `--md-sys-motion-*`. Spacing tokens (`--s-N`) stay primitive — MD3
   has no canonical spacing scale, and the 4px-base xmesh ladder is
   the system primitive that components reference directly.

   Naming: `--s-N` = N×4px (the 4px ladder). `--s-N-5` = N×4+2px (the 2px
   optical grid — half-steps for dense chrome). Every spacing value in a
   component must come from this ladder; `scripts/check-spacing.mjs` enforces
   it (see docs/adr/0003). Genuine sub-grid exceptions (1px hairlines, button
   tight-chrome, documented clearance paddings) live in
   scripts/spacing-allowlist.json, not here.
   ============================================================ */

/* ---------- Radii (alias to MD3 shape corners) ---------- */
:root {
  --r-pill:     var(--md-sys-shape-corner-full);
  --r-composer: var(--md-sys-shape-corner-extra-large);
  --r-bubble:   var(--md-sys-shape-corner-large);
  --r-card:     var(--md-sys-shape-corner-medium);
  --r-field:    var(--md-sys-shape-corner-button);
  --r-btn:      var(--md-sys-shape-corner-button);
  --r-chip:     var(--md-sys-shape-corner-small);
  --r-icon:     var(--md-sys-shape-corner-extra-small);
}

/* ---------- Spacing — 4px base + 2px half-steps (xmesh primitive scale) ---------- */
:root {
  /* 4px ladder — --s-N = N×4px */
  --s-1:   4px;
  --s-2:   8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-7:  28px;
  --s-8:  32px;
  --s-9:  36px;
  --s-10: 40px;
  --s-11: 44px;
  --s-12: 48px;

  /* 2px half-steps — --s-N-5 = N×4+2px (the optical grid for dense chrome) */
  --s-0-5:  2px;
  --s-1-5:  6px;
  --s-2-5: 10px;
  --s-3-5: 14px;
  --s-4-5: 18px;
  --s-5-5: 22px;
}

/* ---------- Motion (alias to MD3 motion tokens) ---------- */
:root {
  --m-fast:     var(--md-sys-motion-duration-short3);
  --m-base:     var(--md-sys-motion-duration-short4);
  --m-slow:     var(--md-sys-motion-duration-medium1);
  --m-ease:     var(--md-sys-motion-easing-standard);
  --m-ease-out: var(--md-sys-motion-easing-emphasized-decelerate);
}
