Principles
Every layout, component, and documentation page obeys five non-negotiable rules derived from the TypeScript token scales.
Scale contract data
| # | Principle | Enforced rule | Measured token contract |
|---|---|---|---|
| 1 | Numbers first | Every size, space, radius, border width, type step, and duration comes from a closed TypeScript scale. | 12 spacing steps (4px · 8px · 12px · 16px · 24px · 32px · 40px · 48px · 64px · 80px · 96px · 128px); 5 sizing steps (16px · 24px · 32px · 40px · 48px); 7 radii; 5 durations (100ms · 162ms · 262ms · 424ms · 686ms) |
| 2 | Monochrome is the identity | Obsidian to Alabaster carries 90% of the interface (60% steps 1–2, 30% steps 3–8). Brand hue steps 9–10 earn the remaining 10%. | 8 scales × 12 steps × 2 modes (4 brand themes: mono, verdigris, brass, porphyry) |
| 3 | Architectural, not decorative | Sharp structure, hairlines, and visible grid alignment replace gradients and blur. | Borders: 1px, 2px, 4px; grid: 4 cols at 320px+, 8 cols at 768px+, 12 cols at 1024px+; max width 1440px (90rem) |
| 4 | Accessible by default | Every token pair and control meets WCAG 2.2 AA contrast, focus ring, and target-size minimums. | 160 primitive checks + 344 semantic checks (4.5:1 text, 3.0:1 controls); 24px minimum target; 2px focus ring with 2px offset |
| 5 | Copy leads | Every sentence states a fact or a rule at a comfortable reading measure. | Prose max width 68ch; body fixed at 16px/24px across 320px to 1920px |
Closed TypeScript scales define every dimension, monochrome surface ratio, grid column, contrast threshold, and reading measure. No one-off values or decorative overrides exist in components or layouts.
Usage
Apply semantic Tailwind utilities and CSS custom properties that map directly to the five principles:
<section className="container-page grid-page bg-background py-16 text-foreground">
<div className="col-span-4 rounded-lg border border-border bg-card p-6 text-card-foreground md:col-span-8 lg:col-span-9">
<h2 className="font-display text-h2">Architectural section</h2>
<p className="mt-4 max-w-prose font-sans text-body">
Body text stays at 16px with a 68ch maximum reading width.
</p>
</div>
</section>.architectural-panel {
max-width: var(--prose-max-width);
padding: var(--space-6);
border: var(--border-width-1) solid var(--border);
border-radius: var(--card-radius);
background-color: var(--card);
color: var(--card-foreground);
}Do and don't
Accessibility
| Standard | Tokens | Threshold | Coverage |
|---|---|---|---|
| Text contrast (WCAG 1.4.3) | Steps 11–12 on steps 1–3; --*-foreground on surfaces | 4.5:1 | 160 primitive checks and 344 semantic checks |
| Non-text contrast (WCAG 1.4.11) | --input, --ring, --primary | 3.0:1 | Evaluated against --background in every theme and mode |
| Minimum target size (WCAG 2.5.8) | --control-height-xs (1.5rem) | 24px by 24px | Smallest control size (xs) |
| Primary mobile touch target | --control-height-lg (3rem) | 48px by 48px | Large control size (lg) |
| Use of color (WCAG 1.4.1) | --info, --warning, --destructive, --success | Text + icon required | State is never communicated by hue alone |
Every token pair and control size is enforced by automated WCAG 2.2 AA tests before build output is accepted. Interactive states and feedback banners always pair color shifts with text or icon labels.
Rationale
Closed numeric scales remove visual guesswork during implementation and review. Locking default Tailwind scales to the Monoplinth token tiers ensures that every utility class resolves to a contrast-verified color, a 4px grid step, or a φ-derived motion duration.