eswat2 · Design system · v1

House Style

The visual language I use for standalone pages and small apps: reports, runbooks, trackers, and this site. Cool neutral greys, Archivo with DM Mono, white cards on a pale ground, and colour used only to show status. This page is built in the style it describes, so every example below uses the real CSS.

Codified 2026-11-04Updated 2026-11-15In use on eswat2.app · /architecture · /backdrop

How it is used. Every page starts from the same template and changes only the content. Tokens, type scale and components are reused as they are, never restyled. When a page needs something new, it is built from the existing tokens and added here afterwards, as the segmented control, corner button, pills and slider rows were for /backdrop.

01 · Principles

What the style is for

  • A working document, not a poster. One column, a short masthead, then the content. The hero is sized to its text and never fills the viewport.
  • Colour means state. The neutrals carry the page. Green, amber and indigo appear only on chips, notes and flags, where they mean ready, attention and in progress. There's no decorative accent colour.
  • Mono for labels and data. DM Mono is used for eyebrows, card labels, chips, dt labels, dates, counts and code. Archivo is used for everything you read.
  • Cards are the unit. Each card is one thing: a person, a phase, a role or a decision. Every card has the same head: a mono label, a title, and chips on the right.
  • Ready to act on. Anything the reader pastes or runs sits in a copyable block with its own button. State such as sent, done or verified is visible on the card.
  • Both themes, always. Light is defined on bare :root, dark under the media query and again under [data-theme="dark"], plus a three-way toggle in the masthead.
02 · Colour

Tokens

Switch the theme to compare

Each swatch shows the current theme's value, with the light and dark hex values listed under it. The neutrals lean slightly blue on purpose; never use a pure grey.

Neutrals

Status

All text, including --faint, reaches at least 4.5:1 contrast on --ground, --surface and --surface-2 in both themes. Check a new token against all three before using it.

Status uses ok, warn and pre, each with a -soft fill. Shadows are 0 1px 2px rgba(20,23,31,.06), 0 8px 20px rgba(20,23,31,.05) in light; dark uses a faint top highlight plus a deeper drop.

03 · Type

Archivo and DM Mono

Self-hosted

Archivo at weights 400, 500, 600 and 700. DM Mono at 400 and 500. Body text is 16px with 1.5 line height, and running text stays between 62 and 68 characters wide.

  • Page titleh1 · clamp(2.1rem, 6vw, 3.1rem) · 700 · −.035em · lh .98
  • Card title

    h2 · 1.3rem · 600 · −.02em
  • Sub-heading inside a card

    h3 · 1rem · 600 · −.01em
  • Lede: what this page is and its state, in two sentences..lede · 1.05rem · --dim · max 62ch
  • Body copy reads at sixteen pixels.body · 16px / 1.5 · 400
  • Supporting text with a bold key phrase..why · .95rem · --dim · b in --ink 600
  • Company · Team · Topic.eyebrow · mono 500 .7rem · .13em · upper · --faint
  • Step 2 · review.order · mono 500 .68rem · .12em · upper
  • pnpm run deploypre · mono 400 .86rem / 1.6
04 · Layout

Space and shape

ThingValue
Column.wrap max-width 820px. Use 1080px for data-heavy pages.
Page paddingpadding-block: 2.75rem 4rem. The side gutter is max(16px, env(safe-area-inset-*)).
RhythmSections gap: 2.25rem. Card stacks 1.1rem. Inside a card .9rem. Masthead .7rem.
Radius12px for cards, 10px for stat tiles and rows, 8px for notes, pre blocks, buttons and inputs, 4px for flags and inline code, 999px for chips and the toggle.
CardSurface fill, 1px --rule border and --shadow, with padding 1.3rem 1.4rem 1.4rem.
LandmarkOne <main> holds everything between the masthead and the footer. It keeps the section gap, so spacing doesn't change.
SpacingFlex or grid with gap, never margins between siblings. Text children get min-width: 0.
Rules1px --rule between sections and --rule-soft between rows. The masthead meta strip has a 2px left border.
05 · Components

The kit

Live examples

Masthead meta strip

Checked 2026-11-15Source swirl-worker.jsStatus live

Use it for the facts a reader checks first: dates in ISO format, the source, and the status. Values are set in mono.

Chips

LiveDoneIn review2 / 4 doneGapReplaceDraftNot started

Chips are pills with a coloured dot, set in mono. Use ok for ready, strong or done. Use pre for in progress or one step removed. Use warn for a gap or something to change. Use quiet for neutral or not yet. They sit at the top right of a card head.

Notes

An amber note holds the one thing to know before acting: an ordering rule, a deadline, or a risk.

An indigo note (.note.info) holds how-to context or a fallback procedure.

Card

Phase 2 · rollout

Item name

Owner · team · due date
In reviewNot started

Why this card matters, in one or two sentences, with the key fact in bold.

Link
example.com
Owner
One name
A paste-ready note or command. The button copies exactly this text.

The order inside a card is always the same: head, then .why, then a dl of facts, then a .msg block. Text with a length limit shows a character count, which turns amber past the limit.

Evidence list

  • Requirement or recordStrongThe evidence, or what happens to it, in one line.
  • Another line itemPartialWhat's missing and how to close it.

