Skip to system
01 / Foundations

Tokens and visual grammar

Palette, spacing, radii, elevation, motion and layer ownership for the arcade companion selector.

Canonical tokens
productionsrc/app/design-tokens.css--ink--cream--lime--yellow

Core palette

Click any token to copy its exact production value.

productionsrc/app/design-tokens.css + src/data/visual-system-contracts.ts--surface-*--text-*--feedback-*--shadow-*

Semantic token aliases

Components consume role-based aliases. Palette names remain implementation details instead of leaking into component APIs.

Surfaces
Text and borders
Feedback
Depth and focus
RoleFamilyLine heightTracking
Display XLOxanium 8000.92−0.055em
Heading XLOxanium 8000.98−0.04em
TitleOxanium 8001.05−0.025em
ReadingInter 400–7001.55Normal
CommandJetBrains Mono 800–9501.00.02em

Spacing cadence

4px is the base unit. Select a token to inspect the real inset.

24px inset
productionsrc/app/design-tokens.css--radius-inner--radius-control--radius-surface--radius-panel

Radius hierarchy

Choose a role token, then inspect the concentric outer/inner rule. Pills remain restricted to true circles.

Outer · 12px
Inner · 8px4px measured inset
Rinner = max(0, Router − inset)

Surface uses a 4px measured inset. Nested corners share one center; a child never copies the parent radius when padding separates their edges.

Outer ownerOuter radiusTypical insetInner result
Card / surface12px4px8px control
Dialog / panel18px6px12px surface
Persistent tray20px8px12px surface
Control8px2px6px inner
True circle999pxEqual width / heightCircle only
productionsrc/app/design-tokens.css + src/app/globals.css--border-subtle--focus-ring--shadow-surface

Border hierarchy

A border communicates ownership: passive surfaces stay quiet, while tactile controls carry the stronger arcade outline.

Passive surface
1px subtle frame

Cards, panels and documentation blocks use elevation and a quiet theme-aware edge instead of a bright outline.

1px solid var(--border-subtle)
Tactile keycap
2px interaction frame

Buttons, selected controls and intentional interaction specimens retain the hard arcade silhouette and physical depth.

2px solid var(--text-primary)
Keyboard focus
Ring outside the edge

Focus never thickens a passive card. The shared external ring adds state without moving geometry or replacing its border.

box-shadow: var(--focus-ring)
OwnerBorderDepthExamples
Passive surface1px subtleSurface shadowCards, panels, Heroes
Tactile control2px high contrastHard keycap extrusionButtons, selected controls
Focus stateSurface border unchangedExternal ringKeyboard focus
productionsrc/app/design-tokens.css--shadow-card--shadow-card-dark

Large-card shadow system

Large surfaces keep two-layer separation in both themes.

Light themeLarge surface
Catalog card

Paper surface · 12px radius · soft theme-aware ledge.

0 12px 0 rgba(21,21,21,.07),
0 24px 52px rgba(21,21,21,.11)
Dark themeLarge surface
Catalog card

Dark surface · pale ledge · black ambient falloff.

0 12px 0 rgba(248,250,239,.07),
0 24px 52px rgba(0,0,0,.40)
RuleDark-mode cards never become flat. Controls use hard extrusion; large surfaces use a short ledge plus ambient depth.
productionsrc/app/design-tokens.css--motion-*--layer-*--arcade-depth-*

Depth, motion and layer ownership

FamilyDepthMotionUse
Compact3px140msChips and small commands
Control4px140–180msButtons and fields
Action5px140–180msPrimary commands
Panel6px230–260msResult and filter panels
Modal8–12px260–360msDialog and persistent tray
Layer 100

Persistent controls and the mobile system dock.

Layer 200

Menus and local popovers above persistent UI.

Layer 400

Modal surfaces with focus ownership.

Layer 500

Toast feedback above every interactive surface.

productiondocs/development/motion-stack-decision.md--motion-panel

Motion lab

Replay the four production timing families. Only transform and opacity move; reduced motion keeps the state change without the travel.

Origin
panelArcade panel260ms var(--ease-out)
productionsrc/app/design-tokens.css + src/app/globals.css

Component token map

Global tokens describe shared meaning; component-local tokens own measured geometry that should not leak into unrelated surfaces.

TokenValueOwnerUsed by
--top-control-gap0.82rem / 0.5rem mobileGlobal compositionEscape, Matcher, Theme
--top-control-heightvar(--command-height)Global compositionTop control row
--top-island-widthmin(50rem, available width)MatcherSmart Search open/closed shell
--tray-compact-height4.12rem / 3.72rem mobileCompanion TrayCompact and expanded clipping
--floating-ui-clearanceroute responsivePage compositionTray-safe content ending
--persistent-bottom-offsetsafe-area responsiveFloating compositionCompanion Tray and Visual System index
--toast-stack-gap24pxFeedback stackExpanded Toast cards
--loadout-accentrank accentLoadout cardPlatform, HUD and glow