---
name: "Citrine IDE"
slug: "citrine-ide"
schema: "freedesignmd/v2"
description: "Warm editor theme in cream and citrine yellow with Bricolage Grotesque headlines and DM Mono code. Built for code-editor products, snippet libraries and developer education."
source: "https://freedesignmd.com/system/citrine-ide"
aesthetic: "warm"
industry: "developer"
default_mode: "light"
fonts:
  display: "Bricolage Grotesque"
  body: "Figtree"
  mono: "DM Mono"
  google_fonts_url: "https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;700&family=Figtree:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap"
colors:
  light:
    background: "#fffbeb"
    foreground: "#2a2210"
    card: "#fffef8"
    cardForeground: "#2a2210"
    muted: "#f6efd3"
    mutedForeground: "#6b5e3a"
    primary: "#f2c200"
    primaryForeground: "#241b00"
    secondary: "#efe6c4"
    secondaryForeground: "#2a2210"
    accent: "#fbe9a1"
    accentForeground: "#4a3900"
    border: "rgba(42,34,16,0.14)"
    input: "rgba(42,34,16,0.3)"
    ring: "#8a6500"
    destructive: "#b8321f"
    destructiveForeground: "#ffffff"
    success: "#3f7a2a"
    successForeground: "#ffffff"
    warning: "#d98a00"
    warningForeground: "#241500"
  dark:
    background: "#1a1610"
    foreground: "#f3ead0"
    card: "#221d14"
    cardForeground: "#f3ead0"
    muted: "#2a2418"
    mutedForeground: "#b5a780"
    primary: "#f7cb2d"
    primaryForeground: "#241b00"
    secondary: "#302919"
    secondaryForeground: "#f3ead0"
    accent: "#3d3214"
    accentForeground: "#ffe38a"
    border: "rgba(243,234,208,0.12)"
    input: "rgba(243,234,208,0.24)"
    ring: "#f7cb2d"
    destructive: "#ff8068"
    destructiveForeground: "#2a0a04"
    success: "#9ccc65"
    successForeground: "#10200a"
    warning: "#f0a030"
    warningForeground: "#241500"
chart:
  light: ["#d9a600", "#b8321f", "#3f7a2a", "#1f7a8a", "#8a3f7a"]
  dark: ["#f7cb2d", "#ff8068", "#9ccc65", "#4fc3d0", "#d58bc8"]
type:
  display: { font: display, size: 72, size_mobile: 40, leading: 1, weight: 700, tracking: "-0.04em" }
  h1: { font: display, size: 44, size_mobile: 30, leading: 1.05, weight: 700, tracking: "-0.03em" }
  h2: { font: display, size: 28, size_mobile: 22, leading: 1.2, weight: 700, tracking: "-0.02em" }
  h3: { font: display, size: 19, size_mobile: 19, leading: 1.3, weight: 500, tracking: "-0.01em" }
  body: { font: body, size: 16, size_mobile: 16, leading: 1.6, weight: 400, tracking: "0em" }
  small: { font: body, size: 14, size_mobile: 14, leading: 1.5, weight: 400, tracking: "0em" }
  label: { font: body, size: 12, size_mobile: 12, leading: 1.3, weight: 600, tracking: "0.02em" }
  mono: { font: mono, size: 13, size_mobile: 13, leading: 1.6, weight: 400, tracking: "0em" }
spacing: [4, 8, 12, 16, 24, 32, 48, 64, 96, 128]
radius: { sm: "4px", md: "8px", lg: "12px", xl: "18px", full: "9999px" }
shadow:
  light:
    sm: "0 1px 0 rgba(42,34,16,0.08)"
    md: "0 6px 18px -6px rgba(90,64,0,0.2), 0 1px 0 rgba(42,34,16,0.06)"
    lg: "0 28px 64px -20px rgba(90,64,0,0.38), 0 0 0 1px rgba(42,34,16,0.1)"
  dark:
    sm: "0 0 0 1px rgba(243,234,208,0.06)"
    md: "0 0 0 1px rgba(243,234,208,0.1), 0 10px 28px -10px rgba(0,0,0,0.6)"
    lg: "0 0 0 1px rgba(243,234,208,0.14), 0 32px 80px -16px rgba(0,0,0,0.8)"
motion:
  duration_ms: { instant: 70, fast: 130, base: 220, slow: 420 }
  easing: { standard: "cubic-bezier(0.3, 0, 0.2, 1)", out: "cubic-bezier(0.22, 1, 0.36, 1)", in: "cubic-bezier(0.55, 0, 1, 0.45)" }
  reveal: { distance_px: 14, stagger_ms: 60 }
