# Mock templates: lessons from the factory UI

The mock UI is what a person approves before anything is built. It is drawn by `internal/ui/mockui_*.go` and must look
like the same family as the factory it is shown in. These are the rules the factory UI already follows, measured on its
own screens (`internal/ui/web/`, tokens in `design/tokens/tokens.css`), each with the screen it comes from. The renderer
shares one set of primitives (`mockui_style.go`: `--s1..s8`, `--t-*`, `--r`, `.row`, `.btn`, ...) so every template, app or
page, uses the same scale. `TestEveryTemplateSpeaksTheSharedScale` (`mockui_families_test.go`) fails when a template steps outside it.

## Type

| Role | Size / weight | Where the factory does it | Mock primitive |
| :--- | :--- | :--- | :--- |
| Page title | 36px (`text-4xl`) / 600 / -0.03em / line 1.1 | `All projects`, `Board`, `Settings` headers | `h1`, `--t-title` |
| Display (hero, timer) | 56 to 64px / 600 / -0.03em / line 1.05 | `text-56`, `text-64` utilities in `index.css`, the marketing site | `h1.display`, `--t-display` |
| Section heading | 16px / 600, count muted beside it | `Needs you 15`, `In progress 1`, `Finished 4` | `h2`, `.n` |
| Row title | 16px / 500 | Project and conversation rows on `All projects` | `.rt b` |
| Description, meta, breadcrumb | 14px / 400 / `muted-foreground` | Header description under `All projects`; `bakery-blog` above `Board` | `.sub`, `.eyb`, `.rt small` |
| Group label | 12px / 500 / muted | `Not in a team` in the project list | `h3.lbl` |

- **Geist Sans everywhere, Geist Mono only for numbers people compare** (`$1,120 / $1,500`, `08:30`, `#11` on a board
  card), with `tabular-nums`. Never a serif in the turbo-12f designs (the Project colours design keeps the project's own type).
- **Sentence case, never ALL-CAPS labels** (`Needs you`, not `NEEDS YOU`). No letter-spaced eyebrows.
- **Hierarchy comes from size, weight and shade, in that order.** `Reader comment` is 500 white; what it says is 14px muted.
- **Short labels wrap, they are never cut with an ellipsis.** The factory truncates only identifiers in the sidebar; a
  quadrant name or a chip does not get `Important & Urge…`.

## Space and shape

- **Spacing scale `.25 / .5 / .75 / 1 / 1.5 / 2 / 3 / 4.5rem`** (`--s1..s8`). Rows are `1rem` high above and below the
  text (`All projects` rows are 71px for two lines); page header to content `1.5rem`; section to section `2.5rem` (`space-y-10`);
  page gutter `clamp(1rem, 4vw, 2.5rem)`.
- **One radius, `--radius: .625rem`**, and one small step (`.375rem`) for things inside a control. Round controls only
  where the factory does (avatars, switches).
- **Content is centred or full width, never a narrow left column.** A reading column is `42rem` and centred; lists and grids
  use the full width (`Settings` rows run edge to edge of the content area).

## Borders versus shade

- **A hairline (`1px`, `--border`) separates rows and sections; a box is for an object you can act on.** `All projects`
  is one list with a hairline under each row, no card per row. `Settings` is key/value rows with a hairline, no card.
  Only the board draws cards, because a ticket is a thing you drag.
- **No card in a card.** If something sits inside a box, the box goes.
- **Shade, not borders, for state:** a muted row (`Finished`) is a lighter text colour on the same ground, not an outlined
  box. Fields and wells use `--muted` fill (`Search cards`), not a heavier border.
- **Signature move: the dashed plum divider** under every page header (`.turbo-plum-divider`, `2px dashed --plum-rule`).
  The mock draws it under app page headers only; hero sections do not get one.
- **No bottom trim bar, no drop shadows, no gradients on surfaces.** The factory uses a `10px` plum trim only at the
  foot of a card; a mock page has no card to hang it on.

## Building blocks

- **Header**: breadcrumb or eyebrow (14px muted) / title / one muted description, actions on the right, then the divider
  (`Board`: `bakery-blog` / `Board` / `Tickets move from Backlog to Done...` / `Settings`, `New ticket`).
- **List row**: status mark, title (500) with its muted description under it, the item's own detail on the right in
  plain text, hairline below (`Needs you` rows: title, the project in muted text, `Review` at the end).
- **Action next to the information.** One primary action per screen, in the header (`Connect or create project`); a row's
  own action is a small ghost button (`Review`, `Start`). Primary (orchid) is only the primary action, the active nav
  item and links.
- **Status is a mark, a word and a colour, never colour alone**: a ring and a check with `Done`, a warning icon with
  `... is stuck and needs you` (`Needs you` list, board cards).
- **Empty states** say one thing and offer one button. The mock never invents empty-state copy: with no items the screen
  is its header and its one button.
- **Grids match the data.** Columns on the board are the stages (`Backlog / Implement / Verify / Done`); a matrix is four
  quadrants; a day is a time column with each block placed at its start and as tall as it lasts (`Agent timeline`).

## Racing cues: only with their meanings

Used sparingly, at most one or two per screen, each as in the factory (`index.css` utilities):

| Cue | Means | Factory example | Mock use |
| :--- | :--- | :--- | :--- |
| `kerb` striped edge | Needs a person now | `Needs you` rows, `Answer 4 questions` banner | Overdue or waiting item, the first quadrant of a matrix |
| `kerb-danger` | A failed check needs action | Stuck board card | Overdue / failed item |
| `racing-line` | Progress already driven | Stage line above the board columns | Budget and level progress bars |
| `track-dots` | Not reached yet | Rest of the line on `Progress` | Days still to go on a countdown |
| `chequered` | Finished | `Finished` heading, `Done` cards | A done row, a started countdown |

Do not use a cue as decoration. No cue means nothing is wrong, nothing is being waited on, nothing is finished.

## What to avoid (each one was in an earlier mock)

- Boxes inside boxes, heavy borders everywhere, a card per row.
- Emoji as icons; every illustration drawn from the item's own picture or a plain geometric plate.
- Truncated short labels, mono-font chips, ALL-CAPS letter-spaced labels.
- Gradient text, glow, confetti and fireworks, glass blur, drop shadows.
- A chart on a screen whose items are not numbers; four key numbers and a "recent" list on every page.
- A grid that does not match the data (two columns for a four-quadrant matrix) and a large empty area under short content.
- Two primary buttons on one screen; the primary action repeated in the header and again below the list.
