Foundations
Layout & grid.
Every Tetrifox screen begins with the same constraints: close the frame, quantize the space, assemble from cells. Layout is not decoration around content—it is the system the interface grows from.
01 / Structure
The closed grid.
Close every edge. Each line must meet a neighbour or the frame, and each region has one border owner—never a floating edge, never a doubled one.
gap-px bg-border supplies the internal hairlines.One frame owner
The section closes the region; its cells only contribute the dividers between neighbours.
Floating edge
Open on two sides, so the structure never resolves.
02 / Rhythm
Spacing lattice.
Quantize every measure. A 4px base and 8px rhythm produce nine legal steps; half-steps break the beat and are not part of the system.
State 2 / 4 · measured
The nine legal steps
14pxMicro-gap28pxStack gap312pxCompact control416pxMobile cell inset624pxContent rail832pxGroup gap1248pxDesktop rail1664pxSection rhythm2496pxGenerous sectionBanned: p-1.5, gap-2.5, and py-3.5.
Content rail24 → 32 → 48Primary content aligns at px-6, md:px-8, and lg:px-12.Cellstandard / sectionSemantic padding modes keep inset and vertical rhythm consistent.Rhythm8 / 32 / 64→96Stack gap, group gap, and section spacing.03 / Frame
Frame & containers.
Let the viewport be the frame. Readability comes from a capped measure inside a cell—not from pulling the whole interface into a centred outer box.
State 3 / 4 · full-bleed shell
Legacy container · do not use
max-w-7xl
04 / Assembly
Cellular primitives.
Assemble from Section, Cell, and GridRow, then let one square mark carry state. Change the viewport below to see the same rules recompose without changing vocabulary.
State 4 / 4 · responsive assembly
1280px. The Rail joins the frame and row dividers move to the left.
<Section>border-bA full-bleed band. Stack sections to continue the vertical lattice.<Cell>24 / 32 / 48The canonical content rail; borders stay with the parent.<GridRow>border-t → border-lOne responsive divider changes orientation when the cells form a row.<StatusMark>gap / draft / shippedA square state marker: hollow, muted, or brand-filled.Constraints this explicit let an interface grow without visual drift. Three primitives, one square mark, nine spacing steps. This page is assembled from exactly that set—nothing here is decoration.