System · Atlas

Layout

4px grid, shells, breakpoints, pane anatomy.

layout.md

Meridian — layout.md

Spatial system for application + cinema. Influences ranked in influences.md.
Primary absorb: Fluent 2 layout (4px grid, proximity, breakpoints) + Cursor inverted-L chrome + Polaris task density.

1. Laws

  1. 4px base unit — all pads, gaps, and control heights snap to multiples of 4 (Fluent spacing ramp).
  2. Proximity = meaning — space groups related information; prefer space over extra dividers (Fluent, Polaris).
  3. Density follows task — indexes dense; detail/forms breathe; marketing stages use theater, not app density.
  4. Chrome is quiet — inverted-L (sidebar + top bar) recedes; content owns hierarchy (Linear, Cursor app).
  5. One layout vocabulary — never fork components per surface; remap via data-surface.
  6. Stroke before shadow — pane separation = 1px border-border / edge (Fluent stroke).
  7. Control ≠ layer radius — controls rounded-lg; panels rounded-2xl; shells rounded-3xl.

2. Spacing ramp (Fluent → Meridian)

Fluent tokenpxMeridian use
size202Icon optical adjust only
size404Micro gap inside controls
size808Compact chrome padding (px-2)
size12012Default control inline gap
size16016Card compact pad step
size20020Application --surface-pad default
size24024Section rhythm
size32032Pane gutters / control default height
size40040Row height / marketing CTA

CSS knobs (app/globals.css):

--surface-pad
--surface-gap
--control-h*
--row-h*

Rule: if you need a one-off p-[13px], stop — pick the nearest ramp step.

3. Application shell (Cursor + Linear)

Canonical anatomy:

┌──────────────────────────────────────────────────────────┐
│ topbar h-8…h-11  search · filters · kbd                  │
├────────────┬─────────────────────────────┬───────────────┤
│ sidebar    │ main content                │ optional rail │
│ w-40…14rem │ index | detail | editor     │ AI / meta     │
│ quiet nav  │ scroll: one port            │ object-bound  │
├────────────┴─────────────────────────────┴───────────────┤
│ status h-6 mono                                          │
└──────────────────────────────────────────────────────────┘
RegionWidth / heightSurfaceNotes
Sidebar10–14rembg-muted/15–20 + border-rLabels/icons aligned (Linear)
Topbarh-8 app / h-11 sitehairline bottomNo brand fill
Mainminmax(0,1fr)bg-backgroundSingle scroll owner
Agent rail16–18rembg-muted/10–15Only when object selected
Statush-6mono 10pxDensity proof

Proofs: components/surfaces/workbench.tsx, composer-shell.tsx.

Alignment checklist (Linear discipline)

  • Icon + label share one vertical centerline in sidebar rows
  • Tab labels share baseline with toolbar controls
  • Table cells: ID mono left, title truncate, meta right
  • Avoid “icon soup” — one leading icon max per row

4. Grid & breakpoints

Fluent size classes (Layout):

ClassRangeMeridian behavior
small<479Stack; hide side rails; 44px touch
medium<639Compact stack
large<1023Optional sidebar collapse
x-large≥1024Full inverted-L
xx-large+≥1366Wider main; keep measure for reading

Techniques (Fluent): reposition · resize · reflow · show/hide · re-architect.
Meridian default: responsive one layout (not adaptive forks), with progressive disclosure of rails.

Column guidance

ContextColumnsGutter
App workbenchFluid 2–3 regions0 (stroke dividers)
Docs / readingManuscript (1 col)— · max 65ch
Marketing filmFull-bleed stageEdge-to-edge media
Theme showcase12-col mental model16–24px

5. Surface matrix (layout implications)

data-surfacePadGapControlRowScroll
application20123240One main port
desktop1282832Instant; no nested ports
marketing242036–40Stage svh; no nested demo scroll
mobile16124452Safe areas; bottom chrome

6. Pane composition patterns

Index + detail (Polaris density)

[ filters h-8 ]
[ table rows h-8…h-10 ]
     └ selected → opens rail OR navigates detail

Composer (Cursor)

[ explorer | tabs + editor | agent ]

Marketing stage

[ theater svh ]
  copy (one idea)
  ProductFrame → app proof (rounded-2xl edge)

7. Shape on layout edges

ElementRadiusSource
Nav item, input, buttonrounded-lgFluent Large control
Card, workbench shell, popoverrounded-2xlFluent layer
Modal / hero shellrounded-3xlMarketing shell
Badge / pill / CTA pillrounded-fullFluent pill form
Screen-edge chromesquare OKFluent: skip radius at screen edge

8. Dividers

Prefer space → then 1px stroke → then elevation.
Never double: thick border + heavy shadow + loud background.

SeparatorToken
Pane splitborder-border
Inset cardedge
Floated overlaydepth-soft / depth-raised

9. Reading layouts

LaneMeasureType
typeset typeset-docs≤65chDocs / help
typeset typeset-reading≤65chEssays
typeset typeset-chat≤56chAgent messages
Never>80ch

Demo bands under prose: reading-demo-break / DocsDemoSection — not full-bleed text-sm paragraphs.

10. Anti-patterns

BanWhy
Nested overflow-auto demosSteal scroll (cinema laws)
Inset hero media cardsBreaks full-bleed subject
Dashboard soup in first marketing viewportViolates one-idea frame
Cards wrapping every labelChrome noise (Linear)
Arbitrary gap-[0.85rem]Off Fluent 4px ramp
rounded-md / rounded-xl in app chromeOutside closed radii

11. Implementation map

ConcernCode
Surface density[data-surface] in globals.css
Radius intentradiusFor in lib/design/grammar.ts
Shellscomponents/surfaces/*
Cinema stagescomponents/cinematic/*
Platform chromecomponents/chrome/platform-header.tsx
Contract chromecomponents/chrome/contract-frame.tsx

12. Agent checklist

  • Spacing on 4px ramp
  • Correct data-surface
  • Control vs layer radius
  • Single scroll owner in demos
  • Sidebar/topbar quiet; brand only on selected/CTA
  • npm run check:design

Sources

Raw