Tokens
Every value a theme owns, and the one that decides a page’s whole shape.
A component reads the theme through CSS custom properties and never hardcodes a value the theme should own. Read every one with a fallback, so the component still renders if a theme leaves it unset.
Colour
--theme-accent- The one saturated colour.
--theme-accent-foreground- What reads on it.
--theme-bg- The page.
--theme-surface- A panel on the page.
--theme-text- Body ink.
--theme-muted- Secondary ink.
--theme-border- Hairlines and edges.
Type
--theme-heading-font- Display family.
--theme-body-font- Text family.
--theme-base-size- The root size everything is derived from.
--theme-scale- The ratio between steps — 1.2 is quiet, 1.333 is loud.
--theme-tracking-ok- 1 in Latin, 0 in a joining script. Multiply your own tracking by it.
Space
--theme-container- Page width. Not the same as the line width.
--theme-measure- LINE width. Every reference caps prose independently of the grid — a heading set to the container runs to 120 characters on a wide screen and stops being readable somewhere around 75.
--theme-section-top / -bottom- Asymmetric on purpose. A larger top than bottom is what makes consecutive bands read as a sequence rather than a stack of equal slabs, and reversing it is what makes a closing call-to-action feel like an ending.
--theme-gap-tight / --theme-gap / --theme-gap-loose- Three tiers, separated strictly by content type: an 8px chip cloud against a 64px about-split. One gap collapses a six-step ladder into one rung.
--theme-rail- The width of a persistent side rail, or 0px. This is the one layout decision a component cannot make — your CSS is scoped to your own instance, so a fixed column can cover its siblings but not push them across. The page shell pads by this.
Shape and motion
--theme-radius-sm / --theme-radius / --theme-radius-lg- By role, not one number. A theme with square cards and round buttons is expressible; a single radius flattens that to one decision.
--theme-border-width- Hairline or a real edge.
--theme-shadow-card / -button- Elevation.
--theme-motion-duration- 0ms when the theme disables animation. Read it rather than writing your own duration, or a theme that turns motion off still animates.
The label device
Marking an element class="cmp-label" gives it the theme’s chosen eyebrow treatment. The variables behind it — --theme-label-transform, -tracking, -weight, -size, -mark-w, -mark-h, -mark-r, -colour — are set by labelStyle and resolved per script. You should not read them directly; the class is the interface.