Typography
Families — self-hosted, variable, OFL 1.1
no CDN, no third-party font request; open-source under OFL 1.1 (see fonts/LICENSE-OFL.txt)Weight axis (one variable file per family)
sheet uses 400 body · 500 controls · 600/700 headingsType scale (every size the sheets declare)
computed at the 16px base (typography.base-size; the default root renders it)| Selector | CSS | Computed | Weight | Tracking | Case | Live sample |
|---|---|---|---|---|---|---|
| .ps-code / --fs-display | 2.375rem | 38px | 700 | -0.02em | — | Aa 1,204 — mail |
| h1 | 1.5rem | 24px | 700 | -0.03em | — | Aa 1,204 — mail |
| .page-title | 1.5rem | 24px | 700 | -0.03em | — | Aa 1,204 — mail |
| .metric.primary b | 1.875rem | 30px | 700 | -0.02em | — | Aa 1,204 — mail |
| .metric b | 1.375rem | 22px | 700 | -0.02em | — | Aa 1,204 — mail |
| .stat b | 1.375rem | 22px | inherit | -0.02em | — | Aa 1,204 — mail |
| .chat-empty-title | 1.25rem | 20px | 700 | -0.02em | — | Aa 1,204 — mail |
| h2 | 1.1562rem | 18.5px | 600 | -0.02em | — | Aa 1,204 — mail |
| .sec-h | 1.0938rem | 17.5px | 700 | -0.02em | — | Aa 1,204 — mail |
| h3 | 1.0625rem | 17px | 600 | -0.01em | — | Aa 1,204 — mail |
| h4 (--fs-nav-item) | 0.875rem | 14px | 600 | -0.01em | — | Aa 1,204 — mail |
| body | 1rem | 16px | 400 | — | — | Aa 1,204 — mail |
| .tbl th / .tbl td | 0.875rem | 14px | inherit | — | — | Aa 1,204 — mail |
| .prose | 0.9375rem | 15px | 400 | — | — | Aa 1,204 — mail |
| .bubble | 0.875rem | 14px | 400 | — | — | Aa 1,204 — mail |
| .nav-item | 0.875rem | 14px | 500 | — | — | Aa 1,204 — mail |
| .sub | 0.8438rem | 13.5px | 400 | — | — | Aa 1,204 — mail |
| label / .mono / code | 0.8125rem | 13px | 500 | — | — | Aa 1,204 — mail |
| .logpanel .logrow | 0.7812rem | 12.5px | 400 | — | — | Aa 1,204 — mail |
| pre.log | 0.7812rem | 12.5px | 400 | — | — | Aa 1,204 — mail |
| .copy | 0.75rem | 12px | 400 | — | — | Aa 1,204 — mail |
| .kbd | 0.75rem | 12px | 400 | — | — | Aa 1,204 — mail |
| .nav-label | 0.75rem | 12px | 600 | +0.09em | uppercase | Aa 1,204 — mail |
| .badge | 0.75rem | 12px | 600 | +0.06em | uppercase | Aa 1,204 — mail |
| .p-tag | 0.75rem | 12px | 700 | +0.08em | uppercase | Aa 1,204 — mail |
Page hierarchy — five levels, one role each
live specimen runs page title → section → card → body → metaType sizes are a scale; a page is a hierarchy. Each level below has one element, one token and one job — don't skip levels or spend a lower level on decoration.
| Level | Element / class | Token | Job |
|---|---|---|---|
| Page title | <h1 class="page-title"> | --fs-page-title · 24px | the one title of the page (a viewer may use the record subject) |
| Section heading | <h2 class="sec-h"> | --fs-sec-h · 17.5px | starts a section — a group of cards |
| Card heading | <h3> in .card-h | --fs-h3 · 17px | names one card |
| Body | <p> | --fs-body · 16px | running copy on the base size |
| Message body | .prose | --fs-prose · 15px | plain-text mail body, 1.65 line-height |
| Meta | .sub / .mono / .badge | --fs-sub 13.5 / --fs-label 13 / --fs-badge 12px | secondary detail, machine values, status |
Recent filings
--fs-h3 · 17px · names one card (h3 inside .card-h)- Do keep exactly one page title (h1.page-title) per page; a viewer may make the record subject the title.
- Do start each section with h2.sec-h and each card with an h3 in .card-h — never skip a level.
- Do leave body copy on the 16px base and demote secondary detail to .sub/.mono; meta is never a heading.
- Don't shrink a page title with inline font-size to fit a long subject — let it wrap at --fs-page-title.
- Don't use a section heading as a card label or a card heading to start a section; they mark different scopes.
Rules
Base: 16px / 1.55, -webkit-font-smoothing:antialiased. Headings carry negative tracking (−0.03em at h1 down to −0.01em at h3/h4) which is what gives the type its tight, engineered rhythm.
Numbers: stat/metric values are font-variant-numeric:tabular-nums so counters don't jitter.
Mono contexts: timestamps, code/.mono chips, kbd, log feeds, audit traces, and textarea (textareas are mono by default).
Micro-copy: badges, nav labels, proposal tags, copy/kbd chips and table headers are all ≥12px (0.75–0.875rem), uppercase where they are labels, with +0.06–0.09em tracking. Sentence case is the default for buttons, links, menu items.
Specimen
live components at their shipped sizesH3 card heading
Densities — comfortable (default) and compact
same markup, two densities — the attribute flips --base-size and the label floorComfortable is the default: no attribute needed. typography.base-size is 16px and the root is --base-size:1rem, so every --fs-* step renders its authored px (body 16, table 14, labels ≥12).
Compact is opt-in via html[data-density="compact"]. Its values come from the same tokens.json (a com.triage.compact extension) and are emitted as a :root[data-density="compact"] block by tools/build_tokens.py — never hand-written in src/core/. It sets --base-size:0.9375rem (body ≈15px) and lifts the label steps to 0.8rem so they stay ≥12px at the smaller root.
Architecture — how the scale is built
- One root: html{font-size:var(--base-size)} (1rem = 16px by default), so every rem token renders the documented pixel value. Change the root (or opt into compact) and the whole scale follows.
- Emitted as tokens: 25 --fs-* sizes, 4 --fw-* weights and 3 --lh-* line-heights; core consumes them (no raw sizes in the sheets).
- Role families: display & metrics (1.375–2.375rem) → headings (1.0625–1.5) → body/table (0.875–1rem) → UI/labels (0.8125–0.875) → uppercase micro-labels (0.75) → mono data (0.75–0.7812).
- Tracking: negative on large text (−0.03em at h1), positive on uppercase micro (+0.06–0.09em) — size and case compound, so they compensate.
- Numbers: metrics, stats and table numerals are tabular so counters never jitter.
- Mono is semantic: timestamps, IDs, code, terminals, textareas — Geist Mono signals “machine value”.
Suggestions derived
- Collapse to a modular scale (e.g. 1.125 for UI, 1.2 for prose) at the next major: today’s scale is a role census with near-duplicates (h1 = page-title, h4 = nav-item, badge = nav-label = p-tag = copy = kbd). Roles can stay while sizes snap.
- Micro floor is now 12px: badges, nav labels, proposal tags, copy/kbd chips and table headers all compute ≥12px at both densities (they were 9.6–9.9px before 0.9.0).
- One display size: --fs-display (2.375rem), --fs-metric-primary (1.875rem) and --fs-h1 (1.5rem) compete for “big number / big title” — pick one for each job in a future pass.
- Host integration: if a host app must keep its own root, consume the rem tokens as-is; they scale proportionally and all pairings stay intact. Prefer the comfortable default and opt into data-density="compact" only when a denser layout is required.