00 . Overview

Cairn Design System

Stone and paper. Weight you can read. The connective tissue between past decisions, present code, and future intent, made visible.

This page is the canonical reference for Cairn's UI. Three files carry everything: fonts.css loads the type, tokens.css defines every color, size, and duration, components.css styles the surfaces. Every component here reads from tokens. No hardcoded hex values downstream.

01 . Color

Color

Warm stone, quiet ink, chain accents tuned to role (not brand). Every value is a token.

Stone surfaces
Bedrock
--stone-0
#0d0c0a
Beneath all
Base
--stone-1
#141310
Page bg
Primary
--stone-2
#1b1915
Content surface
Raised
--stone-3
#22201b
Cards, wells
Elevated
--stone-4
#2a2721
Panels
Peak
--stone-5
#342f27
Popovers, hover
Paper tones
Paper 0
--paper-0
#f3ecdd
Warm paper
Paper 1
--paper-1
#eae0cb
Aged paper
Paper 2
--paper-2
#ddd0b6
Deeper paper
Seams
Faint
--seam-faint
#2a2620
Subtle rule
Thin
--seam-thin
#38332b
Default seam
Clear
--seam-clear
#4a4338
Readable
Carved
--seam-carved
#5a5244
Must be legible
Ink
Char
--ink-char
#f2ece0
Primary
Aged
--ink-aged
#c9c0ae
Secondary
Faded
--ink-faded
#908673
Tertiary
Mist
--ink-mist
#5f5849
Caption
Ghost
--ink-ghost
#3d382f
Placeholder
→ Numeric aliases
--ink-1 .. --ink-4
(aliases)
Legacy shell
Provenance chain (evidence flowing in)
Ember
--prov-1
#f4b36a
Active
Brass
--prov-2
#c4864a
Default
Tarnished
--prov-3
#7d5530
Dim trace
Wash
--prov-wash
rgba(196,134,74,.10)
Surface tint
(preview)
ember @ 40%
Ghost trace
(preview)
brass @ 20%
Dim trace
Authority chain (rules flowing out)
Verdigris light
--auth-1
#88c4b4
Active
Verdigris
--auth-2
#5a9687
Default
Oxidised deep
--auth-3
#2f5448
Dim trace
Hinge (the decision)
Bone-white
--hinge-1
#e8e1d2
Active
Weathered
--hinge-2
#b6ac96
Default
Wash
--hinge-wash
rgba(232,225,210,.06)
Surface tint
Signal
Drift
--drift
#d47854
Advisory tension
Block
--block
#b84c38
Blocking contradiction
Settled
--settled
#82a893
Reconciled
Settled wash
--settled-wash
rgba(130,168,147,.10)
Surface tint
02 . Typography

Typography

Source Serif 4 for sentences. IBM Plex Sans for UI. IBM Plex Mono for anything exact.

Stone and paper.
.t-display-s · 88 / 300 / opsz 60
Section headline
.t-h1-s · 56 / 300
Sub-section heading
.t-h2-s · 36 / 400
Panel title
.t-h3-s · 26 / 500
Card title, node name
.t-title-s · 20 / 500
A lede, set in italic for pulled concepts.
.t-lede-s · 16 / 300 italic
Body copy, the default voice of the UI. Enough line-height to read quietly.
.t-body-s · 14 / 400
Small descriptions and meta.
.t-small-s · 12 / 400
cairn.blueprint · ./meta/decisions/two-chain.md
.t-mono-s · 12 / 400 / 0.04em
Kicker label
.t-label-s · 11 / 0.15em caps
03 . Spacing and radius

Spacing and radius

Spacing steps in a readable rhythm. Radii stay low: stone is eroded, not milled.

Spacing scale (--s-1 to --s-10)
--s-1 · 4px
--s-2 · 8px
--s-3 · 12px
--s-4 · 16px
--s-5 · 24px
--s-6 · 32px
--s-7 · 48px
--s-8 · 64px
--s-9 · 96px
--s-10 · 128px
Radius scale
--r-edge
--r-stone
--r-round
--r-large
--r-full
Shadows
--lift-1
--lift-2
--lift-3
04 . Motion

Motion

Stones settle. They do not bounce. Six durations, four easings, one idle animation (drift).

Durations
--dur-tick    120ms   near-instant response
--dur-quick   200ms   snappy state change
--dur-settle  320ms   default, stone finding its place
--dur-reveal  520ms   progressive disclosure
--dur-breathe 2400ms  drift node idle (only idle animation)
--dur-build   1800ms  map building sequence
Easings
--ease        cubic-bezier(0.2, 0.7, 0.2, 1)    generic
--ease-settle cubic-bezier(0.2, 0.85, 0.3, 1)   default, damped
--ease-stack  cubic-bezier(0.4, 0, 0.2, 1)      hover, focus, color
--ease-lift   cubic-bezier(0.3, 0, 0.1, 1)      pulling up
--ease-paper  cubic-bezier(0.25, 0.8, 0.25, 1)  map inertia, reveal
05 . Buttons

Buttons

Three tiers. One primary per view. Secondary as support. Ghost for navigation.

Classes.btn.primary, .btn.secondary, .btn.ghost
Class.btn-ghost
06 . Pills and badges

Pills and badges

Chain membership and state markers. Never decorative; every pill carries a load-bearing term.

