# Tokens

Design tokens in three tiers, rendered from the token source.

Components read component tokens, component tokens point at semantic roles,
and semantic roles point at primitive scales or at a Fumadocs `--color-fd-*`
variable. A theme is one file in `src/tokens/themes`; `bun run gen:tokens` writes
the stylesheet and [a JSON export](/tokens/default.json) from it, and a test
fails when either is stale.

Type and space steps are fluid: each is a `clamp()` between its value at a
360px viewport and its value at 1440px.