# microgfx: design ethos and system (v0.3)

**Status:** approved, 2026-11-04 (v0.4: static DotMatrix, QR, Table, and Meter are in the catalog. Open core widgets are the checklist in §6, smallest useful first. The share dialog, shortcut `q`, and animated matrix scenes stay proposed) · **Scope:** metric unit system, visual language, iconography, copy, data presentation, component library v1, tokens
**Repo baseline:** `main` after PR #128. Anything marked **(proposed)** does not exist in the repo yet.

> mnstrr should read like a well-made instrument: a front panel, a spec sheet, a label on a flight case.
> Everything on screen is either information or the structure that holds it.

---

## 1. Ethos

Industrial and minimalist, after instrument panels, technical drawings, equipment labels, spec sheets, Dieter Rams ("less, but better") and Teenage Engineering (plain grey hardware, one loud colour, labels that tell you exactly what a control does).

| #   | Principle                                                                                                                                                  | Do                                                                  | Don't                                                     |
| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------- |
| 1   | **Every mark earns its place.** Every line, icon, tick and colour encodes something or separates something.                                                | Use a tick ruler under a timeline because the ticks are real dates. | Add corner brackets, dots or icons to fill space.         |
| 2   | **Label it like hardware.** Short, exact, uppercase mono labels name the thing; the value sits right beside them.                                          | `UPDATED 3D AGO` · `TRACKS 42`                                      | "Here's what I've been up to lately! 🎉"                  |
| 3   | **Flat, square, ruled.** Hierarchy comes from structure (rules, grid, type size, weight), not from shadows, gradients or rounded blobs.                    | 1px hairline panels on a strict grid.                               | Drop shadows, gradients or glassy cards in the page body. |
| 4   | **One signal colour.** Neutral greys do the work. The accent marks the single most important state: active, live, selected.                                | An accent dot on the live widget; everything else grey.             | Colour-coding categories in a rainbow.                    |
| 5   | **Show the data, honestly.** Real units, real precision, real timestamps, visible staleness. Expose state: where a value comes from and when it was taken. | `RTT 38 ms · sampled 07:31`; "stale: last sync 9d ago".             | Rounding 0.4 s up to "instant", or hiding a broken feed.  |
| 6   | **Generated, not decorated.** Graphics are drawn from data and seeds (SVG, canvas, dot-matrix), not imported as images.                                    | A sparkline drawn from the last 30 values.                          | A stock illustration or a static PNG of a chart.          |
| 7   | **Quiet surface, hidden depth.** The first view is calm; whimsy (cheat codes, games) is there for those who look.                                          | The Konami code turns the dot-matrix into Snake.                    | Confetti on first load.                                   |

