Skip to content
Foundations · Tokens

Tokens

Every visual decision is a token defined once in src/styles/tokens.css and referenced everywhere else. Click any swatch to copy its var() reference. Hardcoded hex, rgb and pixel font-sizes are not allowed outside this file.

Color

oklch throughout, themed per html.dark / html.light. Ink for content, lines for structure, accent for actions, semantic hues for meaning.

Neutrals

Accent

Accent ramp — unsigned ranges only

Heatmaps, intensity, "more vs less". Pick a contiguous slice; 500 === --accent. Never use for signed values.

Semantic — signed values

Deltas, gains/losses, status. Charts with signed meaning use these exclusively — never the accent.

Chart categorical palette

Multi-series charts assign colors in order — series 0 gets --chart-1. Read them in JS with chartPalette() from lib/charts/palette.ts.


Typography

Perfect-fourth main scale anchored at 16px, with compact named tokens for chart and specimen labels. Fira Sans bold for headings, Inter for body, Fira Code (tabular) for machine content. Fontsource assets are bundled and served locally.

TokenSizeSampleUse
--text-5xs8.5pxAgentReduced-scale mockup labels only
--text-4xs9pxAgentChart axes and compact machine labels
--text-3xs9.5pxAgentCompact navigation and chart captions
--text-2xs10pxAgentMachine captions and specimen labels
--text-xxs10.5pxAgentCompact metadata
--text-xs11pxAgentMeta, eyebrows, tag content, table dense cells
--text-sm13pxAgentUI labels, captions, button text, table cells
--text-base16pxAgentBody prose
--text-md18pxAgentH6, lede paragraphs
--text-lg21pxAgentH5
--text-xl24pxAgentH4
--text-2xl28pxAgentH3, page titles, stat values
--text-3xl32pxAgentH2
--text-4xl42pxAgentH1 (clamps 32→42px)
--text-5xl56pxAgentPublic display headings
--font-sans

Fira Sans

All headings, bold. The brand voice — no exceptions.

--font-body

Inter

Body, labels, buttons, table cells. Regular/medium.

--font-mono

Fira Code

Figures, code, IDs, dates, tool names. Always tabular.


Spacing

4px base. Use tokens, never raw pixels.

--space-14px
--space-28px
--space-312px
--space-416px
--space-520px
--space-624px
--space-832px
--space-1040px
--space-1248px
--space-1664px
--space-2080px

Radii

TokenValueShapeUse
--radius-xs2pxchart marks and progress tracks
--radius-accent3pxselected-edge accents
--radius-sm4pxtags, pills, badges
--radius-md6pxbuttons, inputs, selects
--radius-lg7pxcards, panels, modals
--radius-xl10pxhero figures, mockup frames
--radius-full999pxavatars, dots

Elevation

Cards never have shadows — a 1px --line border is enough. Shadows are reserved for floating elements only.

--shadow-softsubtle lift (floating surfaces only)
--shadow-popdropdowns, popovers, mockups
--shadow-modalmodals only

Motion

Subtle, fast, functional. Transform and opacity only — never layout properties. All animations are disabled under prefers-reduced-motion.

TokenValueUse
--dur-instant80mshover tints, focus rings
--dur-fast140msbutton states, tooltips
--dur-base220mspanel slides, modal entrance
--dur-slow360msdrawers, stream panel
--dur-chart640mschart entrance animations
--ease-standardcubic-bezier(.22,.61,.36,1)default for all transitions
--ease-emphasizedcubic-bezier(.2,0,0,1)entrances that must land firmly
--ease-springcubic-bezier(.34,1.4,.64,1)playful micro-interactions only
.animate-in.d1.d2.d3.d4.d5staggered entrance — reload the page to replay

Rules of use

1

Signed values (deltas, gains/losses) use --positive / --negative / --warning exclusively. Never the accent.

2

Unsigned ranges (heatmaps, intensity) use a contiguous slice of the --accent-* ramp.

3

Multi-series charts assign --chart-1…8 in series order via chartPalette().

4

Buttons, links, focus rings use --accent; hover steps to --accent-deep.

5

Headings are Fira Sans bold. Body is Inter. Machine content is Fira Code tabular. No exceptions.

6

Cards get a 1px border, never a shadow. Shadows only on floating elements.

7

Every interactive element gets the same focus halo: var(--focus-ring).

8

No literal hex/rgb/oklch outside tokens.css. No pixel font-sizes or radii outside the scale, and no !important in canonical CSS.