# Slate Foundations

> Slate color tokens, typography, spacing, sharp corners, elevation, the branded dot grid, and motion, with values read from the app's CSS.

Source: <https://everruns.com/docs/design-system/foundations/>

## Color

The palette is grayscale. Navy (`primary`) carries actions and selection, gold (`accent`) marks the few moments that matter, and the four status colors carry meaning. Everything else is a gray. The values below are read from [`apps/ui/src/app/design-system.css`](https://github.com/everruns/everruns/blob/main/apps/ui/src/app/design-system.css) when this site builds.

### Surfaces and text

| Token                | Light       | Dark          | Use for                                                           |
| -------------------- | ----------- | ------------- | ----------------------------------------------------------------- |
| `--background`       | `0 0% 98%`  | `220 15% 8%`  | Page behind everything, under the dot grid.                       |
| `--foreground`       | `0 0% 10%`  | `0 0% 95%`    | Body text and headings.                                           |
| `--card`             | `0 0% 100%` | `220 15% 10%` | Cards, panes and popovers. Flat, no texture.                      |
| `--card-foreground`  | `0 0% 10%`  | `0 0% 95%`    | Text on cards.                                                    |
| `--popover`          | `0 0% 100%` | `220 15% 10%` | Menus, dialogs, tooltips.                                         |
| `--muted`            | `0 0% 96%`  | `220 15% 15%` | Hover fill and quiet surfaces. Hover is always muted, never gold. |
| `--muted-foreground` | `0 0% 42%`  | `0 0% 65%`    | Secondary text and metadata. AA on both page and muted surface.   |
| `--secondary`        | `0 0% 96%`  | `220 15% 15%` | Quiet neutral fill: secondary badges.                             |
| `--border`           | `0 0% 88%`  | `220 15% 18%` | Every 1px rule and card edge.                                     |
| `--input`            | `0 0% 85%`  | `220 15% 18%` | Form control borders.                                             |

### Brand

| Token                  | Light         | Dark         | Use for                                                                        |
| ---------------------- | ------------- | ------------ | ------------------------------------------------------------------------------ |
| `--primary`            | `220 62% 13%` | `0 0% 95%`   | Navy. Commit buttons, links, the selected-nav marker. Near-white in dark mode. |
| `--primary-foreground` | `0 0% 98%`    | `220 15% 8%` | Text on a navy fill.                                                           |
| `--accent`             | `43 60% 53%`  | `43 60% 53%` | Gold. The create button, the masthead tile wash, user chat turns.              |
| `--accent-foreground`  | `43 60% 30%`  | `43 60% 75%` | Text on a light gold tint (Editing badge).                                     |
| `--ring`               | `43 60% 38%`  | `43 60% 53%` | Focus ring. Deeper gold than the accent in light mode for 3:1 contrast.        |

Gold appears at full strength in one place: the create button. Elsewhere it is a tint: `accent / 0.1` for the masthead icon tile, `accent / 0.12` for a user chat turn, `accent / 0.15` for the Editing badge, and the focus ring. Hover is never gold; it is `muted`.

Never use gold for body text, and never set text on a solid gold surface except the create button’s navy label.

### Status

| Token           | Light         | Dark          | Use for                               |
| --------------- | ------------- | ------------- | ------------------------------------- |
| `--success`     | `163 94% 24%` | `158 64% 52%` | Healthy, enabled, passed.             |
| `--warning`     | `26 90% 37%`  | `43 96% 56%`  | Degraded, waiting, needs attention.   |
| `--info`        | `201 96% 32%` | `198 93% 60%` | Running, informational.               |
| `--destructive` | `0 72% 51%`   | `0 84% 60%`   | Errors and irreversible actions only. |

Use status colors as dots, text, and tints of 12% or less. Each has a `-foreground` pair for text on a solid fill. Destructive is for errors and irreversible actions only.

Raw palette hues are allowed only where they encode categories or order rather than status: chart series, pass-rate and load ramps, workflow event types, file-type and folder icons, model-family labels, favorite stars, and the loading wave.

Status as dot, text, and tint.

### Dark mode

Every token has a dark value. Dark mode shifts surfaces to a navy-tinted charcoal, inverts `primary` to near-white so actions stay prominent, and lifts the status colors so they read on dark surfaces. In the app, dark mode is the `.dark` class on `<html>`, set from the `everruns_theme` cookie; this site follows its own theme switch. Use the switch in the header to see every example in both themes.

## Typography

Geist Sans for everything, Geist Mono for code, identifiers, logs, and counters. No other families. Body text carries `-0.01em` tracking. The UI is dense: 14px is the default body size.

Line height is 1.6 for long-form text, 1.5 for dense body, and 1.2 to 1.4 for headings. Headings, buttons, menu items, badges, and navigation labels use sentence case. There are no uppercase eyebrow labels.

## Spacing

A 4px base scale, the Tailwind defaults. Common rhythms: 8px between chips, 16px inside cards, 24px between page zones and as page padding, 32px for inputs and default buttons. Avoid values off the scale.

The app shell has a 240px sidebar. Page content sits in a centered container with 24px padding and 24px between zones. Long-form content never stretches edge to edge.

## Shape

Every corner radius is zero: cards, buttons, badges, inputs, dialogs, menus, avatars, and the user chat turn. Icons use square line caps and mitered joins (`.icon-sharp`). The only round things in the UI are status dots, circular glyphs, and the rings of the logo.

## Elevation

Slate is flat. Hierarchy comes from the near-white page, white cards, and 1px borders.

* Content cards have a border and no shadow. Hover darkens the border to `muted-foreground / 0.4`.
* Buttons and inputs may use `shadow-xs` (`0 1px 2px rgb(10 22 54 / 0.05)`).
* Popovers and dialogs rise to `shadow-md` at most. Dialog backdrops are flat 50% black.
* No inner shadows, glows, colored shadows, gradients, or frosted glass. Gradients exist only inside the logo.

## The dot grid

The page background is a branded dot grid: 1px dots on a 24px cell, navy at 3.5% in light mode and gold at 4.5% in dark. It is applied to the page body, never to cards; cards rise from it by being flat.

The dot grid behind a flat card (.bg-brand-dots).

## Motion

Motion is short and quiet: `ease-out`, 220ms for rows entering and 260ms for surfaces, with no bounces, springs, parallax, or page transitions. Every animation stops under `prefers-reduced-motion`.

| Class                                        | Use                                                                                     |
| -------------------------------------------- | --------------------------------------------------------------------------------------- |
| `animate-chat-row-in`, `animate-tool-row-in` | New transcript and tool rows: 8 to 10px rise with a fade.                               |
| `animate-chat-surface-in`                    | A surface appearing, such as the empty chat card.                                       |
| `animate-tool-pulse`                         | Opacity 0.45 to 1 over 1.6s for something running.                                      |
| `animate-tool-progress-active`               | A gold sheen sliding across an in-flight tool call.                                     |
| `work-log-shimmer`                           | A sheen across “Working for 12s” while a turn runs.                                     |
| `loading-wave-bar-0..4`                      | The thinking indicator (`thinking-indicator.tsx`): five bars, navy to gold, 80ms apart. |

Thinking indicator and a running pulse, from the app's own classes.