layout: { max_width: 1160, columns: 12, gutter: 24, section_y: 96, section_y_mobile: 56, measure: "62ch" }
extras:
  line-highlight: { light: "rgba(242,194,0,0.2)", dark: "rgba(247,203,45,0.14)" }
---

# Citrine IDE, DESIGN.md

> Warm editor theme in cream and citrine yellow with Bricolage Grotesque headlines and DM Mono code. Built for code-editor products, snippet libraries and developer education.

## How to use this file

1. Save this file as `DESIGN.md` in the project root and paste the `tokens.css` block (section 10) into your global stylesheet, or import `https://freedesignmd.com/system/citrine-ide.css`, which also contains every component class.
2. **Claude Code:** add `Before any UI work, read @DESIGN.md and use only its tokens and component recipes.` to `CLAUDE.md`.
3. **Cursor:** create `.cursor/rules/design.mdc` with `alwaysApply: true` and the line `Follow @DESIGN.md for every color, font, radius, shadow, spacing and duration.`
4. **Lovable:** paste section 10 into `src/index.css` and add this file to Project Knowledge; ask for changes by role name (`primary`, `muted-foreground`), never by hex.
5. Default mode is **light**: dark mode is `class="dark"` on `<html>` (both modes are fully specified). Use semantic names only (`bg-primary`, `text-muted-foreground`, `.btn-primary`, `var(--radius-lg)`); if a value is not in this file, it does not belong in the UI.

## 1. Overview & personality

Citrine IDE is the editor theme you would pick on a sunny afternoon. Surfaces are a buttery cream, ink is a dark brown-black, and the accent is citrine, a saturated yellow used as a highlighter: selected line, active tab, primary button. Yellow is always paired with dark ink text, never white. Bricolage Grotesque gives headlines a friendly, slightly quirky voice, DM Mono sets code, and the combination feels like a craft tool rather than a control panel.

**At a glance**

- Aesthetic: Warm & crafted · Industry: Developer tools · Default mode: light
- Type: Bricolage Grotesque (display) · Figtree (body) · DM Mono (mono)
- Brand color (`primary`): `#f2c200` light · `#f7cb2d` dark, on primary, text is `#241b00` / `#241b00`
- Corners: 4px / 8px / 12px / 18px · Container 1160px · Base motion 220ms

**Signature moves**

- Highlighter yellow: `primary` fills selected lines, active tabs and the main button, always with dark `primary-foreground`
- Cream paper surfaces with warm brown-gray borders instead of cool grays
- Editor chrome as UI: traffic-light-free title bars, line numbers, minimap strips and breadcrumb paths
- Syntax palette drawn from the same warm family: ochre, terracotta, olive, teal and plum
- Headlines with optical-size contrast: heavy Bricolage at large size, medium at small

## 2. Color

Roles follow shadcn/ui naming, so `primary` is always the brand / main-action color and `foreground` is always body text. Every text pair below is WCAG AA (≥ 4.5:1) in both modes.

### Light mode (`:root`)

| Role | CSS variable | Value | Contrast | Usage |
|---|---|---|---|---|
| `background` | `--background` | `#fffbeb` |  | Page canvas |
| `foreground` | `--foreground` | `#2a2210` | 15.17:1 on background | Body text and headings on background |
| `card` | `--card` | `#fffef8` |  | Cards, panels, popovers |
| `cardForeground` | `--card-foreground` | `#2a2210` | 15.57:1 on card | Text on card |
| `muted` | `--muted` | `#f6efd3` |  | Subtle fills: table headers, code, skeletons |
| `mutedForeground` | `--muted-foreground` | `#6b5e3a` | 5.54:1 on muted | Secondary text, captions, placeholders |
| `primary` | `--primary` | `#f2c200` |  | Brand color: primary buttons, links, focus, active states |
| `primaryForeground` | `--primary-foreground` | `#241b00` | 10.14:1 on primary | Text and icons on primary |
| `secondary` | `--secondary` | `#efe6c4` |  | Secondary buttons and quiet fills |
| `secondaryForeground` | `--secondary-foreground` | `#2a2210` | 12.58:1 on secondary | Text on secondary |
| `accent` | `--accent` | `#fbe9a1` |  | Hover and selected backgrounds (rows, menu items, ghost buttons) |
| `accentForeground` | `--accent-foreground` | `#4a3900` | 9.20:1 on accent | Text on accent |
| `border` | `--border` | `rgba(42,34,16,0.14)` |  | Dividers and card outlines |
| `input` | `--input` | `rgba(42,34,16,0.3)` |  | Input borders |
| `ring` | `--ring` | `#8a6500` |  | Focus ring |
| `destructive` | `--destructive` | `#b8321f` |  | Errors and destructive actions |
| `destructiveForeground` | `--destructive-foreground` | `#ffffff` | 5.98:1 on destructive | Text on destructive |
| `success` | `--success` | `#3f7a2a` |  | Positive status |
| `successForeground` | `--success-foreground` | `#ffffff` | 5.21:1 on success | Text on success |
| `warning` | `--warning` | `#d98a00` |  | Caution status |
| `warningForeground` | `--warning-foreground` | `#241500` | 6.42:1 on warning | Text on warning |
| `chart-1…5` | `--chart-1…5` | `#d9a600` `#b8321f` `#3f7a2a` `#1f7a8a` `#8a3f7a` | | Data series, in this order |

