# Design system foundation

**Status:** Reference and proposal for review · December 1, 2026

This is the source of truth for the foundation pass. It records what was measured in Macro’s signed-in desktop workspace, the patterns exercised with sample data, and the first set of proposed values for our own library. Measurements below are reference evidence. The companion [token file](design-tokens.json) contains proposed library values and a separate machine-readable record of sampled reference measurements.

## Design direction

Use Macro’s operating qualities as the benchmark: compact readable typography, shallow surface changes, quiet chrome, and fast movement between a list and its detail. Put density in repeated controls and rows. Give forms and reading surfaces more room. Selection, focus, validation, and destructive actions each need their own visual cue.

The approved brand direction uses pure black on the dark documentation canvas, a grayscale surface ramp, high-contrast ink, and neutral accents. Status colors retain their functional roles. Build a shared vocabulary for the homepage, docs, and sample applications. Use exact browser measurements to judge proportions and rhythm. Create original interface compositions, artwork, and icon artwork for distribution.

## Reference measurements

### Typography

The observed workspace font stack begins with `-apple-system, system-ui, "Inter Variable", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif`, followed by emoji fallbacks. This is the CSS fallback order. The browser did not expose the actual font file used for each glyph. Use system-first typography for workspace body text and controls. Use Geist Variable for homepage and documentation headings. Inlay UI bundles the Google Fonts Latin face, with system fallback. [Geist on Google Fonts](https://fonts.google.com/specimen/Geist)

| Role | Size / line height | Weight | Tracking | Live sample |
| --- | --- | --- | --- | --- |
| Small label | 12 / 16 px | 500 | Normal | Home auxiliary heading |
| Control / menu trigger | 14 / 20 px | 500 | Normal on standard buttons | Tasks filter and group controls |
| Dense pane title | 14 / 20 px | 600 | -0.42 px | Tasks sidebar title inside a 28 px row |
| App body and input body | 15 / 24 px | 400 | Normal | Workspace main text; 24 px high editable line on Home |
| Section header | 15 / 24 px | 500 to 600 | Normal | Appearance sections and Home headings |
| Settings title | 26 / 32.5 px | 500 | -0.65 px | Appearance page heading |
| Settings search input | 14 / 20 px | 400 | Normal | Search settings text input |

Specify type as a size, line height, weight, and tracking tuple. A control’s box height is separate from its text line height. Macro’s public feature heading measured 40 px at weight 320, with a 46.4 px line height and -1.6 px tracking. Inlay UI uses the public homepage measurements below for the main page title. [Macro Mail](https://macro.com/email)

### Color and theme

| Role | Macro Dark, measured | Macro Light editor |
| --- | --- | --- |
| Surface 0 | `#0e0e0e` | `#f5f5f5` |
| Surface 1 | `#121212` | `#fcfcfc` |
| Surface 2 | Base mixed 95:5 with white in OKLCH | `#ffffff` |
| Surface 3 | Base mixed 93:7 with white in OKLCH | `#ffffff` |
| Surface 4 | Base mixed 91:9 with white in OKLCH | `#ffffff` |
| Ink / muted ink | `oklch(1 0 21deg)` / `oklch(0.83 0 21deg)` | Role confirmed in the editor; values unmeasured |
| Subtle / disabled / placeholder | `oklch(0.75 0 21deg)` / `oklch(0.63 0 21deg)` / `oklch(0.55 0 21deg)` | Values unmeasured |
| Edge / muted edge | Base mixed 91:9 and 95:5 with white in OKLCH | Values unmeasured |
| Divider / button / frame / focus edge | White at 4% / 5% / 8% / 40% opacity | Values unmeasured |
| Accent | `oklch(0.7 0.12 250deg)` | Role confirmed in the editor; value unmeasured |
| Accent tint / hover tint | Accent at 8% / 20% opacity | Values unmeasured |
| Success / warning | `oklch(0.75 0.2 149.579deg)` / `oklch(0.75 0.2 70.08deg)` | Values unmeasured |

Active rail selection used primary ink against a white wash at 3% opacity. Resting, unselected controls had transparent backgrounds and muted ink. The theme editor exposes surface, content, edge, and accent groups. Several Light surface roles resolve to white in the editor, so keep the semantic roles independent when they share a value.

Use an obvious control boundary wherever identifying the input depends on the border. Reserve weaker separators for grouping. Use a distinct focus ring and combine status colors with labels or icons. Validate ink and UI contrast on each surface where a role is used. Across the five proposed surfaces in each theme, the lowest sampled text contrast was 4.63:1. State boundaries for checkboxes, radio controls, and switches use a stronger edge. Focus rings reached at least 10.00:1. These are token pair calculations.

### Spacing, padding, and layout

| Live sample | Measured value | Interpretation for our library |
| --- | --- | --- |
| Global icon navigation | 40 px wide content stack, 16 px top padding | Use optical centering and reserve space for navigation tooltips |
| Global icon button | 40 × 40 px, 0 inset padding, 12 px corner radius | Use 40 px desktop controls and a 44 px touch target where the layout permits |
| Secondary navigation | 240 px content width, 2 px internal gap; 256 px outer task header | Plan for a compact group and a separate outer frame |
| Standard Tasks toolbar button | 32 px tall, 2 px block / 8 px inline padding, 8 px icon gap | Center the text and icon; text and box tracks stay separate |
| Auxiliary labeled action | 32 px tall, 2 px block / 8 px inline padding, 6 px icon gap | Use tighter grouping for a tightly paired icon and label |
| Compact Tasks toolbar sample | 28 px tall, 2 px block / 8 px inline padding; sampled pill shape | Reserve compact size for dense desktop toolbars |
| Settings header spacing | 16 px gap | Default spacing between neighboring header elements |
| Split separator | 8 px interaction strip | Keep the visual rule fine; make the resize strip easy to grab |
| Notifications list header | 360 px wide panel; 48 px header | Sample desktop list-detail proportions |
| Booking form | 672 × 576 px dialog, 624 px title field, 36 px field height | The width difference gives 24 px inset per side for the sampled field |
| Unsaved changes confirmation | 440 × 149 px dialog at the sampled viewport | Confirmation uses a shorter, narrower surface than its editor |

Reference viewport for desktop shell measurements was 1389 × 1195 CSS px. Heights and widths are snapshots of individual controls and layouts. Use 2/4/6/8/12/16/24/32 px as the candidate spacing vocabulary. Treat the 4, 12, and 32 px spacing entries as proposal values. Validate the responsive rules on our own layouts.

### Icons

| Use | Observed icon box | Observed drawing |
| --- | --- | --- |
| Chevron and compact affordance | 12 px | 24-unit viewBox; 2-unit stroke |
| Small inline glyph | 14 px | Same viewBox and stroke in the sampled glyph |
| Local nav and toolbar | 16 px | Same viewBox and stroke |
| Global nav and search | 20 px | Same viewBox and stroke; 40 px control |

Outline glyphs were the common sampled treatment. Measurements reflect computed SVG stroke width on geometry inside a 24-unit viewBox. They do not imply a constant 2 CSS pixel line at every rendered size. Use a consistent outline set with `currentColor`. Start with search, add, close, back, chevron, filter, sort, group, more, panel, expand, and check. Pair controls with explicit accessible names, especially where the visible icon is the only cue. Reserve filled symbols for status or selection where appropriate. Inlay UI uses Phosphor Regular icons for documentation navigation and tools. [Phosphor Icons](https://phosphoricons.com/)

## Interaction and state contracts

| Pattern | Source behavior captured | Rule for our library |
| --- | --- | --- |
| Workspace navigation | Global rail, local navigation, module header, scoped actions; distinct active and resting states | Keep global destination, local destination, and row selection separately identifiable |
| List and detail | Notifications has an unselected detail state; Drive opened a starter document; Tasks could move its composer into a split | Keep list context when a detail opens. Give focus and close actions explicit names and restore focus to the relevant trigger |
| Resizable or focused pane | An 8 px separator was present and an expanded task composer opened in a split; pointer drag and keyboard resizing were not exercised | Provide a visual rule, pointer handle, keyboard controls, and a return from focus mode |
| Search | Blank field receives focus; sample query produced loading then no results; operator menu and clear control were present | Specify idle, typed, loading, results, no results, error, and clear. Keep query text visible |
| Create palette | Search input receives focus; keyboard hints, action preview, and new-split choice appear; unmatched query gives a clear empty state | Keep preview separate from action. Make keyboard navigation, select, escape, and focus return explicit |
| Composers | Task and event opened with Title focused. Primary actions started disabled and enabled after sample input. Task exposed an inline property picker | Use stable field order, contextual actions, and inline validation with useful recovery |
| Unsaved changes | Booking and event prompted before losing sample text. Initial focus was on keeping the draft | Focus the keep-editing action first. Discard the draft only when confirmed and restore focus afterward |
| Multi-step form | Channel name advanced to a visibility step using sample input | Carry field values between steps and make Back return without losing work |
| Mode switch | Calendar exposed Day, Week, Month, and Agenda; each selected state was exercised. Task List and Board were exercised | Use the appropriate native or ARIA selection model. Keep selected mode visually and semantically apparent |
| Empty and status | Chat, Calls, Reviews, Customers, and Notifications exposed contextual empty states | Distinguish no data, no selection, no matches, loading, error, and a disabled action |
| Settings | Appearance includes System/Light/Dark, separate picks for light and dark themes, and a theme editor | Keep theme mode and theme palette separate. Treat preference settings as independent controls |

Future states to require before shipping a component include hover, focus-visible, pressed, selected, disabled, invalid, and loading wherever applicable. Use tab order and logical focus movement, text labels for meaningful status, and reduced-motion support. Inlay UI motion uses 120 ms for control feedback, 240 ms for an overlay entrance, 160 ms for exit, and 220 ms for disclosure. The stylesheet uses zero duration for reduced motion. The Macro motion timings were not measured.

## Coverage and remaining evidence

| Area | Evidence from this pass |
| --- | --- |
| Home, Notifications, Drive | Opened all three. Inspected workspace scaffold, notification list and blank detail, Drive Recent and Shared views, starter database entry, and opened the starter document. The database edit workflow was not verified. |
| Email, Chat | Opened both modules. Tested email subject with sample text and cleared it. Tested channel name and advanced to visibility, then closed it. Sending, populated threads, and channel creation were outside the completed coverage. |
| Tasks, Calendar, Scheduling | Opened all three. Tested task list and board, task title and description, property picker, and expanded split. Tested calendar views and event title and location. Tested booking title and discard, and cancelled sample drafts. |
| Agents, Customers, Calls, Reviews | Opened all four. Captured available layout, toolbar and empty-state patterns. Integration-backed review, call, agent run and customer detail workflows were not exercised. |
| Settings and Downloads | Visited account and the visible settings categories, including theme, shortcuts, downloads, personal, workspace, block and developer panels. Sampled the Light editor swatches and active Dark tokens. Account-management and credential workflows were not exercised. |
| Global Search and Create | Exercised search loading and no-results and create-palette no-match. Inventoried 17 create entries. Previewed 13 directly via filtered selection. Form, Channel, Project, and Code were visible as entries, but their individual previews were not verified in that pass. The channel form was tested separately. |
| Specialized editors and device modes | Starter document inspected read-only. Canvas, spreadsheet, form, snippet, routine, skill, and code editors were surfaced through create entry points and remain to be exercised end to end. Mobile layouts, live collaboration, integration-enabled states, and destructive actions remain unverified. |

The captures in this handoff are measured values and written state records. Workspace records, account names, and private screenshots are excluded.

## Homepage and docs direction

### Public-page brand measurements

The live Tasks page at 1389 × 1195 CSS px used centered typography, a 200 px black sidebar, 12 px group labels on a 19.2 px line and 14 px navigation links on 32 px rows. Both used weight 370. Regular links measured #999999, group labels used white at 70% opacity, and the active route used white text and a white 1 px rail. The inactive rail used white at 10% opacity. The rail started 8 px inside the navigation content, and group rows placed a 16 px outline icon before the label. The rail scrolled independently with its scrollbar hidden. Macro’s published stylesheet lists both variable fonts and the hidden-scrollbar utility. The rendered sidebar gave the active font weights, colors, offsets, and selection treatment. [Published stylesheet](https://macro.com/assets/main-BfTu-FRp.css) Its outer divider sampled at one pixel of #121212 against pure black in the supplied screenshot. Inlay UI uses a translucent edge for the dark sidebar. The hero heading sat at 172 px from the viewport top in that capture. Supporting text was Inter Variable at 17.5 px, weight 370, with 28.875 px leading and a 495 px sample measure. The main action was a 40 px pill with 14 px text. The hero reserved 64 px of bottom space ahead of the product media. Inlay UI uses those measurements to guide its own homepage and uses the coss ui shape scale for its controls. [Macro Tasks](https://macro.com/tasks)

The live homepage title measured 40 px Roboto Slab Variable at weight 315, with 44 px leading and -1.4 px tracking. Its supporting copy used Inter Variable at 17.5 px and weight 370. The two 40 px action pills used 14 px Inter at weight 500. The 800 × 450 px product tour followed 56 px below the actions. Inlay UI uses this hierarchy with its own responsive grayscale preview, example switcher, and copy tools. Macro’s homepage uses a short promise, one dominant product experience, a module switcher with real previews, and outcome-led sections with concrete examples. Apply the same product-led structure to our library: a short value proposition, a working component or block preview early in the page, then examples grouped by the job they help a buyer do. Use shared palette roles, type rhythm, icons, and surfaces across the public homepage and docs. [Macro homepage](https://macro.com/)

Use compact grouped navigation, keyboard search, and a readable central article for the docs. Each component should have its own URL and a stable page order: purpose, live examples, Preview and Code, variations, inputs and events, keyboard behavior, and related blocks. List complete patterns separately in Blocks. Retain a public route that shows the purchase and access terms when those decisions are known. [KTUI Radio Group](https://ktui.io/docs/radio-group) · [ReUI](https://v1.reui.io/) · [ReUI Blocks](https://v1.reui.io/blocks)

## Implementation contract for the next phase

- One source folder per component, containing its implementation, examples, metadata, accessibility notes, and tests where behavior warrants them. A catalog manifest defines discovery and navigation. Pages use a shared renderer.
- Render examples and produce copyable snippets from the same example fixtures. Start with semantic HTML and CSS everywhere possible. Use custom elements where behavior benefits from a reusable element. Add React and Vue integration examples around the same underlying API and test their output.
- Keep semantic tokens in one versioned foundation. Generate CSS custom properties and swatches from the approved token source. Components consume semantic roles and reuse layout conventions.
- Give blocks their own entries. A block composes documented components and carries its own sample fixtures, dependency list, and responsive behavior.
- Model the commercial product as a one-time purchase with account access. Public previews and entitled code delivery need separate content paths. If premium source must remain gated, account entitlement needs to be enforced where premium source is served. Any source sent to a public browser is inspectable. Price, updates, license terms, and platform remain open.
- Macro’s public repo identifies its license as AGPL-3.0. Reference this audit when creating original source and assets for the paid library. [Macro repository](https://github.com/macro-inc/macro)

## Decisions to refine

| Decision | Starting proposal |
| --- | --- |
| Color | Pure black documentation canvas and grayscale brand accents, with light and dark modes |
| Typeface | System-first body and controls, Geist Variable headings |
| Density | 28 and 32 px desktop controls, 40 px global controls, 44 px touch targets |
| Iconography | Phosphor Regular, using the measured 12/14/16/20 px scale where the UI calls for it |
| First pattern to approve | A compact list-detail surface and search palette exercise the visual roles, density and focus before the catalog grows |

Reference sources for behavior: [Macro workspace](https://macro.com/app/home) · [Macro search](https://macro.com/docs/product/search) · [Macro Tasks](https://macro.com/tasks) · [Macro Docs](https://macro.com/documents) · [Macro Databases](https://macro.com/databases).

## Inlay shape and borders

Inlay uses 10 px for buttons and inputs, 8 px for compact actions, and 14 px for toolbars and panels. Resting dividers and panel edges use 6% white in dark mode and 8% black in light mode. Fields use 8% white and 10% black. Focus and validation use their dedicated tokens. [coss ui Button](https://coss.com/ui/docs/components/button) · [coss ui Toolbar](https://coss.com/ui/docs/components/toolbar) · [coss ui Styling](https://coss.com/ui/docs/styling)
