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 inapps/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-500orborder-amber-300bypasses the tokens. Use the semantic role:danger,warning,success,accentorvalue, andfg,lineorsurfacefor neutrals. - No
text-black. Text on a filled background uses the fill’s pair token:text-accent-fgonbg-accent,text-value-fgonbg-value,text-warning-fgonbg-warning,text-danger-on-fillonbg-danger. - No arbitrary text sizes such as
text-[13px]ortext-[clamp(...)]. Use a step of the type scale below. - No
text-destructive. Error text and icons usetext-danger-fg;dangeris a fill. - No
stellarcolor class. It was an alias ofaccentand is gone. - No readable text in white at 55% opacity or less, in
apps/web/components/uitoo. Usetext-fg,text-fg-mutedortext-fg-subtle, andtext-fg-disabledfor disabled or decorative text.
- 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 areH 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 byapps/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-gutteris--space-4, the horizontal padding of the page on small screens. - Card padding:
p-cardis--space-5. - Gaps:
--space-2inside a control group,--space-3between rows,--space-6between cards,--space-8between sections. - Interactive height:
min-h-controlis--space-control, 44px. The contrast test asserts the value.Fielduses it at every width.Buttonuses it on small screens and drops to 36px from themdbreakpoint.
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 inapps/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.