Modes and surfaces

The five surface ramps, the light and dark rules, and what changes when a mode changes.

One ramp per layer

Scope: every surface and every theme.

Rule. A surface chooses its ramp and its mode. It does not choose a palette for a single component. Every layer uses --surface-0 through --surface-7. The page is step 1, a card is step 2, a button or field is step 3, hover is step 4, and selected is step 5. The header is step 1 and the footer is step 0. Menu and toast panels sit two steps above the surface beneath them. The tooltip is the exception: it uses the highest solid step for legibility. Nothing skips a step, and nesting stops at step 7.

The root sets data-surface="main", dev, api, mind, or welcome. Mind and welcome also accept data-theme="light". Main, dev, and api are dark only. Mind and welcome support both modes.

Ramp selection
SurfaceRampMode
mainMain and devDark only
devMain and devDark only
apiNavy and oceanDark only
welcomeNeutralDark and light
mindNeutralDark and light

Dark surfaces

Main and dev share one ramp. API has its own navy ramp. Mind has a neutral ramp.

Main and dev use the same values. Dev is the source of truth for the rules, not a separate palette. API uses the navy and ocean ramp so a contract page reads as a different technical surface without leaving the institution. Mind uses a neutral ramp for long work sessions.

main / dev

Card on step 2

Body text uses the ramp, not a literal color.

api

Card on step 2

The same component, the API ramp.

mind / welcome, dark

Card on step 2

The same component, the neutral ramp.

Light surfaces

Mind and welcome reverse the direction of the ramp. The page is the darkest step and each layer lightens toward white.

The light ramp keeps the same hierarchy. The page is step 1, a card is step 2, and a button or field is step 3. The steps get lighter rather than darker. Text flips to the dark text tokens. The accent, status, and focus roles stay the same.

mind / welcome, light

Card on step 2

The same component, the light ramp.

What changes and what does not

A mode changes the token values. It does not change the component rules.

The surface ramp, text tokens, accent, status colors, and focus color change with the surface and mode. The component still derives its fill from its container. A card is still container +1. Hover is still +1 above the resting fill. Selected is still +2. The radius, the grouping distances, the focus ring, and the linear motion rules do not change.

Rule. Do not mix a component from one ramp into another. An API card does not take the main ramp. The surface is the context, and the component reads it.

Why. A component that hard-codes a surface step cannot move between ramps. It looks correct on one page and wrong on the next, and the next person copies the wrong value.

Mode and surface boundaries
DoDo not
Set data-surface on the root and let the component read its container.Hard-code a surface value inside a component.
Use data-theme="light" only on mind or welcome.Add a light mode to main, dev, or api.
Use the next solid step for hover and selected.Invert the dark ramp to make a light theme.
Keep Mind on Eina for display and ASM for body and interface.Ship a Helvetica-only Mind surface.

Enforcement

Check the surface and the mode, then check the component.

  1. Set the root data-surface. Confirm the page uses the correct ramp.
  2. Set data-theme="light" only on mind or welcome. Confirm main, dev, and api have no light mode.
  3. Check page, card, field, hover, and selected steps in order. Nothing may skip a step.
  4. Check text, muted text, status, accent, and focus on the rendered surface.
  5. Check the same component across surfaces. The rules must not change with the ramp.
  6. Check the light ramp for a page that is genuinely lighter, not an inverted dark ramp with the same values.
  7. Run npm run check:design-rules and npm run check:design-runtime.

Owner: the Design owner. Review: before a new surface, a new theme, or a ramp change ships.