### Dark mode (`.dark`)

| Role | CSS variable | Value | Contrast | Usage |
|---|---|---|---|---|
| `background` | `--background` | `#1a1610` |  | Page canvas |
| `foreground` | `--foreground` | `#f3ead0` | 15.00:1 on background | Body text and headings on background |
| `card` | `--card` | `#221d14` |  | Cards, panels, popovers |
| `cardForeground` | `--card-foreground` | `#f3ead0` | 13.95:1 on card | Text on card |
| `muted` | `--muted` | `#2a2418` |  | Subtle fills: table headers, code, skeletons |
| `mutedForeground` | `--muted-foreground` | `#b5a780` | 6.45:1 on muted | Secondary text, captions, placeholders |
| `primary` | `--primary` | `#f7cb2d` |  | Brand color: primary buttons, links, focus, active states |
| `primaryForeground` | `--primary-foreground` | `#241b00` | 10.99:1 on primary | Text and icons on primary |
| `secondary` | `--secondary` | `#302919` |  | Secondary buttons and quiet fills |
| `secondaryForeground` | `--secondary-foreground` | `#f3ead0` | 12.01:1 on secondary | Text on secondary |
| `accent` | `--accent` | `#3d3214` |  | Hover and selected backgrounds (rows, menu items, ghost buttons) |
| `accentForeground` | `--accent-foreground` | `#ffe38a` | 9.98:1 on accent | Text on accent |
| `border` | `--border` | `rgba(243,234,208,0.12)` |  | Dividers and card outlines |
| `input` | `--input` | `rgba(243,234,208,0.24)` |  | Input borders |
| `ring` | `--ring` | `#f7cb2d` |  | Focus ring |
| `destructive` | `--destructive` | `#ff8068` |  | Errors and destructive actions |
| `destructiveForeground` | `--destructive-foreground` | `#2a0a04` | 7.47:1 on destructive | Text on destructive |
| `success` | `--success` | `#9ccc65` |  | Positive status |
| `successForeground` | `--success-foreground` | `#10200a` | 9.11:1 on success | Text on success |
| `warning` | `--warning` | `#f0a030` |  | Caution status |
| `warningForeground` | `--warning-foreground` | `#241500` | 8.27:1 on warning | Text on warning |
| `chart-1…5` | `--chart-1…5` | `#f7cb2d` `#ff8068` `#9ccc65` `#4fc3d0` `#d58bc8` | | Data series, in this order |

### System extras

| Variable | Light | Dark | Usage |
|---|---|---|---|
| `--line-highlight` | `rgba(242,194,0,0.2)` | `rgba(247,203,45,0.14)` | Background for the selected or current line in code blocks and for search-match rows. |

## 3. Typography

Load fonts with:

```html
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;700&family=Figtree:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap" />
```

| Role | Font | Size (390px → 1440px) | Line height | Weight | Tracking | Style | Class |
|---|---|---|---|---|---|---|---|
| `display` | Bricolage Grotesque | 40px → 72px | 1 | 700 | -0.04em | – | `.type-display` |
| `h1` | Bricolage Grotesque | 30px → 44px | 1.05 | 700 | -0.03em | – | `.type-h1` |
| `h2` | Bricolage Grotesque | 22px → 28px | 1.2 | 700 | -0.02em | – | `.type-h2` |
| `h3` | Bricolage Grotesque | 19px | 1.3 | 500 | -0.01em | – | `.type-h3` |
| `body` | Figtree | 16px | 1.6 | 400 | 0em | – | `.type-body` |
| `small` | Figtree | 14px | 1.5 | 400 | 0em | – | `.type-small` |
| `label` | Figtree | 12px | 1.3 | 600 | 0.02em | – | `.type-label` |
| `mono` | DM Mono | 13px | 1.6 | 400 | 0em | – | `.type-mono` |

