1# Warp design system — rules
2
3The system is young. This file is the record of what has been decided, why,
4and what has deliberately not been decided yet. It is the source of truth for
5intent; `tokens.css` is the source of truth for values.
6
7## How a rule is written
8
9Every rule has four parts, and a rule is not finished without all four:
10
11- **Rule** — what to do, in one sentence, stated as an instruction.
12- **Why** — the reason. A rule nobody can justify gets deleted at the first
13 argument, so the reason has to survive without the person who made it.
14- **When it doesn't apply** — the exceptions, named. A rule with no stated
15 exceptions gets applied where it shouldn't and then distrusted everywhere.
16- **Status** — `agreed`, `proposed`, or `superseded by R-n`.
17
18Rules are numbered and never renumbered. A rule that changes is marked
19superseded and the replacement gets a new number, so a decision made six
20months ago can still be read in the form it was made. See R-04 for a worked
21example — it reverses an earlier decision rather than erasing it.
22
23## Scope
24
25This system is **new**, and deliberately not an evolution of the existing
26factories/mono CSS. Its shared tokens and primitives live under
27`src/components/brand-system/`; the Workshop forwards to that source for
28reference and review. It is applied inside `[data-ds='warp-next']`.
29
30New marketing pages default to this shared system. Home, Terminal, Agent
31CLI, Factories, Enterprise and the download routes are production
32consumers. Other existing pages retain their systems until deliberately
33migrated. `/brand` is the canonical reference; workshop URLs are aliases.
34
35---
36
37## Foundations
38
39### R-01 · Two type faces, by job
40**Rule.** Azeret SemiMono sets headings, titles, numerals and anything that
41reads as a label. Matter sets body copy, descriptions and links.
42
43**Why.** The mono carries the brand's engineering character, but it is
44tiring across more than a line or two and it has no bold. Matter reads
45easily at paragraph length and ships a real 700 cut, so emphasis is
46available where it is actually needed.
47
48**When it doesn't apply.** Code, file paths, timestamps and tabular figures
49stay mono regardless of length — they are data, not prose.
50
51**Status.** agreed. Supersedes R-04.
52
53### R-02 · One ink, five steps
54**Rule.** All text is Space (`#1a1522`) at one of five opacities: 100% for
55primary, 70% for body, 45% for secondary, 20% for eyebrows and de-emphasis,
56and 12% for rules and hairlines. Accent is `#2a1eff`. Reverse is white.
57
58**Why.** A single hue at fixed steps stays coherent under any background and
59removes the judgement call that produced seventeen text colours in the
60previous system, including a neutral grey belonging to no palette.
61
62**When it doesn't apply.** Data visualisation may use a finer ramp — a chart
63with four series needs more than five steps. Those live with the figure, not
64here.
65
66**Status.** agreed.
67
68### R-03 · Square corners
69**Rule.** No border radius on containers, media wells, panels or images.
70Pills and circular affordances (play buttons, chips) keep their shape.
71
72**Why.** The system reads as technical drawing. Rounded cards soften it
73toward generic SaaS, and the previous set had three different radii.
74
75**When it doesn't apply.** Controls whose shape carries meaning — a play
76button is a circle because that is what a play button is. Action controls
77follow R-15, and explicitly approved download containers follow R-16.
78
79**Status.** agreed.
80
81### R-04 · ~~One type face~~
82**Rule.** ~~Mono only. The Future is dropped.~~
83
84**Why.** ~~A single voice; the sans appeared in only three components at
85three different size/weight combinations.~~
86
87**Status.** superseded by R-01. The cost was immediately visible: Azeret has
88no bold cut, so every card heading dropped to Medium and the hierarchy went
89flat. Recorded rather than deleted because the underlying observation still
90stands — the sans was being used inconsistently, and R-01 fixes that by
91giving it a defined job rather than by removing it.
92
93---
94
95## Composition
96
97### R-05 · Avoid eyebrows
98**Rule.** Do not add an eyebrow. If one is genuinely needed, set it at the
99same size as the headline it sits above, in ink at 20%.
100
101**Why.** Eyebrows had become automatic — a small uppercase tag above every
102section, carrying almost no information. Making the exception expensive
103(full headline size) forces the question of whether the word earns its
104place, and the 20% ink keeps it from competing with the headline it
105introduces.
106
107**When it doesn't apply.** Nothing yet. If a surface needs a genuinely
108different treatment, add the exception here rather than inventing one
109locally.
110**Status.** superseded by R-14. The original size-following rule allowed
111eyebrows above display and centered titles; neither is permitted now.
112
113### R-06 · Point at the docs
114**Rule.** When a feature has a documentation page, or any deeper destination,
115link it from the item. The link is the last element in the item.
116
117**Why.** Marketing copy can only go so deep. A reader who wants more should
118not have to go looking, and the link costs nothing to the reader who
119doesn't.
120
121**When it doesn't apply.** Don't invent a destination to satisfy the rule. No
122page, no link.
123
124**Status.** agreed.
125
126### R-07 · Choosing a feature layout
127**Rule.** Fewer than six items, and they deserve room: **Feature List
128Stacked**. Six or more, tight, no visual needed: **Feature List Grid**. One
129item at a time with supporting media: **Feature Slider**.
130
131**Why.** The three were being chosen by habit, which is how a six-item list
132ended up in a slider that hid five of them. Item count and whether there is
133media to show are the two things that actually decide it.
134
135**When it doesn't apply.** A list of five that each need an image still wants
136the slider — the media requirement outranks the count. Focused conversion
137panels may opt into FeatureSlider's compact text-only disclosures. This
138exception does not replace the ordinary feature-list defaults or the
139homepage's media slider.
140
141**Status.** agreed.
142
143### R-08 · The page owns the ground
144**Rule.** A component never paints the page background. Surfaces are named
145(`page`, `raised`, `sunken`), and the dot grid is a per-page option, off by
146default.
147
148**Why.** Components that bake in a background cannot move. The dot grid in
149particular belonged to one page family and then spread by inheritance rather
150than by decision.
151
152**When it doesn't apply.** Anything carrying text over the dot grid still
153needs an opaque fill — that is what `raised` is for. This rule is about
154naming the fill, not removing it.
155VisualGrid is opt-in page chrome: the page explicitly chooses that named
156ground. It never enables texture inside another module by inheritance.
157
158**Status.** agreed.
159
160### R-09 · Sentence case
161**Rule.** Render every string the way it was written. No `text-transform`
162in either direction, anywhere.
163
164**Why.** The old system ran three conventions at once, and the primary nav
165managed all three inside a single bar: the link row was authored lowercase
166and uppercased by CSS, the buttons were uppercased, and the dropdown links
167were forced back to lowercase. An editor typing "Warp Factories" into
168Sanity had no way of knowing which of the three they would get. Tying the
169rendered string to the authored one puts the decision in the one place it
170can be made correctly — "API, CLI, SDK and MCP" is not a title to be
171lowercased, and no stylesheet can know that.
172
173**When it doesn't apply.** Strings that carry their own case: product and
174model names, acronyms, code, file paths, and anything quoted from a
175terminal. Those are data, and R-01 already keeps them in the mono face.
176
177**Status.** agreed.
178
179### R-10 · Two headline scales
180**Rule.** Display size is the headline at the top of a page, under the
181nav. Headline size is every other head on that page, including the same
182hero layouts used as a module further down it. A page has one display
183headline at most.
184
185**Why.** The three hero layouts are useful in both positions, and without
186a rule the size became a judgement call taken afresh on every page — which
187is how a page ends up as a stack of competing openings, each one shouting
188at the same volume as the one that was supposed to be the opening. Tying
189the size to the position rather than to the layout means a designer picks
190where a block sits, not how loud it is.
191
192**When it doesn't apply.** A page with no meaningful opening — an index, a
193board, a utility page — has no display headline at all rather than
194promoting its first head to fill the slot.
195
196**Status.** agreed. `--w-head-size` controls the title scale. Eyebrows do
197not follow it into display size: R-14 permits them only on left-aligned
198or justified headline-scale modules, at `--w-headline`.
199
200### R-11 · Twelve columns
201**Rule.** Layouts divide the wrap into twelve columns with a
202`--w-gap-loose` gutter. A block spans whole columns.
203
204**Why.** The components had settled on two, three and four columns
205independently, which works right up until two of them sit on the same
206page and their edges land a few pixels apart — close enough to look like
207a mistake rather than a decision. Twelve divides by all three, so a
208half, a third and a quarter all land on the same lines.
209
210Writing it down also makes it checkable: the board's grid toggle draws
211these columns over any specimen, which is the difference between
212believing things line up and seeing whether they do.
213
214**When it doesn't apply.** Full-bleed media and anything that is
215deliberately edge-to-edge. The grid governs where content sits, not
216where a photograph stops.
217
218It also stops at the edge of a panel. The code panel's tree-against-pane
219divider and the fig frame's inset are interior to a bordered object, and
220running a 32px page gutter through the middle of a window would break
221the window to satisfy a rule about the page. What the grid governs is
222where the panel itself sits — and that does line up.
223
224**Status.** agreed. The dot grid is a separate thing and governed by
225R-08 — it is a decorative ground a page opts into, and it says nothing
226about alignment.
227
228---
229
230### R-12 · One owner per section seam
231**Rule.** On a composed page, sections own their top padding only; the
232page supplies the final bottom padding. Isolated specimens keep both.
233
234**Why.** Two adjacent sections each owning 72px at the seam create a
235144px gap, even though neither section intends one. A page makes the
236cumulative rhythm visible in a way a stage cannot.
237
238**When it doesn't apply.** The hero, logo strip and footer have their
239own chrome spacing. The opt-in `w-page` class separates page composition
240from specimens without teaching individual modules about their neighbors.
241
242**Status.** superseded by R-13. Adding visible section rulers exposed
243the cost: content sat directly on the next boundary, so the top-only
244rhythm no longer matched the live site's padded modules.
245
246### R-13 · Give each module room inside its rules
247**Rule.** Pad modules above and below their content using
248`--w-section-pad`: 56px on desktop and 40px on phones.
249
250**Why.** A ruled page needs breathing room on both sides of each
251boundary. A smaller symmetric step keeps modules distinct without
252the original 144px gaps or content pressed against a divider.
253
254**When it doesn't apply.** The logo strip, nav and footer retain their
255own chrome spacing. Do not add another page-level bottom spacer.
256
257**Status.** proposed as a formal rule; the 56px/40px implementation is
258already used by shared modules on migrated production pages. Replaces
259the R-12 experiment; do not describe this as workshop-only behavior.
260
261### R-14 · Eyebrows belong to section headlines, never display openings
262**Rule.** Omit eyebrows by default; allow one only on a headline-scale
263module with left-aligned or justified copy, never on display-scale or
264centered headings.
265
266**Why.** An eyebrow supplies useful section context, not another opening.
267At display size it competes with the page headline; centered it adds a
268second, unnecessary line to a deliberately simple announcement.
269
270**When it doesn't apply.** None. Do not shrink an eyebrow above a display
271title or move it off-center to work around the rule. This is an
272eligibility rule, not just a font-size limit.
273
274**Status.** agreed. Supersedes R-05. Eligible eyebrows retain headline
275size, mono type and 20% ink. Hero's types reject forbidden combinations;
276its runtime guard omits them for untyped callers. SectionHeading is
277always headline scale with left or justified copy.
278
279Agent guidance and valid examples are in `docs/eyebrows.md`.
280
281### R-15 · Action controls follow the live hierarchy
282**Rule.** Buttons and action-like controls use `--w-radius-control` (4px).
283Book a demo uses the Yield fill; a primary action uses ink; an outlined
284secondary action keeps a white surface and a soft ink border.
285
286**Why.** The live homepage distinguishes its two navigation actions without
287making both ink-heavy. The white Download Warp Terminal button remains legible
288over a drawing ground, while the small radius makes controls feel intentional
289without softening the technical panels around them.
290
291**When it doesn't apply.** Containers, media wells, panels and images remain
292square under R-03. Pills and circular controls continue to use their dedicated
293shapes. Do not use Yield for an arbitrary second CTA.
294
295**Status.** agreed.
296
297### R-16 · Contain platform download choices
298**Rule.** Group each operating system's installer choices, explanatory
299text and install command in one opaque raised card. Download-platform
300cards use the approved 20px radius and 24px inset.
301
302**Why.** Package and architecture choices belong together; they should
303not float independently on a drawing ground.
304
305**When it doesn't apply.** This is a specific approved exception to R-03
306for the download composition, not a new rounded-container default.
307Primary choices fill the available row evenly; secondary architecture
308controls stay compact.
309
310**Status.** agreed in the download-page review.
311
312### R-17 · Pricing follows the approved pricing reference
313**Rule.** Pricing plan cards use 10px corners, with a restrained lavender
314gradient and border on the recommended plan. Pricing actions use the shared
315R-15 controls. Comparison tables use open rows with horizontal rules.
316
317**Why.** The approved pricing reference groups dense commercial details
318into distinct cards and keeps the longer feature matrix easy to scan.
319
320**When it doesn't apply.** This exception is limited to pricing cards. Other
321containers retain R-03, and all pricing actions retain R-15's compact 4px
322controls and R-01's mono label typography. Pricing keeps the system's
323Azeret/Matter families and semantic ink/surface roles, rather than importing
324the reference's additional fonts.
325
326**Status.** agreed in the pricing Figma implementation review.
327
328### R-18 · Primary discovery navigation retains the Explore treatment
329**Rule.** Full `SiteNav` uses individually anchored, square dropdown cards
330with optional descriptions, a compact metadata strip and a restrained dotted
331panel ground. Its top-row/action labels use uppercase mono Medium and its
332action controls use pill shapes. Dropdown names retain authored case.
333**Why.** The approved navigation reference is the former Explore/Learn nav.
334These recognizable discovery affordances now belong to one shared component
335with explicit light and dark themes, rather than page-local forks.
336**When it doesn't apply.** This is a scoped exception to R-03, R-08, R-09 and
337R-15 for the full discovery nav only. Focused and logo-only headers,
338non-nav buttons and page typography keep their existing rules. Do not
339uppercase dropdown copy or invent missing link descriptions.
340**Status.** agreed in the primary navigation restoration review.
341
342## Open
343
344Not yet decided. Listed so they are not mistaken for oversights.
345
346- **Spacing scale.** Formal approval of the implemented symmetric R-13
347 module step remains open.
348- **Motion.** Hover and reveal timings are inconsistent; the slider's
349 reveal-on-hover (R-07) is the first place this will need an answer.
350- **Migration.** New pages use the shared system; existing pages migrate
351 explicitly using `docs/page-transitions.md`, preserving ownership and
352 interaction contracts. The remaining migration order is not prescribed.