**On information density** ([U.S. Graphics Company](https://usgraphics.com), inspiration only): their philosophy argues for "expose state and inner workings", "explicit is better than implicit" and "don't infantilize users", and openly rejects minimalism ("dense, not sparse"). We take the first three as they are and resolve the tension like this: **minimal ornament, not minimal information.** Content pages stay calm; data views (`/status`, `/design`, spec sheets, the system monitor) may be as dense as the data needs, as long as it stays on the grid and is labelled. Their "performance is design" is already global principle 5.

**On micrographics** ([Attlas, "Micrographics in Branding"](https://www.attlasdesign.com/articles/micrographics-branding)): the article sums the style up as a brand borrowing "the visual grammar of specs" and notes "specificity signals authenticity". Most brands it describes use _stylised_ specs. mnstrr goes one step further: we use the grammar **and** the specs are real (principle 5, §2.6 "no fake data"). The article's fit test also applies here: micrographics suit a site about building things, but too much detail reads "cold or overworked". The cure is copy in Dennis's own voice (§4), not fewer facts.

**On the corporate terminal** ([lumon.industries](https://lumon.industries/), [lumon-industries.com](https://lumon-industries.com/), inspiration only; no marks, slogans, or assets): a dark brochure with two quiet accents sits in front of a separate full-viewport terminal — one phosphor, a ruled percent bar, a coordinate footer, scanlines only on that surface. That split sharpens principle 7 and §4. The first view stays a handbook, and whimsy is another mode on the same grid and mono. Extra hues stay inside one instrument. Scanlines are off under reduced motion and on touch.

---

## 2. Visual language

### 2.1 Metric unit system (proposed)

**Why not real mm.** CSS `mm` is defined against a fixed 96 dpi (`1mm = 96/25.4 ≈ 3.78px`), so it is neither physically 1 mm on any real screen nor a whole pixel. Layout in real mm gives fractional sizes, blurry hairlines and no actual physical accuracy. Instead, microgfx uses a **metric convention**: one layout unit, **1u = 4px**, with a base-10-friendly scale. It feels metric, while every edge lands on a whole pixel. Nominal units are **labelled `U`, never `MM`**: 4px is close to a real millimetre only on ~96 dpi desktop monitors and is off by roughly 30–50% on phones and HiDPI laptops, so calling it "mm" would be a false spec (principle 5). `MM` is reserved for calibrated physical rulers.

- **Definition:** `--u: 0.25rem` (= 4px at the default 16px root, so user font-size settings still scale the layout). Tailwind v4's `--spacing` is set to the same value, so **Tailwind numbers are units**: `p-5` = 5u = 20px, `gap-10` = 10u = 40px, `h-40` = 40u = 160px.
- **Spacing scale (strict):** `1 2 3 5 10 15 20 30 50 100` u (= 4, 8, 12, 20, 40, 60, 80, 120, 200, 400px). Steps go roughly ×2 / ×1.5 / ×2 per decade, like a 1–2–5 series. Lint (proposed) flags other spacing steps.
- **Size scale (components, not spacing):** may also use `4 6 8 11` u where a size is tied to text or a11y: icons 4/5/6/8u (16/20/24/32px), touch targets **≥ 11u** (44px, WCAG; the existing `Button size="touch"`/`"icon"` already uses `11`).
- **Grid:** 4 columns on mobile with 5u gutters and 5u margins; 8 columns from `md`, 12 from `lg`, both with 5u gutters and 10u margins; max content width **300u** (1200px). The background grid texture has a minor line every 5u and a major line every 10u.
- **Bento cell:** min height **40u** (160px); widgets span `1×1`, `2×1`, `2×2`, `4×1` cells. On mobile everything stacks full-width in `priority` order (00 §17).
- **Type:** font sizes keep their own finer scale (§2.2), but **every line-height is a whole number of units** (4–14u), so text sits on the 1u baseline and blocks stack without drift.
- **Hairlines are not units.** Borders, rules and ticks are `--hairline: 1px` (CSS px), never derived from `u`, so they always snap to whole device pixels and stay crisp. Focus rings stay 2px.
- **Rulers and spec labels show `U`:** a layout ruler draws a minor tick every 1u, a mid tick every 5u and a labelled major tick every 10u (`0 10 20 30 U`). Panels may carry a dimension label measured from the real rendered size (ResizeObserver, px ÷ 4): `W 300 × H 40 U`. These numbers are true _in the unit system_. Physical millimetres need calibration (below).
- Content aligns to the grid; a ruled line ends where the column ends. No off-grid nudges.

#### Screen calibration (optional, proposed)

Lets a ruler show **physical** millimetres on a given screen. It never changes the layout grid, which stays at 1u = 4px.

- **How:** the user drags (or types into) a bar until it matches a credit card's long edge (ISO/IEC 7810 ID-1, **85.60 × 53.98 mm**) or a span on a physical ruler (default 100 mm). `pxPerMm = barWidthInCssPx / referenceMm`. Sanity-clamped to 2–12 px/mm, with a reset to default.
- **Storage: per device, not synced.** A laptop panel and an external monitor differ, so the value is stored in localStorage under its own key (e.g. `mnstrr.calibration.v1`), keyed by a screen signature (`screen.width × screen.height @ devicePixelRatio`). It needs a schema next to `settingsSchema` (e.g. `calibrationSchema`, proposed) but is **excluded from cross-device sync** (00 §10). It's applied before first paint as `--px-per-mm` on `<html>`.
- **What uses it:** only `Ruler` / tick marks in `physical` mode and an optional **"true scale" view** (e.g. showing a card, a keycap or a product at 1:1). Layout, spacing, type and the grid texture ignore it.
- **Labels:** layout rulers always say `U`. Physical rulers say `MM` only when calibrated (with `CAL 2026-11-04`, the calibration date). Uncalibrated physical rulers fall back to the CSS estimate `--px-per-mm: 3.7795` (96 dpi) and say `≈ MM`, with a "Calibrate" link.
- **A11y:** the bar is a `role="slider"` with `aria-valuetext="85.6 mm reference, 3.92 px per mm"`. Arrow keys nudge by **±0.1 mm**, Shift+Arrow by ±1 mm, Home resets. Touch drag works the same as pointer drag. The instructions are text, not only the card illustration.
- **Where:** a "Screen calibration" block in `/settings` (Display) and in the `/design` foundations section, plus a command palette action "Calibrate screen" (and "Reset calibration").

### 2.2 Type

Pairing (decided): **IBM Plex Sans** (grotesk, body and headings) + **IBM Plex Mono** (eyebrow labels, numbers, code, readouts). Both are OFL, already installed via `@fontsource` (Sans 400/500, Mono 400), and come from an engineering company, which fits the brief. Add **Mono 500** for readouts (proposed). **Later, not v1:** an alternate font theme with **Geist + Geist Mono** (OFL), switchable like a colour theme. Reference only: U.S. Graphics' Berkeley Mono shows how far a single mono can carry a whole technical identity; it is a paid font and not an option.

| Token          | Size / line-height (line-height in u)  | Font                     | Use                                                               |
| -------------- | -------------------------------------- | ------------------------ | ----------------------------------------------------------------- |
| `text-label`   | 11px / 16px (4u), `+0.12em`, uppercase | Mono 400                 | eyebrow ("brow") labels: field keys, table headers, tags, serials |
| `text-xs`      | 12px / 16px (4u)                       | Mono or Sans             | captions, units, timestamps                                       |
| `text-sm`      | 14px / 20px (5u)                       | Sans 400                 | secondary text, dense UI, table cells                             |
| `text-base`    | 16px / 24px (6u)                       | Sans 400                 | body (never smaller on mobile)                                    |
| `text-lg`      | 20px / 28px (7u)                       | Sans 500                 | panel titles                                                      |
| `text-xl`      | 24px / 32px (8u)                       | Sans 500                 | section headings                                                  |
| `text-2xl`     | 32px / 36px (9u)                       | Sans 500, `-0.01em`      | page titles                                                       |
| `text-readout` | 40px / 40px (10u)                      | Mono 500, `tabular-nums` | big numbers in Stat/Readout                                       |
| `text-display` | 56px / 56px (14u)                      | Sans 500, `-0.02em`      | home hero only                                                    |

Rules: two weights only (400, 500). No italics in UI chrome. Headings and body are sentence case; only the small eyebrow `text-label` is uppercase (done with CSS `text-transform`, never in the source string). Body measure 60–75ch.

### 2.3 Colour

**Neutral base, one accent per theme (decided).** The default `bw` theme is greyscale and its accent is graphite (= foreground), i.e. no colour at all. Every theme in `config/themes.json` keeps its own accent, as it does today. There is **no separate accent picker in v1**: themes and swatches are not mixed (swatches are on the later/maybe list, §6).

- **Where the accent may appear:** the active/selected state, live indicators, the primary action on a screen (max one), and the highlighted series in a chart. Budget: about 5% of any screen.
- **Status colours** are separate from the accent and always paired with a shape or a word (never colour alone): `ok`, `warn`, `danger` (exists), `idle` (= muted).
- **Lines:** the current `--border` (`#d4d4d8` on white, 1.48:1) is fine for decorative hairlines but fails the 3:1 non-text contrast rule for control boundaries. Add `--border-strong` for inputs, checkboxes and meters (proposed).

Full light/dark tokens are in §7.

### 2.4 Lines, borders, radii, elevation

- **Hairlines:** `--hairline` (1 CSS px, never in units, §2.1) `--border` for panels, rules and table rows. 1px `--border-strong` for interactive boundaries. 2px only for focus (exists: `outline: 2px solid var(--focus)`) and the active tab or selected row indicator.
- **Dashed** 1px = provisional or empty (empty slot, drop target, planned item). **Dotted** = ruler or leader line in key/value rows.
- **Radii:** `0` everywhere (matches the current square Button and Frame). Exceptions: `--radius-pill` (9999px) for status dots and toggles, because the circle is the meaning ("a light"). Nothing in between.
- **Elevation: flat.** No box-shadows in page content. Floating layers (command bar, toasts, menus, header) separate by a 1px border plus the existing `.glass` utility; with `data-transparency="none"` or high contrast they become opaque (already implemented). One shadow token, `--shadow-overlay`, exists only for floating layers on busy backgrounds (proposed; may stay `none`).
- **Corner ticks** (the current `Frame`, 3u = 12px) mark a _container of data_, not every box. Use them on widgets and spec sheets, not on buttons or list rows.

### 2.5 Motion

Motion only explains change: something appeared, moved, updated, or is in progress.
- **Durations:** `--dur-1` 80ms (hover, press), `--dur-2` 160ms (expand, toggle, toast), `--dur-3` 240ms (panels, page transitions). Nothing above 320ms except visualizers and the logo intro.
- **Easing:** `--ease-out: cubic-bezier(0.2, 0, 0, 1)` for entering; `--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1)` for moves. No bounce or spring in UI chrome.
- **Allowed:** opacity, transform (translate ≤ 2u / 8px, scale 0.98–1), the value of a meter, a ticking number (≤ 400ms), a dot-matrix scroll.
- **Not allowed:** parallax, autoplaying loops in content, animated gradients, motion that delays content.
- **Reduced motion:** `prefers-reduced-motion` or `data-motion="reduced"` already forces CSS durations to ~0 globally. JS/canvas animation (dot-matrix, sparkline draw-in, number tickers) must read `useReducedMotion()` (proposed hook) and render the **final frame statically**; scrolling text becomes paged text with manual next/prev.

### 2.6 Micrographic elements

Drawn by `@mnstrr/microgfx/gen` (existing: `markSvg`, `gridPattern`, `frameSvg`) and new generators (proposed). Three rules, sharpened by the [Attlas article](https://www.attlasdesign.com/articles/micrographics-branding):

1. **Contrast creates hierarchy.** Dense micro-detail only sits next to generous empty space (≥ 10u). A panel gets _either_ a dense micrographic strip _or_ dense content, never both edge to edge.
2. **Scale rewards proximity.** Micrographics are small (`text-label`, 1px lines, ≤ 3u ticks) and secondary. They reward a closer look and never compete with the page title or the primary value.
3. **Put them where people look closely.** The places the article names for digital work map well to our surfaces: footers (build hash, `REV`, region), loading states, and "under the hood" views (`/design`, `/status`, `/colophon`, debug mode). Content pages stay sparse.

Each element must be tied to real data:

| Element                        | What it encodes                                                                                   | Example                                                                                                                                |
| ------------------------------ | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Ruler / tick scale**         | a real axis: time, count, distance (layout rulers in `U`; physical `MM` only if calibrated, §2.1) | timeline ruler with a major tick per month, minor per week; `0 10 20 U` layout ruler on `/design`                                      |
| **Coordinates**                | a real place or grid position                                                                     | `50.0°N 8.3°E` (Mainz, from `/where` data, rounded to its `precision`); bento slot `C3`                                                |
| **Serial label**               | a stable identifier of the thing                                                                  | `PG-07 · /now` (page index from `pages.json`), `REV 2026-11-04` (last updated)                                                         |
| **Registration mark**          | the brand / origin                                                                                | existing `markSvg` monogram                                                                                                            |
| **Dimension label**            | an element's real rendered size in u                                                              | `W 300 × H 40 U` on a panel in `/design` or debug mode                                                                                 |
| **Grid / cutting-mat texture** | the layout grid itself                                                                            | `gridPattern` at 5u minor / 10u major (today's default spacing is 24px = 6u; change proposed), background only, ≤ 18% opacity (as now) |
| **Dot-matrix**                 | live or changing values; QR codes                                                                 | system monitor: RTT, deploy, views; "Share this page" QR (§2.7)                                                                        |
| **Leader dots**                | binds a key to its value                                                                          | `Location ........ Mainz` in spec sheets                                                                                               |

Rule: **no fake data.** No invented serial numbers, coordinates or "SYS OK" labels. If there is no value, drop the element. (The article accepts stylised fake specs for brands; for a personal site that shows its own data, fake specs would break principle 5.)

### 2.7 QR codes (dot-matrix)

QR codes are drawn by the **same DotMatrix renderer** as the system monitor: same dot shape, same grid, theme colours. A QR is the one dot-matrix that must be machine-readable, so scan reliability wins over style wherever they conflict.

- **Encoder:** [`uqr`](https://github.com/unjs/uqr) (unjs, **MIT**, zero dependencies, v0.1.3). The whole package bundles to ~11.5 KB minified / ~4.5 KB gzip (measured with esbuild), and only `encode()` is needed, which returns the module matrix; we render the modules ourselves (SVG on the server, canvas or SVG on the client). Fallback: `qrcode-generator` (MIT, zero deps). Not `qrcode` (node-qrcode): it pulls in `pngjs`, `yargs` and `dijkstrajs`. Lazy-load the encoder when the QR is first opened.
- **Rendering rules:**
  - Error correction **M** by default (≈15%), **Q** for the bento widget and anything likely to be printed or photographed at an angle.
  - **Quiet zone: 4 modules** on every side, always part of the plate.
  - Data modules are dots at ≥ 80% of the module pitch; the three **finder patterns and the alignment pattern are drawn solid** (square), never as loose dots.
  - **Size:** module pitch ≥ 1u (4px) and the whole plate ≥ 40u (160px); 60u+ in the share dialog. If the URL needs more than version 6 (41 modules), offer the short link instead of shrinking modules.
  - **Always dark on light.** Never invert in dark mode. The QR sits on a light plate (`--qr-plate`, the theme's light-mode background) with `--qr-ink` (the theme's light-mode foreground), framed by a hairline. CI checks plate/ink contrast ≥ 7:1 per theme and falls back to `#ffffff`/`#141414`.
- **Share this page:**
  - Encodes the **current URL including its state**: path, locale, query params and hash. View state that should be shareable (filters, selected version `?v=`, palette view, …) must already live in the URL. Private state is **never** serialised: the sync key, admin session values and debug flags are stripped by an allowlist.
  - Opened from a "Share" button in the page header, the single-key shortcut `q` (global, not while typing; proposed; no collision in today's `config/shortcuts.json`, to be added there), and the command palette action **"Show QR for this page"** / DE **"QR-Code für diese Seite anzeigen"**.
  - The dialog shows the QR, the **URL as selectable mono text** (middle-truncated, full value on copy) with a **Copy link** button, **Download SVG** / **Download PNG** (PNG rendered from canvas at 1024px, quiet zone included), and the Web Share API button where the browser supports it.
- **Short links:** when the page (without state) already has a slug in the redirects table, offer `/r/<slug>` (the route exists in the repo) for a smaller, more scannable code, with a toggle "Use short link". Short links for _stateful_ URLs would need a new write path (e.g. a rate-limited `links.create_share` RPC); that's later, not v1.
- **QR widget** (bento `1×1` or `2×2`): a configured URL from JSON (default: the site home or `/contact`), with an eyebrow label (`SCAN · /CONTACT`) and the URL as text below.
- **Motion:** optional dot fill-in reveal ≤ 240ms; **none under reduced motion** (the code renders complete in its first frame). Never animate a code while it is meant to be scanned.
- **A11y:** `role="img"` with `aria-label="QR code for muensterer.tech/now"` (localised); the visible URL text and copy button are the real accessible path, since a screen-reader user can't scan their own screen. The dialog traps and restores focus.

**Shipped:** `uqr` `encode()`, rendered by DotMatrix (quiet zone 4, data modules as dots at 85% of the pitch, finder / alignment / timing / function modules solid), `--qr-plate` / `--qr-ink` with the 7:1 fallback (`#ffffff` / `#141414`, which Everforest light uses), `inline` and `widget` variants, and `shareableUrl` (path, query, and hash; private keys `debug`, `cmd`, `sync`, `key`, `session`, `token`, `secret`, `admin` removed; pass `allow` to keep only named view-state keys). Module pitch stays at least 1u, so a code past version 6 grows the plate instead of shrinking. A provided `shortLink` is encoded only when `useShort` is set, because `/r/<slug>` drops query and hash.

**Still proposed:** the share dialog (copy, download SVG/PNG, Web Share), shortcut `q`, the command action "Show QR for this page", and minting short links for stateful URLs.

---

## 3. Iconography and visuals

### 3.1 When to use an icon

Use an icon only if it does at least one of these:
1. **Identifies** a destination or object faster than the word (GitHub, mail, calendar, a file vs a folder).
2. **Encodes state** (open/closed, locked, external link, live, error).
3. **Is the control** in a known convention (close ×, search, copy, theme toggle), _with_ an accessible name.

**Rule against decoration:** no icon before a heading or paragraph "for flavour"; no icon repeated on every row when it says the same thing; no icon whose meaning needs the label to be understood _and_ adds nothing to it. In review, delete the icon: if no information is lost, it stays deleted.

### 3.2 Phosphor rules

- **Set:** Phosphor via the registry in `packages/microgfx/src/icons` (`ph:` names, `/ssr` entry). Brands: Phosphor `*Logo`, then Tabler `tb:` (00 §17.1).
- **Weight:** `light` everywhere (current default in `Icon`). `regular` only when an icon sits at 16px next to 14px text and light looks thinner than the text stroke. `fill` only for an **on** state (active pin, playing, selected tab). `duotone`, `bold` and `thin` are not used.
- **Sizes** (4/5/6/8u): tied to the text they sit with: `16` with `text-xs`/`text-sm`, `20` with `text-base` (current default), `24` for standalone buttons and nav, `32`+ only inside empty states. Icon box = text line-height so rows don't jump.
- **Colour:** `currentColor`, which inherits the text colour. Accent only when the icon _is_ the accent state.

### 3.3 Pairing with labels

- Default: **icon + label**, icon first, gap 2u (8px, `gap-2`), vertically centred on the text's cap height.
- **Icon-only** is allowed only for universal controls (close, search, copy, menu, theme) and for brand links in a known row of socials. It always gets `aria-label` and a tooltip with the label plus its shortcut (`Copy · ⌘C`).
- Trailing icons are reserved for direction and destination: `ph:arrow-up-right`/`ph:arrow-square-out` = leaves the site, `ph:caret-right` = drills in.

### 3.4 Programmatic graphics as data encodings

| Graphic         | Encodes                         | Rule                                                                                                                       |
| --------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **StatusDot**   | a discrete state                | Shape + colour: filled = ok, ring = idle, half = warn, ✕/triangle = error. Always has a text label (visible or `sr-only`). |
| **Meter / Bar** | one value against a known range | Show the number next to it. Range ends labelled if not 0–100%.                                                             |
| **Sparkline**   | a trend, not exact values       | ≤ 64 points, no axes; last value printed at the end; min/max dots optional.                                                |
| **Dot-matrix**  | live, short, changing values    | Max ~24 chars per line; paged, not endlessly scrolling, under reduced motion.                                              |
| **Ruler**       | an axis                         | Ticks align with real values; labelled every major tick (`U`, or `MM` only when calibrated).                               |
| **QR code**     | a URL                           | Dark on light plate, 4-module quiet zone, URL always shown as text (§2.7).                                                 |
| **Texture**     | the grid                        | Never behind body text at > 10% opacity.                                                                                   |

### 3.5 Alt text and ARIA

- Decorative SVG (texture, corner ticks, ruler without labels): `aria-hidden="true"` (as `Frame` does now).
- Meaningful SVG/canvas: `role="img"` + `aria-label` stating the **conclusion**, not the drawing: "Views, last 30 days: rising, 1,240 today". Charts also offer the data as a table (visually hidden or toggle).
- Interactive canvas (dot-matrix games): `role="application"` only while a game runs, focusable, with `aria-describedby` for the keys; normal mode is `role="img"` with a live summary.
- Icon-only buttons: `aria-label` from i18n; the `Icon` wrapper keeps `aria-hidden` when a visible label exists.
- Live values: `aria-live="polite"` at most once per 10s per region; never live-announce every tick.

---

## 4. Copy voice

**Terse, technical, honest.** Write like a spec sheet written by a friendly engineer: nouns and numbers first, verbs for actions, no hype, no exclamation marks, first person when it is Dennis speaking (`/now`, `/about`), no "we". After U.S. Graphics: be explicit rather than clever, prefer a complete label to a mysterious one, and don't infantilize readers (no "Oops", no hand-holding tone).

### 4.1 Case

- **Sentence case** for headings, buttons, menu items, toasts and body: "Copy link", "Last played".
- **Uppercase mono, eyebrow labels only (decided)** (`text-label`, the small "brow" label above or beside a value): field keys, table headers, units, serials, status words. Max ~3 words. Body copy, headings, buttons and toasts never go uppercase. Set the case with CSS; the source string stays sentence case so translations and screen readers stay normal.
- No Title Case, no small-caps emulation in body text.

### 4.2 Numbers and units

- Use `Intl.NumberFormat` with the active locale. EN `1,240.5`, DE `1.240,5`.
- Value and unit are separated by a non-breaking thin space: `38 ms`, `4.2 GB`, `12 °C`. Percent: EN `42%`, DE `42 %`.
- SI and ISO units; abbreviations not spelled out (`ms`, `km`, `kB`). Binary sizes use `KiB/MiB` only when it matters.
- Precision follows meaning: counts are integers; durations to the unit that changes (`38 ms`, `1.2 s`, `3 min`); percentages at most one decimal. Large counts use compact form in readouts (`12.4k`) with the exact value in the title/tooltip.
- `—` (em dash) means "no value"; `0` means zero. Never show `NaN`, `undefined` or `null`.

### 4.3 Timestamps

- Every dynamic block shows its freshness: `UPDATED 3D AGO` (label) or "updated 3 days ago" (prose).
- **Relative** for < 7 days (`Intl.RelativeTimeFormat`, `numeric: "auto"` → "yesterday"); **absolute** after that.
- **Absolute:** ISO-style in mono contexts (`2026-11-04`, `07:31`), localised long form in prose (EN "4 Nov 2026", DE "4. Nov. 2026"). 24-hour clock in both locales.
- Always a `<time datetime="…">` with the absolute date and time zone in its `title` (`2026-11-04 07:31 CET`).
- Staleness is stated, not hidden: past the configured threshold the stamp turns `warn` and says "stale".

### 4.4 States

| State           | Pattern                                | Example (EN / DE)                                                                                                                               |
| --------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Loading         | label + indicator, no "please wait"    | "Loading playlists" / "Playlists werden geladen"                                                                                                |
| Empty           | what's missing + why + next action     | "No concerts logged yet. Add one in admin." / "Noch keine Konzerte erfasst. Fügen Sie eines im Admin-Bereich hinzu."                            |
| Error           | what failed + what still works + retry | "Spotify didn't respond. Showing data from 2 h ago. Retry" / "Spotify antwortet nicht. Daten von vor 2 Std. werden angezeigt. Erneut versuchen" |
| Offline / stale | plain fact                             | "Offline · showing cached copy" / "Offline · zwischengespeicherte Version"                                                                      |
| Success (toast) | past tense, object first               | "Link copied" / "Link kopiert"                                                                                                                  |

No apologies ("Oops!", "Sorry"), no blame ("You entered…"), no jokes in errors (whimsy lives in the hidden layer only, e.g. the 404).

### 4.5 EN/DE

- Every string goes through next-intl (00 §9). German runs ~30% longer: labels and buttons must wrap or truncate with a tooltip, never overflow.
- CSS uppercase turns `ß` into `SS`; check DE labels like `GRÖSSE`. Prefer short German nouns for labels (`STAND` for "updated", `DAUER`, `ORT`).
- **German uses "Sie" (decided)**, a little more formal and corporate: "Kopieren Sie den Link", "Möchten Sie die Kalibrierung zurücksetzen?". The public voice is a handbook: short claims, no jokes in the chrome (§1). Where possible, avoid the address entirely with infinitives and nouns ("Link kopieren", "Erneut versuchen"), which also keeps buttons short. Never mix "du" and "Sie" on one page.
- Units and numbers come from `Intl`, never hand-formatted strings in messages.

### 4.6 Before / after

| Before                                            | After                                                                    |
| ------------------------------------------------- | ------------------------------------------------------------------------ |
| "Welcome to my little corner of the internet! 👋" | "Software developer and maker in Mainz." (from `site.config.json`)       |
| "Oops! Something went wrong 😢"                   | "Couldn't load notes. Retry"                                             |
| "Last updated on November 1st, 2026"              | `UPDATED 3D AGO` (title: 2026-11-01 18:02 CET)                           |
| "Check out my awesome projects →"                 | "Projects · 14"                                                          |
| "Loading, please wait…"                           | "Loading projects" + indicator                                           |
| "There's nothing here yet!"                       | "No entries for 2026."                                                   |
| "Response time: 0.038 seconds"                    | `RTT 38 ms`                                                              |
| DE: "Hier kannst du deine Einstellungen ändern"   | DE: "Einstellungen" (heading) · "Passen Sie Farbschema und Bewegung an." |
| DE: "Ups, da ist was schiefgelaufen"              | DE: "Notizen konnten nicht geladen werden. Erneut versuchen"             |
| DE: "Zuletzt aktualisiert am 1. November 2026"    | DE: `STAND VOR 3 T.` (title: 01.11.2026 18:02 MEZ)                       |

---

## 5. Data presentation

- **Tabular numerals** (`font-variant-numeric: tabular-nums`) on every number that sits in a column, changes live, or is compared. Readouts and serials use Plex Mono, which is fixed-width anyway. The IBM Plex Sans `@fontsource` latin subset does not ship `tnum`, so numbers in tables and meters use Plex Mono (the `num` utility).
- **Alignment:** numbers right-aligned, text left-aligned, units in their own column or a header (`DURATION (MIN)`), not repeated per cell. Decimals aligned by using fixed precision per column.
- **Density by context:** content pages are sparse; data views may be dense (U.S. Graphics: "as complex as it needs to be"). Dense is fine when every row is on the grid, labelled and aligned; it's not fine as decoration.
- **Key/value spec sheet:** two columns, `text-label` key on the left (muted), value on the right in Sans or Mono (for data). Leader dots optional on wide screens; stacked key-over-value on mobile. This is the default way to show an object's properties (`/uses` items, project meta, `/now` facts).
- **Status:** StatusDot + word (`LIVE`, `IDLE`, `DOWN`), consistent vocabulary across the site: `ok / warn / danger / idle`.
- **Logbook / timeline** (n2.studio/now pattern): newest first; each entry = date (mono, `2026-11-04`) · category tag · one-line summary · optional body. Group by month with a ruled month header. Keep every entry visible (no "load more" under 100 entries); filter by category tag.
- **Chart vs list:**
  - **List/table** when people look up a specific item, there are < ~7 values, or exact values matter.
  - **Sparkline/meter** when the trend or proportion is the point and the exact value can be printed beside it.
  - **Full chart** (Bklit, per stack doc) only when there are ≥ 2 dimensions or ≥ ~20 points _and_ the shape is the message. Every chart has a text summary and a table fallback.
- **Truncation:** truncate in the middle for paths and hashes (`dnnsmnstrr/…/design.md`, `3f216f4`), at the end for prose; the full value is in `title` and copyable.

---

## 6. Component library v1

Built in `packages/microgfx/src/ui` and exported via `@mnstrr/microgfx/ui`. The package has the P0 set (tokens, Icon, Label, Panel, Stat, KeyValue, StatusDot, Timestamp, Ruler, Button, Input) plus Table, Meter, static DotMatrix, and QR. shadcn primitives sit on Base UI where a behaviour is non-trivial (Button), restyled with our tokens; plain elements elsewhere. Every component exports `meta` and has tests per variant. Metadata for client modules lives in `*-meta.ts` so the command bar can import the registry from the server.

**P0 = minimum first PR** (foundations + the pieces every page needs).

| #   | Component                                                             | Purpose                                                                                        | Key props                                                                                               | Variants                                                                         | A11y notes                                                                                                     | Pri        |
| --- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------- |
| 1   | **Tokens**                                                            | §7 tokens: unit system (`--u`, spacing, grid), status colours, `--border-strong`, QR plate/ink | —                                                                                                       | light/dark per theme                                                             | AA tests cover new keys                                                                                        | **P0**     |
| 2   | **Icon** (wrapper, exists)                                            | the only way to render an icon                                                                 | `name`, `size: 16\|20\|24\|32`, `state?: "on"` (→ fill), `label?`                                       | —                                                                                | `aria-hidden` unless `label`                                                                                   | **P0**     |
| 3   | **Label / Tag**                                                       | instrument marking; category tag                                                               | `children`, `tone: muted\|accent\|ok\|warn\|danger`, `as`                                               | `label` (text only), `tag` (bordered), `serial`                                  | real text, never an image; tags as links get `aria-label` with the filter                                      | **P0**     |
| 4   | **Panel** (evolve `Frame`)                                            | data container with corner ticks and a label                                                   | `label`, `serial?`, `updatedAt?`, `actions?`, `ticks?: boolean`                                         | `plain`, `ticked`, `dashed` (empty/provisional), `inset`                         | `section` + `aria-labelledby` on the label (today the label is a `p`, not a heading)                           | **P0**     |
| 5   | **Stat / Readout**                                                    | one key number                                                                                 | `label`, `value: number`, `unit?`, `format?`, `delta?`, `trend?`                                        | `sm`, `lg` (`text-readout`), with sparkline                                      | the value + unit read as one string; `delta` says "up/down", not only an arrow                                 | **P0**     |
| 6   | **KeyValue list**                                                     | spec-sheet layout                                                                              | `items: {key, value, href?, mono?}[]`, `leader?`                                                        | `inline`, `stacked`, `leader`                                                    | `dl/dt/dd`                                                                                                     | **P0**     |
| 7   | **StatusDot**                                                         | discrete state                                                                                 | `status: ok\|warn\|danger\|idle`, `label`, `pulse?`                                                     | `dot`, `dot+label`                                                               | shape differs per status; `pulse` off under reduced motion; label `sr-only` if hidden                          | **P0**     |
| 8   | **Timestamp**                                                         | freshness and dates                                                                            | `date`, `mode: relative\|absolute\|auto`, `staleAfter?`, `format: iso\|prose`                           | `label`, `inline`                                                                | `<time datetime>`, absolute in `title`; updates at most once a minute                                          | **P0**     |
| 9   | **Ruler / Divider**                                                   | separation and axes                                                                            | `orientation`, `ticks?: {at, label?}[]`, `style: solid\|dashed\|dotted`, `scale?: "layout"\|"physical"` | `rule`, `ruler` (layout ruler labelled `U`; physical `MM` needs Calibration, P3) | `role="separator"` for rules; rulers `aria-hidden` unless they carry labels                                    | **P0**     |
| 10  | **Button** (exists, restyle)                                          | actions                                                                                        | existing `variant`, `size`, + `icon?`, `shortcut?`                                                      | `default` (accent), `outline`, `ghost`, `link`; drop `secondary`?                | 44px touch size on touch; shortcut shown as `kbd` and in the tooltip                                           | **P0**     |
| 11  | **Input**                                                             | text entry                                                                                     | `label`, `hint?`, `error?`, `prefix?/suffix?` (units)                                                   | `text`, `search`, `textarea`                                                     | visible label (uppercase label above), `aria-describedby` for hint/error, `--border-strong`                    | **P0**     |
| 12  | **Table**                                                             | lookups and comparisons                                                                        | `columns: {key, label, align, unit?, format?}[]`, `rows`, `sort?`                                       | `dense`, `default`                                                               | real `<table>`, `scope` on headers, `aria-sort`                                                                | P1         |
| 13  | **Meter / Bar**                                                       | value in a range                                                                               | `value`, `min`, `max`, `label`, `segments?`                                                             | `bar`, `segmented` (LED-style)                                                   | native `<meter>` or `role="meter"` with `aria-valuetext`                                                       | P1         |
| 14  | **Sparkline**                                                         | trend                                                                                          | `values`, `width`, `height`, `showLast?`, `minMax?`                                                     | `line`, `bars`, `dots`                                                           | `role="img"` + summary label; SVG, server-renderable                                                           | P1         |
| 15  | **Command palette styling**                                           | restyle the existing cmdk `command-bar.tsx`                                                    | —                                                                                                       | list/grid (existing `paletteView`)                                               | keep cmdk's ARIA; group headers as `text-label`                                                                | P1         |
| 16  | **Toast** (`Toaster`, exists)                                         | feedback                                                                                       | Sonner `toast()`                                                                                        | `default`, `success`, `error` (StatusDot as icon)                                | Sonner live region; errors assertive (00 §18)                                                                  | P1         |
| 17  | **Bento grid**                                                        | widget layout from JSON                                                                        | `items: {id, span, priority}[]`                                                                         | `1×1, 2×1, 2×2, 4×1`                                                             | DOM order = `priority` = reading order; no visual-only reordering                                              | P1         |
| 18  | **Logbook entry**                                                     | dated, tagged entry                                                                            | `date`, `category`, `title`, `body?`, `href?`                                                           | `compact`, `full`                                                                | `article` + `time`; list is an `ol`                                                                            | P1         |
| 19  | **DotMatrix display** (static renderer P1 for QR; animated scenes P2) | live readout (system monitor)                                                                  | `lines: string[]` or `scenes`, `cols`, `rows`, `fps`, `paused`                                          | `static`, `scroll`, `paged`                                                      | `role="img"` + live text summary; pause control; static under reduced motion; game mode = `role="application"` | P2         |
| 20  | **File tree**                                                         | nested data from JSON (`pages.json`, projects)                                                 | `nodes`, `defaultExpanded?`, `onSelect?`                                                                | `static`, `links`                                                                | WAI-ARIA `tree`/`treeitem`, arrow keys, `aria-expanded`; locked items say "private"                            | P2         |
| 21  | **Calibration**                                                       | set physical px-per-mm for rulers / true scale (§2.1)                                          | `reference: "card" \| "ruler"`, `referenceMm`, `value`, `onChange`                                      | `card`, `ruler`                                                                  | `role="slider"`, ±0.1 mm arrow nudge, text instructions                                                        | P3 (later) |
| 22  | **QR code**                                                           | share a URL as a dot-matrix QR (§2.7)                                                          | `value` (URL), `ecc: M\|Q`, `size` (≥ 40u), `shortLink?`, `download?: ("svg"\|"png")[]`                 | `inline`, `dialog` ("Share this page"), `widget` (bento)                         | `role="img"` + label; URL as text + copy button; no reveal under reduced motion                                | P1         |

**Later / maybe (not v1):** Theme swatch picker (accent selection via swatches, after marijanapav.com's colour card; only if themes and swatches can be combined cleanly), Geist font theme.

Also needed but already present or covered: `Skeleton` (keep; drop the `circle` variant unless something needs it), `GlassPanel` (floating layers only), `Logo`.

**Suggested first PR:** #1–#11, plus `/design` stubs for each. Done in PR #128.

**Second catalog PR:** static DotMatrix (#19, still frame only), QR inline and widget (#22), Table (#12), Meter (#13). Animated DotMatrix scenes (scroll, paged motion, game mode) stay P2.

### Open core widgets

Smallest useful first. Tick an item in the same commit that ships it. A widget is shipped only when every line below is true. The audit note that these five were present but unfinished is superseded by this list: a box stays open until that widget meets it.

- One component in `packages/microgfx/src/ui`. It takes `locale` (`"en"` | `"de"`, default `"en"`) from `locale.ts`. Chrome copy goes through `uiText`. Numbers and dates go through `Intl`, not hand-built message strings. A client component keeps `meta` in `*-meta.ts` so the registry can load on the server. A server component may keep `meta` in the same file, as Meter, Table, and QR do.
- The meta has a Zod `propsSchema` (include `locale` there), `variants`, an accessibility note, and a `block` snippet. Set `acceptsChildren` when a layout document nests blocks inside it. `componentSpec` reads that flag. Do not add `locale` a second time in `blocks/props.ts`.
- The registry lists that meta. The command bar anchor is `/design#<id>` from the meta id. The `/design` specimen passes `locale`.
- `blocks/props.ts` registers the spec and `blocks/render.tsx` renders it, forwarding the document locale (`props.locale` overrides). Run `pnpm --filter @mnstrr/microgfx schema` and commit `packages/microgfx/layout.schema.json`.
- Vitest covers the variants and both locales.

Layout blocks (`stack`, `row`, `grid`, `section`) and the `text` block sit beside the component specs. The catalog is `blockSpecs`. Do not keep a second hand-written list of block types.

- [x] **Sparkline** — at most 64 numbers, no axes. Variants `line`, `bars`, `dots`. Last value printed; min/max dots optional. `role="img"` plus a one-line conclusion and a table of the values. SVG, server-renderable. P1 #14. Stat stays a number; this is the trend beside it.
- [x] **Clock** — 24-hour local time and the date, as a system-monitor readout. Timestamp stays the freshness stamp. The clock does not announce every tick. Under reduced motion it paints once and does not tick.
- [x] **Logbook** — one dated, tagged entry. Variants `compact` and `full`. `article` plus `time`; a list of entries is an `ol`. P1 #18.
- [x] **Bento** — cells of span `1×1`, `2×1`, `2×2`, `4×1` with a numeric `priority`. DOM order is that priority. On a narrow viewport every cell is full width, in the same order. P1 #17.
- [x] **File tree** — nested nodes from inline JSON, `pages.json`, or a projects document. Variants `static` and `links`. WAI-ARIA tree: right arrow opens a folder then moves into the first child, left arrow closes an open folder or moves to the parent, Home/End, `aria-expanded`. A locked node says "private" and is not a link. P2 #20.

Catalog widgets for the home and interactive set are presentational: now playing, links, pins, map, chart, banner, micrographic panel, search filter, and slider info. They take props, stack on a narrow viewport, and bind to live home data on `/` and `/design`. Still proposed, and not on this list: animated DotMatrix scenes, the QR share dialog, shortcut `q`, calibration (P3), theme swatches, and the command-palette restyle.

### Layout documents

A page body can be a JSON tree, rendered by `@mnstrr/microgfx/blocks`. `/lab` is the workbench for that tree: a JSON editor, a live preview, and a share URL. It is not a `pages.json` entry. The editor, the 390px frame, and the share query are application chrome, the same class of route as `/notes/<slug>`. The path stays short so a shared QR stays smaller. The route is `noindex`. Saving a layout to Supabase is later. The document is already one JSON value a row can store.

```json
{
  "version": 1,
  "id": "sample-spec",
  "title": "Sample spec",
  "root": {
    "type": "stack",
    "props": { "gap": 5 },
    "children": [
      {
        "type": "stat",
        "props": { "label": "Themes", "value": 6, "size": "lg" }
      }
    ]
  }
}
```

- `version` is `1`. `id` and `title` are optional. Each block has `type`, optional `props`, optional `children`, and an optional `id` (`a-z`, digits, hyphen).
- Catalog types are `blockSpecs` in `packages/microgfx/src/blocks/props.ts` (the same list the lab inserter and `layout.schema.json` use). Layout types are `stack`, `row`, `grid`, and `section`. `text` is one paragraph. A component block is one registry entry.
- Layout types use the 1u grid. `stack` and `row` take `gap` on the spacing scale `0 1 2 3 5 10 15 20 30 50 100`. `grid` adds `columns` from 1 to 12. `section` takes an optional sentence-case `eyebrow` and `title` (the eyebrow is uppercased in CSS). `text` is one paragraph.
- Where JSX passes `children`, JSON passes a string: `label` on a button, `text` on a label. A button `icon` is a `ph:` name. A panel's children are nested blocks.
- A `logbook` block is an `ol` of nested blocks, in the order written. The `Logbook` component's `entries` prop orders newest first. The printed date stays `YYYY-MM-DD`.
- A `bento-grid` block takes `bento-cell` children. Each cell has `span` (`1x1`, `2x1`, `2x2`, `4x1`; `3x1` still parses) and a numeric `priority`. The grid paints that priority order. Below `md`, every cell is one column wide.
- Unknown types and unknown props fail. Each issue names a path, such as `root.children[0].props.value`. A broken block renders that path in the preview. Valid siblings still render.
- Editors can point `$schema` at `https://muensterer.tech/lab/schema`. The same document is committed at `packages/microgfx/layout.schema.json` and served from `/lab/schema`.
- `/lab` stores the editor text in `localStorage` under `mnstrr.lab.v1`. A `layout` query on the URL wins over that store. `shareableUrl` keeps only that query. The QR on the page encodes the resulting URL.

---

## 7. Tokens (proposed)

Extends `packages/microgfx/src/tokens.css`. The theme colours keep coming from `config/themes.json` → `generated-themes.css`; the new **status** and **border-strong** keys should be added to the `themes.json` schema so every theme defines them, and accents get their own block. Values below are for `bw`.

```css
/* generated-themes.css (bw), new keys marked + */
html[data-theme="bw"][data-mode="light"] {
  --background: #ffffff;
  --foreground: #141414;
  --muted: #f4f4f5;
  --muted-foreground: #3f3f46;
  --border: #d4d4d8; /* hairlines, decorative */
  --border-strong: #71717a; /* + controls, 4.8:1 */
  --accent: #141414;
  --accent-foreground: #ffffff;
  --focus: #141414;
  --ok: #15803d; /* + */
  --warn: #a16207; /* + */
  --danger: #9f1239;
}
html[data-theme="bw"][data-mode="dark"] {
  --background: #0c0c0c;
  --foreground: #f5f5f5;
  --muted: #171717;
  --muted-foreground: #d4d4d8;
  --border: #3f3f46;
  --border-strong: #a1a1aa; /* + 7.6:1 */
  --accent: #f5f5f5;
  --accent-foreground: #0c0c0c;
  --focus: #f5f5f5;
  --ok: #4ade80; /* + */
  --warn: #facc15; /* + */
  --danger: #fda4af;
}

:root {
  /* metric unit system (+), §2.1 */
  --u: 0.25rem; /* 1u = 4px at default root size; labelled U, never MM */
  --px-per-mm: 3.7795; /* physical rulers only; overwritten per device by calibration */
  /* motion (+) */
  --dur-1: 80ms;
  --dur-2: 160ms;
  --dur-3: 240ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  /* lines (+) */
  --hairline: 1px; /* CSS px, never in u */
  --rule-strong: 2px;
  --tick: calc(3 * var(--u)); /* 12px, matches Frame's size-3 corners */
  --grid-minor: calc(
    5 *
    var(--u)
  ); /* 20px; gridPattern default today is 24px */
  --grid-major: calc(10 * var(--u)); /* 40px, labelled 10 U */
  --gutter: calc(5 * var(--u));
  --margin: calc(5 * var(--u)); /* 10u from md */
  --content-max: calc(300 * var(--u)); /* 1200px */
  --bento-min: calc(40 * var(--u)); /* 160px */
  --touch-min: calc(11 * var(--u)); /* 44px */
  /* QR (+), §2.7: always dark on light, never inverted in dark mode */
  --qr-plate: #ffffff; /* = the theme's light-mode background */
  --qr-ink: #141414; /* = the theme's light-mode foreground; ≥ 7:1 vs plate */
  --qr-module-min: var(--u);
  --qr-size-min: calc(40 * var(--u));
}
@media (min-width: 48rem) {
  :root {
    --margin: calc(10 * var(--u));
  }
}

@theme inline {
  /* existing mappings stay; additions: */
  --spacing: 0.25rem; /* = --u, so p-5 = 5u */
  --color-border-strong: var(--border-strong);
  --color-ok: var(--ok);
  --color-warn: var(--warn);

  --radius: 0px;
  --radius-pill: 9999px;
  --shadow-overlay: none;

  --text-label: 0.6875rem;
  --text-label--line-height: calc(4 * var(--u));
  --text-label--letter-spacing: 0.12em;
  --text-xs: 0.75rem;
  --text-xs--line-height: calc(4 * var(--u));
  --text-sm: 0.875rem;
  --text-sm--line-height: calc(5 * var(--u));
  --text-base: 1rem;
  --text-base--line-height: calc(6 * var(--u));
  --text-lg: 1.25rem;
  --text-lg--line-height: calc(7 * var(--u));
  --text-xl: 1.5rem;
  --text-xl--line-height: calc(8 * var(--u));
  --text-2xl: 2rem;
  --text-2xl--line-height: calc(9 * var(--u));
  --text-readout: 2.5rem;
  --text-readout--line-height: calc(10 * var(--u));
  --text-display: 3.5rem;
  --text-display--line-height: calc(14 * var(--u));

  --font-weight-normal: 400;
  --font-weight-medium: 500;

  --ease-out: var(--ease-out);
  --ease-in-out: var(--ease-in-out);

  --breakpoint-md: 48rem;
  --breakpoint-lg: 64rem;
}

/* utility (+) */
@utility label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  line-height: var(--text-label--line-height);
  letter-spacing: var(--text-label--letter-spacing);
  text-transform: uppercase;
  color: var(--muted-foreground);
}
@utility num {
  font-variant-numeric: tabular-nums slashed-zero;
}
```

Implementation notes: Tailwind v4's default `--spacing` is already `0.25rem`, so setting it explicitly changes nothing today; it documents 1u. `--px-per-mm` is set before paint by the boot script from the per-device calibration. `--qr-plate`/`--qr-ink` are generated per theme from its light-mode values, so they don't change with `data-mode`. No accent override in v1: `--accent` comes from the theme only. `--ok/--warn` in dark mode are for dots and icons; check text contrast per theme.

---

## 7.1 Loading Indicators & Context Mapping

Indicators from **loading.dev** (`loading-dev`) and skeletons are mapped to contexts according to §16.2:
- **`stream`** (`Orbit` indicator, 20px default): used for dynamic streamed blocks and incoming partial responses.
- **`palette`** (`Arc` indicator, 16px default): used for command-bar search and palette results groups.
- **`widget`** (`Radar` indicator, 24px default): used for data widgets and layout blocks.
- **`export`** (`Blocks` indicator, 20px default): used for async export operations (PNG/JSON export, sync).

All indicators respect `prefers-reduced-motion` (animations stop or reduce to static states) and are announced via ARIA live regions (`aria-live="polite"` or `"assertive"`).

---

## 8. Decisions

**Decided (2026-11-04):**
- **Fonts:** IBM Plex Sans + Plex Mono. Geist + Geist Mono may come later as an optional font theme, not in v1.
- **Accent:** no swatches in v1; each theme keeps its own accent. The swatch picker is on the later/maybe list.
- **Labels:** uppercase mono only for small eyebrow labels; headings and body stay sentence case.
- **German:** "Sie".
- **Units:** 1u = 4px, labelled `U`. `MM` only on calibrated physical rulers, `≈ MM` when uncalibrated. Calibration stays (P3).
- **Where this lives:** one hand-maintained file, this `DESIGN.md`, at the repo root. It is not generated from `packages/microgfx/docs/*.md`, and it is not split per section. `/design.md` serves this file.