- `h1`–`h3` elements map to the roles of the same name; `display` is for one hero headline per page.
- Fluid sizes use `clamp()` between the two values (see `--type-*-size` in tokens.css).
- Only the weights in this table are loaded; never use other weights.

## 4. Spacing & layout

Spacing is a 4px scale. Use these steps only (`--space-N` = N × 4px):

| Token | `--space-1` | `--space-2` | `--space-3` | `--space-4` | `--space-6` | `--space-8` | `--space-12` | `--space-16` | `--space-24` | `--space-32` |
|---|---|---|---|---|---|---|---|---|---|---|
| px | 4 | 8 | 12 | 16 | 24 | 32 | 48 | 64 | 96 | 128 |

- Container: max 1160px, 24px side gutters (`.container`).
- Grid: 12 columns, 24px gap.
- Sections: 96px vertical padding on desktop, 56px on mobile (`.section`).
- Long text: max 62ch per line (`.prose`).
- Editor mock-ups use a 36px tab strip, 22px status bar and a 48px activity rail.
- Marketing sections alternate cream and `muted` bands; never use full-bleed yellow behind body text.
- Code panels sit on `card` with a 1px warm border and 12px inner padding.

## 5. Shape & elevation

| Radius | Value | Use |
|---|---|---|
| `--radius-sm` | 4px | badges, checkboxes, small chips |
| `--radius-md` | 8px | buttons, inputs, tabs (= shadcn `--radius`) |
| `--radius-lg` | 12px | cards, panels, menus |
| `--radius-xl` | 18px | dialogs, hero media, large surfaces |
| `--radius-full` | 9999px | avatars, pills, toggles |

| Shadow | Mode | Value |
|---|---|---|
| `--shadow-sm` | light | `0 1px 0 rgba(42,34,16,0.08)` |
| `--shadow-md` | light | `0 6px 18px -6px rgba(90,64,0,0.2), 0 1px 0 rgba(42,34,16,0.06)` |
| `--shadow-lg` | light | `0 28px 64px -20px rgba(90,64,0,0.38), 0 0 0 1px rgba(42,34,16,0.1)` |
| `--shadow-sm` | dark | `0 0 0 1px rgba(243,234,208,0.06)` |
| `--shadow-md` | dark | `0 0 0 1px rgba(243,234,208,0.1), 0 10px 28px -10px rgba(0,0,0,0.6)` |
| `--shadow-lg` | dark | `0 0 0 1px rgba(243,234,208,0.14), 0 32px 80px -16px rgba(0,0,0,0.8)` |

`sm` = resting card · `md` = hover / raised · `lg` = dialogs and popovers. Nothing else casts a shadow.

## 6. Motion

**Highlighter sweep.** Selections and active states paint in left to right like a highlighter pen: the yellow fill grows from the start edge over the base duration with an ease-out, then holds. Panels rise 14px with a soft stagger.

| Token | Value | Use |
|---|---|---|
| `--duration-instant` | 70ms | press feedback, toggles |
| `--duration-fast` | 130ms | hover, focus, color changes |
| `--duration-base` | 220ms | menus, tabs, popovers, cards lifting |
| `--duration-slow` | 420ms | dialogs and scroll reveals |
| `--ease-standard` | `cubic-bezier(0.3, 0, 0.2, 1)` | state changes |
| `--ease-out` | `cubic-bezier(0.22, 1, 0.36, 1)` | entrances and reveals |
| `--ease-in` | `cubic-bezier(0.55, 0, 1, 0.45)` | exits |

- Scroll reveal (`.reveal` → `.reveal.is-in` via IntersectionObserver): rise 14px and fade over `--duration-slow` with `--ease-out`; siblings stagger by 60ms (`--reveal-index`).
- Use no durations other than the four above.
- `prefers-reduced-motion: reduce` → no transforms, reveals show immediately (included in tokens.css).

## 7. Components

Every component reads only variables from section 10, so light and dark mode work with no extra code. These are the exact rules (also in `https://freedesignmd.com/system/citrine-ide.css`). In React/shadcn projects, put the same declarations on the matching shadcn component variants.

### Button

```html
<button class="btn btn-primary">Save</button>  <!-- btn-secondary · btn-outline · btn-ghost -->
```