provenance decision authority drift settled
Classes.pill.p / .pill.h / .pill.a / .pill.drift / .pill.settled
module decision contract source research todo review
Classes.badge.kind-*
07 . Inputs and keys

Inputs and keys

Cairn is queried, not searched. Inputs read in mono by default.

Class.input
Class.input.input-sans
K   Esc  
Tagkbd
08 . Code blocks

Code blocks

Monospace as evidence. Paths, IDs, blueprints, contracts.

Inline cairn.blueprint or neighbourhood saas.api.auth stays flush with surrounding text.

# cairn.blueprint fragment
module saas.api.auth {
  contracts: [auth.contract]
  decisions: [dec.two-chain-authority]
  tags: [@auth, @api]
}
09 . Artefact row

Artefact row

One list item for all six artefact types: contract, decision, research, source, todo, review.

10 . Chain diagram

Chain diagram

Provenance meets authority at the hinge (the decision). Six stones, two directions.

01 · source
Source
Raw evidence
02 · research
Research
Synthesised
03 · hinge
Decision
Both directions
04 · blueprint
Blueprint
Declared
05 · contract
Contract
Specified
06 · code
Code
Enforced

Evidence informs. Never binds.

Rules bind. Checked at every gate.

11 . Stone node

Stone node

Every node on the map. Four states: synced, ghost, drift, settled.

Module · syncedsaas.api.auth
Auth
@auth@api

Session issuance, OAuth providers, and token revocation.

2 research 3 decisions 1 contract
Module · ghostsaas.api.notifications
Notifications
@notify

Declared in the blueprint but not yet reconciled to code.

0 contracts
Module · driftsaas.api.billing
Billing
@billing@api

Code diverged from the contract. Something is off.

1 tension
Module · settledsaas.api.audit
Audit
@audit

Just reconciled. The map matches the code.

2 contracts
12 . Principles

Principle cards

Six principles, each earned. Watermark numerals in ghost ink.

I
Weight

Gravity is earned, not applied.

Elements look heavy only when they carry real authority. Shadow, size, and contrast follow from structural weight.

II
Silence

The idle state is the baseline.

Only drift breathes. Everything else rests until you ask it to move.

13 . Tone cards

Emotional registers

Every interaction targets one register: arrival, clarity, reassurance, unease.

Amber

Arrival

Map load. Archive complete. First view of a neighbourhood.

MAP LOAD · ARCHIVE · FIRST VIEW
Verdigris

Clarity

Chain trace. Query result. Contract open.

CHAIN TRACE · QUERY · CONTRACT
Moss

Reassurance

Lint clean. Drift resolved. Scan settles.

LINT CLEAN · DRIFT RESOLVE · SCAN SETTLE
Clay

Unease

Drift breathe. Orphan surface. Cycle detected.

DRIFT BREATHE · ORPHAN · CYCLE
14 . Stat grid

Stat grid

Tabular figures in serif; labels in mono caps.

Modules
12
Decisions
28
Drift
3
15 . Panel

Panel

Generic container; the base for principle cards, inspectors, and wells.

Neighbourhood

Three modules within two hops of saas.api.auth, traced along the authority chain.

16 . Topbar

Topbar

Application chrome: brand, breadcrumb, command search, chain toggles.

Cairn ·
Search or run a command... K
GR
17 . Inspector

Inspector panel

Right-side detail surface. 380px wide. Holds decisions, changes, and chain balance.

Module · synced

Auth

Session issuance, OAuth providers, and token revocation. Traces up to two research threads and binds one contract downward.

Provenance
Authority
1 of 6 modules
18 . Command palette

Command palette

Full-screen modal for querying. Cairn is queried, not browsed.

Esc
Syntax
neighbourhoodshow N-hop graph around a node pathtrace shortest path between two nodes driftlist modules where code diverged from blueprint
Modules
19 . Changes drawer

Changes drawer

Bottom-docked. In-flight / review / archived as horizontally scrolling cards.

21 . Glossary

Glossary

Load-bearing vocabulary. Never paraphrase these in UI.

blueprint.blueprint
The declarative file describing what your system should be. Authored by hand; the single source of intent.
mapmap.md
The reconciled view of your system. Cairn produces it by comparing the blueprint to actual code and surfacing findings.
provenance chainadvisory
Evidence flowing in: source → research → decision. Informs; never binds.
authority chainenforced
Rules flowing out: decision → blueprint → contract → code. Binds at every gate.
hingespec §3.4
The decision. Obligations in both directions; where provenance meets authority.
interface hashidentity
A stable fingerprint of a contract's shape. When it moves, the map moves with it.
rationale tensionadvisory
A non-blocking finding. Something the provenance chain wants to flag. Never fails a gate.
interface contradictionblocking
A blocking finding. The authority chain disagrees with itself; commits are gated until resolved.
ghoststate
Declared in the blueprint but not yet reconciled to code. Drawn dashed, with hatched fill.
syncedstate
Declared and reconciled. The default, quiet state.
orphanedstate
Present in code but not in the blueprint. A module without a declaration.
driftstate, advisory
Code diverged from its declaration. The only node that breathes.
neighbourhoodquery primitive
The N-hop graph around a node. "Show neighbourhood" never becomes "show nearby".
reconcilerinterface
The pluggable thing that compares a blueprint against a reality layer. Code is the first reconciler; others follow.
artefactkernel primitive
A typed schema object: contract, decision, todo, research, review, source. Umbrella kept; direct types are the six.