Design system
The site is a dark industrial laboratory: near-black steel surfaces, condensed display type, small mono data labels, thin technical rules, acid-lime actions and square corners. There are no rounded controls.
Tokens
Each page or component that is part of the lab look defines these on its root and uses them everywhere inside:
| Token | Value | Use |
|---|---|---|
--lab-bg | #050806 | Page background |
--lab-panel | #08100b | Panels and cards |
--lab-raised | #0d1510 | Inputs and raised rows |
--lab-line | rgb(202 226 197 / 27%) | Borders |
--lab-line-soft | rgb(202 226 197 / 14%) | Dividers |
--lab-ink | #fbfdfb | Main text and values |
--lab-muted | #c6d0c8 | Labels and secondary text. Body paragraphs use #e6ede7 |
--lab-acid | #b7ff39 | Actions and highlights |
Fonts: Barlow Condensed (--font-display) for headings and numbers, DM Mono (--font-interface) for labels and body. Mono body text is weight 500, not 400: the regular weight looks thin on the dark background.
Patterns
Section heading: an acid-lime numbered label, then a large uppercase display title.
Panels: one border, no shadow, no radius. Stat tiles share a border and divide with soft lines.
Primary action: solid acid background with dark text, inverting to an outline on hover. Secondary: outline.
Full-bleed pages pull themselves over the layout padding with
margin: 0 calc(clamp(18px, 2.8vw, 42px) * -1) -72px.Pages use a banner image from
public/assets/with a dark gradient over it.Dropdowns use
LabSelect(src/components/lab-select.tsx), never a native<select>: the browser draws a native dropdown itself, so the page's styling cannot reach it. It supports controlled and uncontrolled use, submits through a hidden input when given aname, and works with the keyboard (arrows, Home, End, Enter, Escape). It draws its own caption instead of sitting inside a<label>, because a label would re-open it on every click.
Pitfalls
- Global CSS leaks.
globals.cssandlight.cssset button and input radii,button:disabledopacity, footer layout and more. Component modules need a higher-specificity override such as.page button. On the per-token page, scoped rules use!importantfor radii and a few backgrounds. - Smooth scroll. The site uses Lenis. Any element that scrolls on its own (a dropdown list, a dialog body) needs the
data-lenis-preventattribute or the page scrolls instead. - Main padding.
mainhas 72px of bottom padding and the footer has no top margin, so full-bleed pages must cover the padding or a grey strip shows above the footer. - Sticky bars. The header is sticky at the top. Do not add another sticky element at
top: 0. - Image sizing. Do not set
width: autoon<img>elements that use width and height attributes.
Theme
A light and dark theme switch exists in the header, driven by data-theme on the root element. The lab pages use their own fixed dark palette, so the switch mainly affects older shared components.