```css
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 2px 0 color-mix(in oklab, var(--primary) 60%, black);
}
.btn-primary:hover:not(:disabled) {
  background: color-mix(in oklab, var(--primary) 90%, white);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 0 0 transparent;
}
.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-foreground);
}
.btn-secondary:active:not(:disabled) {
  background: var(--muted);
}
.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--input);
}
.btn-outline:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--ring);
}
.btn-outline:active:not(:disabled) {
  background: var(--secondary);
}
.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--muted);
  color: var(--foreground);
}
.btn-ghost:active:not(:disabled) {
  background: var(--secondary);
}
.btn:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
```

### Input

```html
<input class="input" placeholder="you@company.com" />  <!-- aria-invalid="true" for errors -->
```

```css
.input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard);
}
.input::placeholder {
  color: var(--muted-foreground);
  opacity: 1;
}
.input:hover:not(:disabled):not(:focus) {
  border-color: var(--muted-foreground);
}
.input:focus, .input:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 40%, transparent);
}
.input[aria-invalid="true"] {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 22%, transparent);
}
.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--muted);
}
```

### Card

```html
<article class="card">…</article>  <!-- add card-interactive when the whole card is a link -->
```

```css
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out);
}
.card-interactive:hover {
  border-color: var(--ring);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
```

### Badge

```html
<span class="badge badge-soft" data-tone="success">Paid</span>  <!-- badge-solid · badge-outline; tones: primary (default) · success · warning · destructive -->
```

```css
.badge {
  --tone: var(--primary);
  --tone-foreground: var(--primary-foreground);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0em;
  line-height: 1;
  white-space: nowrap;
}
.badge[data-tone="success"] {
  --tone: var(--success);
  --tone-foreground: var(--success-foreground);
}
.badge[data-tone="warning"] {
  --tone: var(--warning);
  --tone-foreground: var(--warning-foreground);
}
.badge[data-tone="destructive"] {
  --tone: var(--destructive);
  --tone-foreground: var(--destructive-foreground);
}
.badge-solid {
  background: var(--tone);
  color: var(--tone-foreground);
  border: 1px solid var(--tone);
}
.badge-soft {
  background: color-mix(in oklab, var(--tone) 22%, var(--card));
  color: var(--foreground);
  border: 1px solid color-mix(in oklab, var(--tone) 38%, transparent);
}
.badge-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}
```

### Navigation bar

```html
<nav class="nav"><a class="nav-link" aria-current="page">Home</a><a class="nav-link">Docs</a></nav>
```

```css
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 60px;
  padding: 0 24px;
  background: color-mix(in oklab, var(--background) 88%, transparent);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.nav-link {
  padding: 6px 2px;
  margin: 0 10px;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0em;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.nav-link:hover {
  color: var(--foreground);
  border-bottom-color: var(--border);
}
.nav-link[aria-current="page"] {
  color: var(--foreground);
  border-bottom-color: var(--primary);
}
```

### Tabs

```html
<div class="tabs" role="tablist"><button class="tab" role="tab" aria-selected="true">Overview</button>…</div>
```

```css
.tabs {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.tab {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0em;
  transition: color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}
.tab:hover:not([aria-selected="true"]) {
  background: var(--muted);
  color: var(--foreground);
}
.tab[aria-selected="true"] {
  background: var(--primary);
  color: var(--primary-foreground);
}
```

### Table

```html
<table class="table"><thead><tr><th>…</th></tr></thead><tbody><tr><td>…</td></tr></tbody></table>
```

```css
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.table th {
  text-align: left;
  height: 40px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  background: var(--muted);
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
.table td {
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  transition: background-color var(--duration-fast) var(--ease-standard);
}
.table tbody tr:hover td {
  background: var(--accent);
  color: var(--accent-foreground);
}
```

### Dialog / modal

```html
<div class="dialog-overlay"><div class="dialog" role="dialog" aria-modal="true">…</div></div>
```

```css
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42,34,16,0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 24px;
}
.dialog {
  width: min(540px, 100%);
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}
```

### Text link

```html
<a class="link" href="…">Read more</a>
```

```css
.link {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-standard), text-decoration-color var(--duration-fast) var(--ease-standard);
}
.link:hover {
  background: var(--line-highlight);
  text-decoration-color: var(--ring);
}
```

## 8. Imagery & iconography

**Imagery.** Editor screenshots on cream with a 12px radius, a soft warm shadow and a visible line-highlight on the active line. Illustration is limited to hand-drawn underlines and bracket marks in citrine. No stock photos of people at laptops.

**Icons.** 18px rounded line icons at 1.75px stroke (Lucide) in `foreground`; active icons gain a `primary` underline dot. File-type icons use the syntax chart colors.

## 9. Do / Don't

**Do**

