01 — Foundations

Colors

Thirteen semantic tokens, two themes. Light and dark are the same system inverted: background and foreground swap, border follows foreground, and primary lifts from #8b2e2e to #c04545 so it holds contrast on near-black.

Palette

Semantic tokens — never a raw hex in markup · values update with the theme toggle

backgroundpage
cardsurface
foregroundink / text
mutedsubtle
muted-foregroundmetadata
primaryaccent
primary-foregroundon accent
borderborders

Every token, both themes

TokenLightDarkUsage
--background #f5efe0 #0a0a0a Page background. Warm cream in light, near-black ink in dark.
--foreground #0a0a0a #f5efe0 Body text, active controls, filled-button fill, chart marks.
--card #faf6ec #161616 Elevated surface: card, popover, install panel. The only depth cue.
--card-foreground #0a0a0a #f5efe0 Text on card surfaces.
--primary #8b2e2e #c04545 Blood Red, the lone accent. Four named jobs only.
--primary-foreground #f5efe0 #f5efe0 Text on primary: sidebar nav, hero-band title, hovered accent button.
--secondary #0a0a0a #f5efe0 Secondary action background: the inverted ink fill.
--secondary-foreground #f5efe0 #0a0a0a Text on secondary.
--muted #ebe5d5 #1f1f1f Subtle backgrounds: hover fills, code blocks. Not a border color.
--muted-foreground #4a4a48 #a8a8a0 Subdued labels, metadata, placeholders, inactive nav, secondary chart series.
--border #0a0a0a #f5efe0 Every 1px border, list divider and table rule. Never a grey hairline.
--input #faf6ec #161616 Input field background. Same step as card.
--ring #8b2e2e #c04545 Focus ring: 1px in primary, no glow.

Dark mode is the .dark class on <html>. In Tailwind 4 the variant is @custom-variant dark (&:is(.dark *));, already in theme.css.

Blood Red has four jobs and no others

  1. 01Accent and destructive controls. The Accent and Destructive buttons, the Accent card border and wash, the Interactive card on hover.
  2. 02Focus ring. ring, 1px.
  3. 03Structural Block. One solid red sidebar or hero band per layout, capped at about 25% of the viewport, or one bold red word inside a heading or paragraph. See Structural Block.
  4. 04The segment stripe. Two equal segments, ink then red, 3px tall, at any width. Static and decorative, used a handful of times per page.

Never: list markers, table rules, chart categories, links in body text, or a status meaning on its own. The status pip's warning dot is the one exception already named in that component.

Contrast

Every text pair clears 4.5:1 in both themes except one. primary-foreground on primary in dark mode is 4.4:1, and primary on background in dark mode is 3.9:1. Keep red-on-dark text at the mono label size or above, and keep hovered button text at weight 700 or at 0.75rem+. This is the source's pair and is kept as it is.

PairLightDark
foreground on background17.317.3
muted-foreground on background7.78.3
muted-foreground on card8.27.6
muted-foreground on muted7.16.9
primary on background7.23.9
primary-foreground on primary7.24.4

State without color

Active, inactive, disabled, hover and error are expressed by weight, opacity and contrast. Disabled is always opacity 0.4. A nav link on the red block rests at 0.75 and lifts to 1 on hover. Emphasis is weight 500 or 700. An error is copy and weight, not a red field.

Inactive labelActive label Signal