MUTATE
// Documentation

Docs

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:

TokenValueUse
--lab-bg#050806Page background
--lab-panel#08100bPanels and cards
--lab-raised#0d1510Inputs and raised rows
--lab-linergb(202 226 197 / 27%)Borders
--lab-line-softrgb(202 226 197 / 14%)Dividers
--lab-ink#fbfdfbMain text and values
--lab-muted#c6d0c8Labels and secondary text. Body paragraphs use #e6ede7
--lab-acid#b7ff39Actions 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 a name, 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.css and light.css set button and input radii, button:disabled opacity, footer layout and more. Component modules need a higher-specificity override such as .page button. On the per-token page, scoped rules use !important for 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-prevent attribute or the page scrolls instead.
  • Main padding. main has 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: auto on <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.