- Pair `primary` yellow fills with dark `primary-foreground`, never white
- Use `--line-highlight` for the current line and search matches
- Use `ring` (the deep ochre) for focus and for yellow-on-cream borders
- Set code in DM Mono 13px with 1.6 line height
- Warm every neutral: borders and shadows are brown, not gray

**Don't**

- Don't set yellow text on cream; use it as a fill only
- Don't mix in cool grays or pure black
- Don't use more than one yellow-filled element per viewport region
- Don't use gradients; the highlighter is flat
- Don't use Bricolage below 19px

## 10. tokens.css

Drop-in, shadcn/ui-compatible. Works with Tailwind v4 as-is (the `@theme inline` block creates `bg-primary`, `text-muted-foreground`, `font-heading`, `text-display`, `rounded-ui-lg`, `shadow-ui-md`…). Plain CSS projects can ignore the `@theme` block.

```css
/* Citrine IDE, tokens.css
 * https://freedesignmd.com/system/citrine-ide
 * shadcn/ui-compatible variables. Light on :root, dark on .dark.
 * Default mode: light.
 */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;700&family=Figtree:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap");

:root {
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --type-display-size: clamp(40px, 28.11px + 3.048vw, 72px);
  --type-display-leading: 1;
  --type-display-weight: 700;
  --type-display-tracking: -0.04em;
  --type-h1-size: clamp(30px, 24.80px + 1.333vw, 44px);
  --type-h1-leading: 1.05;
  --type-h1-weight: 700;
  --type-h1-tracking: -0.03em;
  --type-h2-size: clamp(22px, 19.77px + 0.571vw, 28px);
  --type-h2-leading: 1.2;
  --type-h2-weight: 700;
  --type-h2-tracking: -0.02em;
  --type-h3-size: 19px;
  --type-h3-leading: 1.3;
  --type-h3-weight: 500;
  --type-h3-tracking: -0.01em;
  --type-body-size: 16px;
  --type-body-leading: 1.6;
  --type-body-weight: 400;
  --type-body-tracking: 0em;
  --type-small-size: 14px;
  --type-small-leading: 1.5;
  --type-small-weight: 400;
  --type-small-tracking: 0em;
  --type-label-size: 12px;
  --type-label-leading: 1.3;
  --type-label-weight: 600;
  --type-label-tracking: 0.02em;
  --type-mono-size: 13px;
  --type-mono-leading: 1.6;
  --type-mono-weight: 400;
  --type-mono-tracking: 0em;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 9999px;
  --duration-instant: 70ms;
  --duration-fast: 130ms;
  --duration-base: 220ms;
  --duration-slow: 420ms;
  --ease-standard: cubic-bezier(0.3, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --reveal-distance: 14px;
  --reveal-stagger: 60ms;
  --container-max: 1160px;
  --gutter: 24px;
  --section-y: 96px;
  --section-y-mobile: 56px;
  --measure: 62ch;
  --background: #fffbeb;
  --foreground: #2a2210;
  --card: #fffef8;
  --card-foreground: #2a2210;
  --muted: #f6efd3;
  --muted-foreground: #6b5e3a;
  --primary: #f2c200;
  --primary-foreground: #241b00;
  --secondary: #efe6c4;
  --secondary-foreground: #2a2210;
  --accent: #fbe9a1;
  --accent-foreground: #4a3900;
  --border: rgba(42,34,16,0.14);
  --input: rgba(42,34,16,0.3);
  --ring: #8a6500;
  --destructive: #b8321f;
  --destructive-foreground: #ffffff;
  --success: #3f7a2a;
  --success-foreground: #ffffff;
  --warning: #d98a00;
  --warning-foreground: #241500;
  --chart-1: #d9a600;
  --chart-2: #b8321f;
  --chart-3: #3f7a2a;
  --chart-4: #1f7a8a;
  --chart-5: #8a3f7a;
  --shadow-sm: 0 1px 0 rgba(42,34,16,0.08);
  --shadow-md: 0 6px 18px -6px rgba(90,64,0,0.2), 0 1px 0 rgba(42,34,16,0.06);
  --shadow-lg: 0 28px 64px -20px rgba(90,64,0,0.38), 0 0 0 1px rgba(42,34,16,0.1);
  --line-highlight: rgba(242,194,0,0.2);
}

.dark {
  --background: #1a1610;
  --foreground: #f3ead0;
  --card: #221d14;
  --card-foreground: #f3ead0;
  --muted: #2a2418;
  --muted-foreground: #b5a780;
  --primary: #f7cb2d;
  --primary-foreground: #241b00;
  --secondary: #302919;
  --secondary-foreground: #f3ead0;
  --accent: #3d3214;
  --accent-foreground: #ffe38a;
  --border: rgba(243,234,208,0.12);
  --input: rgba(243,234,208,0.24);
  --ring: #f7cb2d;
  --destructive: #ff8068;
  --destructive-foreground: #2a0a04;
  --success: #9ccc65;
  --success-foreground: #10200a;
  --warning: #f0a030;
  --warning-foreground: #241500;
  --chart-1: #f7cb2d;
  --chart-2: #ff8068;
  --chart-3: #9ccc65;
  --chart-4: #4fc3d0;
  --chart-5: #d58bc8;
  --shadow-sm: 0 0 0 1px rgba(243,234,208,0.06);
  --shadow-md: 0 0 0 1px rgba(243,234,208,0.1), 0 10px 28px -10px rgba(0,0,0,0.6);
  --shadow-lg: 0 0 0 1px rgba(243,234,208,0.14), 0 32px 80px -16px rgba(0,0,0,0.8);
  --line-highlight: rgba(247,203,45,0.14);
}

/* Tailwind v4: utilities like bg-primary, text-muted-foreground, font-heading, text-display, rounded-ui-lg, shadow-ui-md */
@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);
  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --font-heading: var(--font-display);
  --font-body: var(--font-sans);
  --font-code: var(--font-mono);
  --radius-ui-sm: var(--radius-sm);
  --radius-ui-md: var(--radius-md);
  --radius-ui-lg: var(--radius-lg);
  --radius-ui-xl: var(--radius-xl);
  --text-display: var(--type-display-size);
  --text-display--line-height: var(--type-display-leading);
  --text-display--letter-spacing: var(--type-display-tracking);
  --text-display--font-weight: var(--type-display-weight);
  --text-h1: var(--type-h1-size);
  --text-h1--line-height: var(--type-h1-leading);
  --text-h1--letter-spacing: var(--type-h1-tracking);
  --text-h1--font-weight: var(--type-h1-weight);
  --text-h2: var(--type-h2-size);
  --text-h2--line-height: var(--type-h2-leading);
  --text-h2--letter-spacing: var(--type-h2-tracking);
  --text-h2--font-weight: var(--type-h2-weight);
  --text-h3: var(--type-h3-size);
  --text-h3--line-height: var(--type-h3-leading);
  --text-h3--letter-spacing: var(--type-h3-tracking);
  --text-h3--font-weight: var(--type-h3-weight);
  --text-body: var(--type-body-size);
  --text-body--line-height: var(--type-body-leading);
  --text-body--letter-spacing: var(--type-body-tracking);
  --text-body--font-weight: var(--type-body-weight);
  --text-small: var(--type-small-size);
  --text-small--line-height: var(--type-small-leading);
  --text-small--letter-spacing: var(--type-small-tracking);
  --text-small--font-weight: var(--type-small-weight);
  --text-label: var(--type-label-size);
  --text-label--line-height: var(--type-label-leading);
  --text-label--letter-spacing: var(--type-label-tracking);
  --text-label--font-weight: var(--type-label-weight);
  --text-mono: var(--type-mono-size);
  --text-mono--line-height: var(--type-mono-leading);
  --text-mono--letter-spacing: var(--type-mono-tracking);
  --text-mono--font-weight: var(--type-mono-weight);
  --shadow-ui-sm: var(--shadow-sm);
  --shadow-ui-md: var(--shadow-md);
  --shadow-ui-lg: var(--shadow-lg);
}

@layer base {
  body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: var(--type-body-size);
    line-height: var(--type-body-leading);
    font-weight: var(--type-body-weight);
    letter-spacing: var(--type-body-tracking);
    -webkit-font-smoothing: antialiased;
  }
  .type-display {
    font-family: var(--font-display);
    font-size: var(--type-display-size);
    line-height: var(--type-display-leading);
    font-weight: var(--type-display-weight);
    letter-spacing: var(--type-display-tracking);
  }
  .type-h1 {
    font-family: var(--font-display);
    font-size: var(--type-h1-size);
    line-height: var(--type-h1-leading);
    font-weight: var(--type-h1-weight);
    letter-spacing: var(--type-h1-tracking);
  }
  .type-h2 {
    font-family: var(--font-display);
    font-size: var(--type-h2-size);
    line-height: var(--type-h2-leading);
    font-weight: var(--type-h2-weight);
    letter-spacing: var(--type-h2-tracking);
  }
  .type-h3 {
    font-family: var(--font-display);
    font-size: var(--type-h3-size);
    line-height: var(--type-h3-leading);
    font-weight: var(--type-h3-weight);
    letter-spacing: var(--type-h3-tracking);
  }
  .type-body {
    font-family: var(--font-sans);
    font-size: var(--type-body-size);
    line-height: var(--type-body-leading);
    font-weight: var(--type-body-weight);
    letter-spacing: var(--type-body-tracking);
  }
  .type-small {
    font-family: var(--font-sans);
    font-size: var(--type-small-size);
    line-height: var(--type-small-leading);
    font-weight: var(--type-small-weight);
    letter-spacing: var(--type-small-tracking);
  }
  .type-label {
    font-family: var(--font-sans);
    font-size: var(--type-label-size);
    line-height: var(--type-label-leading);
    font-weight: var(--type-label-weight);
    letter-spacing: var(--type-label-tracking);
  }
  .type-mono {
    font-family: var(--font-mono);
    font-size: var(--type-mono-size);
    line-height: var(--type-mono-leading);
    font-weight: var(--type-mono-weight);
    letter-spacing: var(--type-mono-tracking);
  }
  h1 {
    font-family: var(--font-display);
    font-size: var(--type-h1-size);
    line-height: var(--type-h1-leading);
    font-weight: var(--type-h1-weight);
    letter-spacing: var(--type-h1-tracking);
  }
  h2 {
    font-family: var(--font-display);
    font-size: var(--type-h2-size);
    line-height: var(--type-h2-leading);
    font-weight: var(--type-h2-weight);
    letter-spacing: var(--type-h2-tracking);
  }
  h3 {
    font-family: var(--font-display);
    font-size: var(--type-h3-size);
    line-height: var(--type-h3-leading);
    font-weight: var(--type-h3-weight);
    letter-spacing: var(--type-h3-tracking);
  }
  code, kbd, samp, pre {
    font-family: var(--font-mono);
  }
  ::selection {
    background: var(--primary);
    color: var(--primary-foreground);
  }
  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .section {
    padding-block: var(--section-y);
  }
  .prose {
    max-width: var(--measure);
  }
  .reveal {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
    transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
    transition-delay: calc(var(--reveal-index, 0) * var(--reveal-stagger));
  }
  .reveal.is-in {
    opacity: 1;
    transform: none;
  }
  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
  }
}
```

