01 — Foundations

Colors

Sixteen semantic tokens, two themes. Light and dark are the same system inverted: background and foreground swap, border follows foreground, primary lifts from #d3281b to #e2503f, highlight from #56bfa3 to #63cbae, and highlight-foreground stays black in both. primary-foreground-strong is the added on-token for small text on red: the card cream in light, warm ink in dark.

Palette

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

backgroundpage
cardsurface
foregroundink / text
mutedsubtle
muted-foregroundmetadata
primarySwiss Red · accent
highlightPastel Turquoise · highlight
borderborders

Every token, both themes

TokenLightDarkUsage
--background #f5efe0 #000000 Page background. Warm cream in light, black in dark.
--foreground #000000 #f5efe0 Body text, active controls, filled-button fill, chart primary series.
--card #faf6ec #161616 Elevated surface: card, popover. The only depth cue.
--card-foreground #000000 #f5efe0 Text on card surfaces.
--primary #d3281b #e2503f Swiss Red, the primary accent. Action, destructive, ring, real hover signal, emphasized divider, selective card border, Structural Block.
--primary-foreground #f5efe0 #f5efe0 Text on primary at heading size: hero-band title, sidebar wordmark. 3.4:1 in dark, so large text only.
--primary-foreground-strong #faf6ec #1a120e Small text on primary fills: sidebar nav and footer, hero-band labels, hovered Destructive button text. An added on-token, 4.8:1 in dark.
--secondary #000000 #f5efe0 Secondary action background: the inverted ink fill.
--secondary-foreground #f5efe0 #000000 Text on secondary.
--muted #ebe5d5 #1f1f1f Subtle backgrounds: hover fills, code blocks. Not a border color.
--muted-foreground #4a4838 #a8a696 Subdued labels, metadata, placeholders, inactive nav, the dashed chart series.
--border #000000 #f5efe0 Every 1px border, list divider and table rule. Never grey, never an accent.
--input #faf6ec #161616 Input field background. Same step as card.
--ring #d3281b #e2503f Focus ring: 1px in primary, no glow.
--highlight #56bfa3 #63cbae Pastel Turquoise, governed and non-semantic. Decorative reuse and its own smaller Structural Block.
--highlight-foreground #000000 #000000 Text and icons on solid highlight fills. Constant black: Turquoise stays pastel in dark mode.

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

Swiss Red's jobs

  1. 01Action and destructive controls. The Destructive button, the Accent button at rest, the Interactive card at rest.
  2. 02Focus ring. ring, 1px.
  3. 03The real hover signal. Wherever a hover uses an accent color, Red carries the meaning.
  4. 04Emphasized divider. The section-header rule swaps from border to primary for a section that earns it, one or two per page.
  5. 05Selective card border. One card in a set, never a whole grid.
  6. 06Structural Block. One solid red sidebar or hero band per layout, capped at about 25% of the viewport, or one bold red word. See Structural Block.
  7. 07The stripe's middle segment.

Pastel Turquoise's jobs

All decorative. The test for every use: if Turquoise's presence or absence would change what the reader understands about state, it is wrong. The full list, the guardrails and its own Structural Block are on the Highlight page.

Underline Wash at 10%

Tip

A callout panel.

Never: Turquoise on a button, tag, status pip or link as its rest color; Red or Turquoise as a list marker or table rule; both colors on the same element at the same moment.

Contrast

foreground, muted-foreground and highlight-foreground clear 7:1 on their grounds in both themes. Two pairs from the source are kept and flagged: primary on background in light is 4.5:1 exactly, and highlight as text on background in light is 1.95:1, so the hero's turquoise line is decoration only. The third, cream primary-foreground on the dark-mode red at 3.4:1, is resolved by an added on-token rather than a re-tint: primary-foreground-strong is the card cream #faf6ec in light and warm ink #1a120e in dark, 4.8:1 on primary in both, used for every piece of small text on a red fill (this site's sidebar included). primary-foreground stays the brand cream for heading-size text on red.

PairLightDark
foreground on background18.318.3
muted-foreground on background8.18.6
muted-foreground on card8.67.4
primary on background4.55.5
primary-foreground on primary (heading size)4.53.4
primary-foreground-strong on primary4.84.8
highlight-foreground on highlight9.410.7
highlight on background1.910.7

Three guardrails

  • Ink and cream still visually dominate any surface. Accents are seasoning.
  • Red and Turquoise never touch or sit adjacent on the same element. The tri-part stripe is the one spatial exception.
  • One accent per component at any single moment. The dual-accent hover on the Accent button and Interactive card is the one sequential exception: the colors swap, they never coexist.