# Enterprise design contract

Enterprise is a white-label, keyboard-first work platform with a restrained, high-density
developer-tool aesthetic. Dark mode is canonical; light mode is derived role-for-role.

Live components: https://storybook.otrobonita.com

Normative source: `contracts/design-system/SPECIFICATION.md`

## Visual grammar

- Near-monochrome 12-step neutral scales. One sparse accent. Colour does not create structure.
- Depth comes from tonal surface differences and low-contrast 1px hairlines, not card shadows.
- Inter for interface text; mono for identifiers. Base UI text is 13px with weights 400/500/600.
- 4px spacing grid. Controls are 28–32px high; 24px is reserved for exceptional dense contexts.
- Motion lasts 100–200ms with ease-out and no bounce.
- Icons are 16px, 1.5px stroke and monochrome.
- Visible focus, visible shortcuts and complete keyboard paths are mandatory.

## Implementation grammar

Interaction behaviour comes from Base UI and Radix-style primitives. Enterprise owns component APIs
and visual recipes. Tailwind remains a compilation and layout tool, not the public design vocabulary.

```tsx
<Button variant="primary">Save release</Button>
<Button variant="quiet">Cancel</Button>
<Input aria-invalid={hasError} />
<Card size="sm">...</Card>
```

Semantic styling hooks use the `ent-` namespace: `ent-control`, `ent-field`, `ent-surface`, `ent-text`
and `ent-layout`. New subsystem code must not invent colours, type scales, shadows, radii, focus
treatments or control heights with utility strings. Promote repeated visual decisions into tokens,
semantic recipes or component variants.

## Storybook contract

Every public component documents purpose, variants, states, keyboard behaviour, accessibility,
consumed tokens and compact examples in both modes. A design change is incomplete until its tokens,
component implementation and Storybook story agree.

## Subsystems

Shell/IAM, PDM, Issues, QTS, DSP, Design and Time share foundations and component
contracts. A subsystem may own domain workflow patterns; it may not create a parallel visual system.
Patterns graduate to shared ownership when a second subsystem needs them.
