Foundation layer — specimen

Balanced density · border-first · 4–6px radius · placeholder brand

01 — Color

Ramps and roles

Authored in OKLCH so equal steps read as equal steps across hues. Each step has an assigned role, so “which grey is the disabled border” stops being a decision. Swapping the brand means replacing these ramps and nothing else.

Neutral

1–2 page & subtle backgrounds
3–5 component bg, hover, active
6–8 borders: subtle → strong
9–10 solid fill and its hover
11 secondary text (AA)
12 primary text

Accent — placeholder, meant to be replaced

Semantic roles in use

The border finding. Border-first has a contrast tension worth knowing up front: a hairline that reads well against white sits around 1.3:1, far below the 3:1 that WCAG requires of any boundary conveying information. So there are three border tokens, not one. --border-subtle and --border-default are decorative — dividers, card edges. --border-strong meets 3:1 and is mandatory for form controls, selected states, and anything a user must perceive to operate. Getting this wrong is the most common way a flat, hairline aesthetic quietly fails an audit.

02 — Type

Scale, leading, measure

Size, line-height and tracking are authored as triplets — leading tightens as size grows, tracking goes negative at display sizes. Family is a brand-layer slot; these are fallbacks.

Measure — set at 68ch

Line length is one of the few typographic rules with real reading research behind it: somewhere between 45 and 75 characters, with roughly 66 as the comfortable centre. Below that the eye returns too often; above it, finding the start of the next line gets unreliable.

This paragraph is secondary text at the small size — the pairing you will use most for hints, captions and metadata. It passes AA against both the base and raised surfaces.

03 — Spacing

Proximity as structure

Whitespace is not decoration — it encodes grouping. The scale is named by relationship rather than size, which is what makes the rule self-enforcing: space inside a group is always smaller than space around it.

The rule, demonstrated

Correct — ratio preserved

Contact email
Billing reference

Broken — equal spacing everywhere

Contact email
Billing reference

Same tokens, same components. The right-hand version is the single most common failure in generated UI, and it is visible in a screenshot — which makes it checkable.

04 — Depth

Nesting policy

The rule that matters most for a future tree renderer: never nest more than two surfaces. Past level two, switch from containment to indentation. Without this, deep data becomes nested-panel hell.

level 1 — surface-base, bordered
level 2 — surface-raised, bordered
level 3 — no surface, rule + indent only

Everything deeper than this uses the same treatment, or drills into its own view.

05 — Controls

States and forms

Every state defined once, here, so nothing invents its own later. Focus is a ring rather than a border change — in a border-first system, a colour-only border swap is too quiet to serve as focus.

Buttons

Each solid fill names its own text colour. Only warn is near-black — no yellow that still reads as yellow carries white text at 4.5:1.
Icon-only controls get the full 44px target and an aria-label — there is no visible text to read.

Form — including a tight error

Shown to customers in search results.
SKU already used by “Aluminium laptop stand (v1)”. Pick a different one.

Payment declined

The card issuer rejected the charge. Try a different card, or contact your bank.

Stock running low

Three items in this cart have fewer than five units remaining.

Order placed

Confirmation sent to the billing address on file.

Popover

The only elements that carry shadow are ones that float above the page. Nothing in normal flow gets one.

Inverted surface — the one role that flips with the theme rather than tracking it. Near-black on a light page, near-white on a dark one.

06 — Data

Hostile content

Tokens proven against the content that actually breaks them: overlong names, tabular numbers, mixed status, and nothing at all.

ItemTypeStatus QtyUnitTotal
Anodised aluminium laptop stand, adjustable height, matte charcoal finish…computer.accessoryIn stock264.00128.00
14" ultraportable notebook…computer.laptopLow11,499.001,499.00
USB-C hub…computer.accessoryBackordered339.95119.85
Extended warranty, 36 months…service.warrantyPending1180.00180.00
Braided charging cable, 2 m…computer.accessoryIn stock1211.50138.00

Empty

Nothing in this cart yet

Items you add will appear here with live pricing and stock.