Checklist

  • Step 1 · group label
  • RepoA short receipt: commit abc1234 · 251 passed
  • Live change
  • Your call

Status line for loading or save errors. It hides when empty.

Use it when a page tracks work that gets ticked off over time. The items live in the markup, grouped under mono li.group labels. Ticks and the mono .cnote receipt are stored per item id, so they survive a reload. Put a progress chip in the card head (3 / 20 done: quiet at none, pre while partial, ok when all done). Keep the boxes disabled until the stored state has loaded.

Card hosted elsewhere

App · knowledge base

An app that runs elsewhere

Listed with the others, hosted on another platform
On VercelLive

Same structure as any card, set back from the raised cards around it.

MCP
https://example.com/mcp/

.card.elsewhere marks one card in a set as different in kind, such as an app on another host. It's a normal raised card with an indigo --pre border and a 3px --pre-soft halo, drawn as a box-shadow ring rather than a left rail. Indigo means "one step removed", which is what the card says. Pair it with a chip pre that names the difference, such as the host. Put the status chip last so it lines up with the other cards. Use it for one card per page at most, or it stops meaning anything. Reference page: eswat2.app.

Signed card

.card.signed puts one monochrome mark, the author's own sign, faintly in the lower-right corner of the card that signs off the page, usually the author card. The mark is an inline <svg class="mark"> drawn in currentColor, the card's last child, with aria-hidden. It takes a 150px box, flush right with its bottom clipped by the card, in --ink at 8% opacity, and sits behind the card's text. It's a signature, not a state, so it never takes a status colour. Use it on one card per page at most. Reference page: eswat2.app.

Segmented control

Scheme
Start

.seg picks one of a few named options. It is the theme toggle's pill with text labels in mono instead of icons, and the pressed option uses the toggle's inverted look. Wrap it in a role="group" with an aria-label, and mark the current option with aria-pressed. Keep it to two to four short options; it wraps on narrow screens. Use it for settings, not navigation. Reference page: eswat2.app/backdrop.

Corner button

Click it to see the open state.

.menu-btn is a 40px round icon button that opens and closes one panel, for a full-screen page where the panel would otherwise cover the content. Fix it to a corner with the safe-area insets added to its offsets, and open the panel just below it. aria-expanded and aria-controls say what it does, the open state uses the toggle's inverted look, and Escape closes the panel and returns focus to the button. Use a sliders icon for settings; a hamburger reads as navigation. Reference page: eswat2.app/backdrop.

Pills

.pill is a single outlined mono button. In a .pills row it is one option among many that may wrap, such as presets, and aria-pressed gives the current one the same inverted look as .seg. Use pills instead of .seg past four options or when the row must wrap, since a wrapped segmented pill looks broken. On its own, a pill is a quiet secondary action, such as Reset. When that action has something to act on, such as Reset while any setting is off its default, it gets .changed: an indigo --pre outline and soft halo, the same treatment as a card for an app hosted elsewhere. Reference page: eswat2.app/backdrop.

Slider rows

.sliders is a three-column grid of label, range input and value. Labels match dt; values are mono tabular numbers with their unit. The track takes accent-color: var(--ink), so it carries no status colour, and each input is 24px tall so neighbouring rows meet the touch-target size. A setting away from its default gets .changed on its label and value: an indigo --pre dot and full ink, with the dot's space reserved on every row so labels never shift. That makes a preset's recipe readable at a glance. A .pills row can sit in the grid as the first row, under a .lbl. Reference page: eswat2.app/backdrop.

Stat tiles and flags

Live appsFouron eswat2.app
Lighthouse100both themes
Worker code0 linesstatic assets only
Reviewsnothing blockingdate unverified

Only use stat tiles when the numbers are the point of the page. Flags are smaller, outlined and square-cornered, used for blockers inside a row.

06 · Behaviour

Every page has

  • A theme script that runs before paint, reading the saved choice from localStorage. Light and dark set data-theme; auto removes it.
  • A light / system / dark toggle using aria-pressed, with the system option on by default.
  • Copy buttons that call navigator.clipboard inside the click and fall back to selecting the text. The button shows "Copied" in green for 1.6s.
  • try/catch around every storage call, and a page that renders without storage.
  • A :focus-visible outline in --pre, and prefers-reduced-motion respected.
  • A clean Lighthouse accessibility run in both themes.
  • No libraries unless one does real work for the page.
07 · Voice

How it reads

  • Plain and specific, in short sentences. Say what to do and when ("deploy by Nov 4").
  • The lede states the page's current state ("Three are live").
  • Dates in metadata are ISO (2026-11-04). Dates in prose are short ("Nov 5 · 10 AM PT").
  • A · separates parts of labels and eyebrows.
  • The title is a name of two to four words. The explanation goes in the lede.
  • The footer gives the why, the sources, and the resume link where relevant.

Avoid

  • Other fonts, including Inter, Space Grotesk and serif display faces.
  • Warm cream grounds, gradients, emoji section markers, or a brand accent colour.
  • Accent rails on cards. The left bar belongs only to .note and the meta strip.
  • Numbered markers that aren't a real sequence. Phases and steps can be numbered; contacts use an order label instead.
  • Full-viewport heroes and content that fades in on scroll. The page is complete when it loads.