Components
Foundation
A single base unit drives every gap, padding and margin in the system. Components expose their own spacing token so density can be tuned per instance.
All spacing derives from a single custom property, --spacing: 0.25rem (4px). Tailwind's --spacing(n) function resolves to calc(var(--spacing) * n), so a numeric step n is always n × 4px. Change the base once and the whole system re-scales.
0.52px--spacing(0.5)14px--spacing(1)1.56px--spacing(1.5)28px--spacing(2)2.510px--spacing(2.5)312px--spacing(3)416px--spacing(4)520px--spacing(5)624px--spacing(6)832px--spacing(8)1040px--spacing(10)1248px--spacing(12)1664px--spacing(16)2080px--spacing(20)2496px--spacing(24)Each step maps 1:1 to Tailwind utilities: p-4, gap-6, m-2, size-8.
Components that own internal spacing expose it as a CSS variable derived from the scale. Card sets [--card-spacing:--spacing(4)] and reads it through gap-(--card-spacing) and px-(--card-spacing). Override it on a single instance to change section gaps and insets together.
Use negative margins -mx-(--card-spacing) to make content bleed edge-to-edge while staying aligned with the card inset.