Skip to main content
The tokens live in apps/web/app/globals.css as CSS custom properties on :root, and apps/web/tailwind.config.ts maps them to Tailwind classes. This page is the written reference for that file. bun run check:docs fails when a token is added, removed or changed in the CSS without the same change here, and when a contrast ratio below no longer matches what the contrast test measures. The web app has one dark theme. There is no light theme, so every ratio below is measured against the dark surfaces.

Rules

These apply in apps/web/app and apps/web/components, everywhere except the primitives in apps/web/components/ui, which are the only place allowed to compose raw styling. Enforced by lint (apps/web/eslint.config.mjs), so bun run lint fails on a violation:
  • No raw palette colors. A class such as text-red-400, bg-emerald-500 or border-amber-300 bypasses the tokens. Use the semantic role: danger, warning, success, accent or value, and fg, line or surface for neutrals.
  • No text-black. Text on a filled background uses the fill’s pair token: text-accent-fg on bg-accent, text-value-fg on bg-value, text-warning-fg on bg-warning, text-danger-on-fill on bg-danger.
  • No arbitrary text sizes such as text-[13px] or text-[clamp(...)]. Use a step of the type scale below.
  • No text-destructive. Error text and icons use text-danger-fg; danger is a fill.
  • No stellar color class. It was an alias of accent and is gone.
  • No readable text in white at 55% opacity or less, in apps/web/components/ui too. Use text-fg, text-fg-muted or text-fg-subtle, and text-fg-disabled for disabled or decorative text.
Checked in review only, because no tool enforces them yet:
  • At most one solid accent button per screen. Every other action is the secondary or ghost variant of Button.
  • Every amount uses tabular numerals (tabular-nums), so digits line up across rows and do not shift while a value updates.

Color

Values are H S% L% triples, used as hsl(var(--token)). Each Tailwind color class accepts an opacity modifier, for example bg-accent/10.

Surfaces and lines

Text

Roles

Measured contrast

Ratios follow WCAG 2 relative luminance and are measured by apps/web/tests/unit/tokens-contrast.test.ts, which fails when any pair drops below its minimum. The tables are generated from the same code by bun run docs:tokens; do not edit them by hand. Foreground tokens on each surface: Text on a filled background: danger-fg on the danger callout tint (danger at 10% over the surface):

Spacing and layout

The spacing steps follow Tailwind’s 4px grid. They are defined as tokens so the layout aliases below can refer to them. Layout rules:
  • Gutter: px-gutter is --space-4, the horizontal padding of the page on small screens.
  • Card padding: p-card is --space-5.
  • Gaps: --space-2 inside a control group, --space-3 between rows, --space-6 between cards, --space-8 between sections.
  • Interactive height: min-h-control is --space-control, 44px. The contrast test asserts the value. Field uses it at every width. Button uses it on small screens and drops to 36px from the md breakpoint.

Radius

Elevation

There is no shadow token. Elevation is the surface ladder: --surface-sunken below the page, --bg for the page, --surface for cards and --surface-raised for anything on a card. Every level has one border weight, --line. Two shadows exist in the primitives: Card draws a one-pixel inset highlight in --edge at 8% opacity along its top edge, and Dialog uses Tailwind’s shadow-2xl over a dimmed, lightly blurred scrim.

Motion

Motion only explains a change of state. When the operating system asks for reduced motion, globals.css cuts every animation and transition to 0.01ms.

Type

Three fonts, loaded in apps/web/app/fonts.ts: Bricolage Grotesque for display headings, Manrope for body text and JetBrains Mono for addresses, amounts and plan steps. Sizes come from this scale only.