# DESIGN.md — Crème

> Design context for AI coding agents. Paste this file into Cursor, Claude Code, Codex, v0 or Lovable
> before asking for UI, or commit it at your repo root as `DESIGN.md`.

- **Source:** [Crème on CSS Crème](https://csscreme.com/themes/creme-brand)
- **Default mode:** light
- **Tags:** light, minimal, indigo
- **Install as a real shadcn/ui theme:** `npx shadcn@latest add https://csscreme.com/r/creme-brand.json`

The CSS Crème house palette: near-white surfaces, near-black type, a deep indigo primary and a sparing CSSCreme-orange accent. Clean and technical.

---

## Semantic color roles

Six roles carry the identity. Everything else in this file is derived from them.

| Role | Hex | OKLCH | Use it for |
| --- | --- | --- | --- |
| `bg` | `#FBFBFD` | `oklch(98.9% 0.003 286.4)` | page background |
| `surface` | `#FFFFFF` | `oklch(100.0% 0.000 89.9)` | cards, panels, popovers |
| `primary` | `#4F46E5` | `oklch(51.1% 0.230 277.0)` | brand actions: primary buttons, links, focus rings |
| `accent` | `#FF7A3D` | `oklch(72.6% 0.178 43.2)` | secondary emphasis only, never a second primary |
| `text` | `#0E1116` | `oklch(17.7% 0.011 260.6)` | body and heading text |
| `muted` | `#5B6472` | `oklch(50.1% 0.025 259.2)` | secondary text, borders, disabled states |

## Full token set (shadcn/ui, both modes)

Colors are OKLCH (Tailwind v4 / shadcn native). Brand colors are identical in both modes by design:
only the neutrals move, and they keep their hue, so light and dark read as the same design system.

| Token | Light | Dark |
| --- | --- | --- |
| `--background` | `oklch(98.9% 0.003 286.4)` | `oklch(17.9% 0.008 285.5)` |
| `--foreground` | `oklch(17.7% 0.011 260.6)` | `oklch(96.4% 0.001 286.4)` |
| `--card` | `oklch(100.0% 0.000 89.9)` | `oklch(25.2% 0.000 89.9)` |
| `--card-foreground` | `oklch(17.7% 0.011 260.6)` | `oklch(96.4% 0.001 286.4)` |
| `--popover` | `oklch(100.0% 0.000 89.9)` | `oklch(25.2% 0.000 89.9)` |
| `--popover-foreground` | `oklch(17.7% 0.011 260.6)` | `oklch(96.4% 0.001 286.4)` |
| `--primary` | `oklch(51.1% 0.230 277.0)` | `oklch(51.1% 0.230 277.0)` |
| `--primary-foreground` | `oklch(100.0% 0.000 89.9)` | `oklch(100.0% 0.000 89.9)` |
| `--secondary` | `oklch(99.7% 0.000 89.9)` | `oklch(22.7% 0.002 286.2)` |
| `--secondary-foreground` | `oklch(17.7% 0.011 260.6)` | `oklch(96.4% 0.001 286.4)` |
| `--muted` | `oklch(99.7% 0.000 89.9)` | `oklch(22.7% 0.002 286.2)` |
| `--muted-foreground` | `oklch(50.1% 0.025 259.2)` | `oklch(70.5% 0.005 258.3)` |
| `--accent` | `oklch(72.6% 0.178 43.2)` | `oklch(72.6% 0.178 43.2)` |
| `--accent-foreground` | `oklch(15.2% 0.009 285.3)` | `oklch(15.2% 0.009 285.3)` |
| `--destructive` | `oklch(62.6% 0.193 23.0)` | `oklch(62.6% 0.193 23.0)` |
| `--destructive-foreground` | `oklch(15.2% 0.009 285.3)` | `oklch(15.2% 0.009 285.3)` |
| `--border` | `oklch(82.6% 0.009 264.5)` | `oklch(34.5% 0.007 274.8)` |
| `--input` | `oklch(82.6% 0.009 264.5)` | `oklch(34.5% 0.007 274.8)` |
| `--ring` | `oklch(51.1% 0.230 277.0)` | `oklch(51.1% 0.230 277.0)` |

## Typography

- **Headings:** Space Grotesk
- **Body:** Plus Jakarta Sans

## Shape and rhythm

- **Radius:** `14px` (the `--radius` token; derive smaller/larger from it, do not invent new values)
- **Spacing scale:** 4px base · 4 / 8 / 12 / 16 / 24 / 40

## Contrast, measured

Computed from the tokens above in light mode, not asserted. Ratios are WCAG 2.1 relative luminance.

| Pair | Foreground | Background | Ratio | Verdict |
| --- | --- | --- | --- | --- |
| Body text on page background | `#0E1116` | `#FBFBFD` | 18.3:1 | AAA |
| Body text on card | `#0E1116` | `#FFFFFF` | 18.91:1 | AAA |
| Muted text on page background | `#5B6472` | `#FBFBFD` | 5.79:1 | AA |
| Button label on primary | `#ffffff` | `#4F46E5` | 6.29:1 | AA |
| Button label on accent | `#0b0b0f` | `#FF7A3D` | 7.58:1 | AAA |

## Rules for the agent

These are constraints, not suggestions. Each one is checkable against the tables above.

1. **Use only the tokens listed here.** Do not introduce a hex value that is not in the token table. If
   you need an in-between shade, mix two existing tokens rather than inventing a new hue.
2. **`#4F46E5` (primary) is the only call-to-action color.** One primary action per view. `accent`
   is for secondary emphasis and must never be styled as a second primary button.
3. **Never restyle brand colors between light and dark.** Only neutrals change mode. A theme whose
   primary shifts between modes is a different theme.
4. **Respect the radius token.** Every corner derives from `14px`. Mixed radii across a view is
   the most common tell of generated UI.
5. **Stay on the spacing scale.** 4px base · 4 / 8 / 12 / 16 / 24 / 40. No arbitrary pixel values.
6. **Do not drop below the contrast ratios above.** If a combination you need is not in the contrast
   table, compute it before shipping it. Text under 4.5:1 fails AA.
7. **Headings in Space Grotesk, body in Plus Jakarta Sans.** Do not add a third family.
8. **Use the semantic role, not the raw color.** Write `var(--primary)`, never `#4F46E5`, so the
   theme stays swappable.

## CSS variables

Paste into `globals.css`:

```css
:root {
  --background: oklch(98.9% 0.003 286.4);
  --foreground: oklch(17.7% 0.011 260.6);
  --card: oklch(100.0% 0.000 89.9);
  --card-foreground: oklch(17.7% 0.011 260.6);
  --popover: oklch(100.0% 0.000 89.9);
  --popover-foreground: oklch(17.7% 0.011 260.6);
  --primary: oklch(51.1% 0.230 277.0);
  --primary-foreground: oklch(100.0% 0.000 89.9);
  --secondary: oklch(99.7% 0.000 89.9);
  --secondary-foreground: oklch(17.7% 0.011 260.6);
  --muted: oklch(99.7% 0.000 89.9);
  --muted-foreground: oklch(50.1% 0.025 259.2);
  --accent: oklch(72.6% 0.178 43.2);
  --accent-foreground: oklch(15.2% 0.009 285.3);
  --destructive: oklch(62.6% 0.193 23.0);
  --destructive-foreground: oklch(15.2% 0.009 285.3);
  --border: oklch(82.6% 0.009 264.5);
  --input: oklch(82.6% 0.009 264.5);
  --ring: oklch(51.1% 0.230 277.0);
  --radius: 14px;
}

.dark {
  --background: oklch(17.9% 0.008 285.5);
  --foreground: oklch(96.4% 0.001 286.4);
  --card: oklch(25.2% 0.000 89.9);
  --card-foreground: oklch(96.4% 0.001 286.4);
  --popover: oklch(25.2% 0.000 89.9);
  --popover-foreground: oklch(96.4% 0.001 286.4);
  --primary: oklch(51.1% 0.230 277.0);
  --primary-foreground: oklch(100.0% 0.000 89.9);
  --secondary: oklch(22.7% 0.002 286.2);
  --secondary-foreground: oklch(96.4% 0.001 286.4);
  --muted: oklch(22.7% 0.002 286.2);
  --muted-foreground: oklch(70.5% 0.005 258.3);
  --accent: oklch(72.6% 0.178 43.2);
  --accent-foreground: oklch(15.2% 0.009 285.3);
  --destructive: oklch(62.6% 0.193 23.0);
  --destructive-foreground: oklch(15.2% 0.009 285.3);
  --border: oklch(34.5% 0.007 274.8);
  --input: oklch(34.5% 0.007 274.8);
  --ring: oklch(51.1% 0.230 277.0);
}
```

Tailwind v4 maps them into utilities:

```css
@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --radius: var(--radius);
}
```

---

Generated by [CSS Crème](https://csscreme.com) — curated web design, decoded so you can build it.
Every value above is computed from the palette, not written by hand.