Tailwind v3:

```js
// tailwind.config.js, Tailwind v3 (v4 users: the @theme block in tokens.css does this)
module.exports = {
  darkMode: "class",
  theme: {
    extend: {
      colors: {
        "background": "var(--background)",
        "foreground": "var(--foreground)",
        "card": { DEFAULT: "var(--card)", foreground: "var(--card-foreground)" },
        "muted": { DEFAULT: "var(--muted)", foreground: "var(--muted-foreground)" },
        "primary": { DEFAULT: "var(--primary)", foreground: "var(--primary-foreground)" },
        "secondary": { DEFAULT: "var(--secondary)", foreground: "var(--secondary-foreground)" },
        "accent": { DEFAULT: "var(--accent)", foreground: "var(--accent-foreground)" },
        "border": "var(--border)",
        "input": "var(--input)",
        "ring": "var(--ring)",
        "destructive": { DEFAULT: "var(--destructive)", foreground: "var(--destructive-foreground)" },
        "success": { DEFAULT: "var(--success)", foreground: "var(--success-foreground)" },
        "warning": { DEFAULT: "var(--warning)", foreground: "var(--warning-foreground)" },
        chart: { 1: "var(--chart-1)", 2: "var(--chart-2)", 3: "var(--chart-3)", 4: "var(--chart-4)", 5: "var(--chart-5)" },
      },
      fontFamily: { heading: ["var(--font-display)"], body: ["var(--font-sans)"], code: ["var(--font-mono)"] },
      borderRadius: { "ui-sm": "var(--radius-sm)", "ui-md": "var(--radius-md)", "ui-lg": "var(--radius-lg)", "ui-xl": "var(--radius-xl)" },
      boxShadow: { "ui-sm": "var(--shadow-sm)", "ui-md": "var(--shadow-md)", "ui-lg": "var(--shadow-lg)" },
      transitionDuration: { instant: "var(--duration-instant)", fast: "var(--duration-fast)", base: "var(--duration-base)", slow: "var(--duration-slow)" },
      transitionTimingFunction: { standard: "var(--ease-standard)", out: "var(--ease-out)", in: "var(--ease-in)" },
      maxWidth: { container: "var(--container-max)", measure: "var(--measure)" },
    },
  },
};
```

Dependencies: `lucide-react`
