# Swatch Book

A raw, typewriter-set index style for collections people browse. A plain white page, one monospace face for every word, and outlined square tabs instead of a polished nav. The signature is the tile wall: a grid of flat, square color tiles, one per entry, each with its title set at the top-left and a date or status pinned to the bottom edge. The colors are loud and unrelated on purpose (orange next to pale sky next to electric cyan next to plum), like paint chips pulled from a box. Small inverse black labels ("Note:", "Essay:"), one highlighter-yellow sticker per screen and a pixel-drawn mark are the only decoration. Square corners, no shadows, no gradients, hovers that swap color instantly.

Use it for: libraries and lending libraries, archives and catalogs, zines and small publications, community projects, clubs, local services, directories, rental and swap platforms, event listings, anything with many entries and a homemade, honest voice. Avoid it for: luxury and premium brands, finance and health products that need to feel clinical, dashboards with dense data, anything that needs a calm, quiet palette or photography-led pages.

## How to use this file

Give this file, `tokens.css` and `components.css` to your AI coding tool and say:

> Build [your page] in the Swatch Book style. Follow DESIGN.md exactly. Use the tokens in tokens.css and the classes in components.css; don't invent new colors, fonts, radii or shadows.

`demo.html` (a landing page), `pricing.html`, `blog.html` and `signup.html` are complete example pages built only with the kit, for a made-up neighborhood tool library called Open Shed.

## Fonts

All free on Google Fonts:

```html
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,700;1,400&family=Silkscreen&display=swap" rel="stylesheet">
```

| Role | Font | Weight | Use |
|---|---|---|---|
| Everything | IBM Plex Mono | 400, 500, 700 | Headlines, body, nav, tabs, tiles, buttons, forms. Headlines and tile titles are 500, body is 400, small headings 700 |
| Tiny labels | Silkscreen | 400 | Only for `sb-pixel`: a counter line, a footer sign-off. Never for more than five words |

Hierarchy comes from size and weight only. No uppercase headlines, no letter-spaced caps, no second text face.

## Color

| Token | Hex | Use |
|---|---|---|
| `--sb-page` | #FFFFFF | The page |
| `--sb-fog` | #F0EFEB | Quiet sections, a muted tile, form choices, code blocks |
| `--sb-ink` | #121212 | Text, borders, the solid button, inverse labels, the dark section |
| `--sb-soft`, `--sb-faint` | #5F5F5C, #9B9A96 | Secondary text, tab and field outlines |
| `--sb-line` | #D6D5D0 | Soft dividers |
| `--sb-orange` | #EF8B17 | Tile (white text) |
| `--sb-sky` | #CFE2F6 | Tile (ink text) |
| `--sb-cyan` | #52F1EE | Tile (link-blue text) |
| `--sb-mustard` | #E4D24C | Tile (ink text), pull quotes |
| `--sb-plum` | #561867 | Tile (white text) |
| `--sb-peach` | #F5B394 | Tile (ink text) |
| `--sb-tomato` | #D8471B | Tile (white text), article covers |
| `--sb-lime` | #B5D13C | Tile (ink text) |
| `--sb-slate` | #8F8F8D | Tile (white text) |
| `--sb-blue` | #1D1DE8 | Text links, and the text on cyan tiles |
| `--sb-highlight` | #F6F21C | The sticker (`sb-sticker`) and link hover. Once per screen |

Tile colors only ever fill tiles, plan swatches and article covers. Never use them for text, borders or buttons. Neighbouring tiles should never share a color: cycle through the set in a scrambled order.

## Type scale

| Class | Size | Notes |
|---|---|---|
| `sb-hero-title` | clamp(30px, 4vw, 52px) | 500, line-height 1.2, max 22ch |
| `sb-h2` | clamp(24px, 2.8vw, 34px) | 500 |
| `sb-h3` | 17px | 700 |
| `sb-lede` | clamp(17px, 1.5vw, 20px) | `--sb-soft`, max 60ch |
| Body | 16px | 400, line-height 1.45 |
| `sb-tile__title` | 16px | 500, line-height 1.4, max 24ch |
| `sb-prose` | 17px | line-height 1.65 |
| `sb-small` / `sb-pixel` | 14px / 12px | Meta, hints / pixel labels |

## Shape and space

- Everything is square (`--sb-radius: 0`). The only round things are the search field and the Filter button, which are pills. Keep that contrast.
- Borders do the work: 1px solid outlines on tabs and fields, a 2px ink frame for the active tab, focused field and featured plan, 1px dotted rules between list rows and around notes.
- No shadows, no gradients, no transparency.
- Tiles are square (`aspect-ratio: 1 / 1`) with 11px padding and a 10px gap. Short tiles (`sb-tile--short`) are for "read next" rows.
- Content is left aligned. The wall runs edge to edge with only the page gutter (14 to 20px) around it.
- Motion is instant: a hover is a color swap in 0.08s, or an underline.

## Components (in components.css)

- **Masthead** `sb-masthead`: `sb-brand` (a pixel SVG mark drawn with `shape-rendering="crispEdges"` and the name under it) on the left, `sb-topnav` plain links on the right, led by a `sb-sticker` ("New here?").
- **Tabs** `sb-tabs` of `sb-tab`: outlined square boxes. `aria-current` gives the 2px ink frame. End the row with `sb-search`, a pill-shaped search input.
- **Filter** `sb-filter`: a dotted pill with a small triangle, above the wall.
- **Tile wall** `sb-wall` of `sb-tile`: `sb-tile__title` at the top, `sb-tile__meta` pinned to the bottom. Colors: `--orange`, `--sky`, `--cyan`, `--mustard`, `--plum`, `--peach`, `--tomato`, `--lime`, `--slate`, `--fog`, `--ink`, and `--note` (white with a dotted frame). Put an `sb-label` above the title to mark a type.
- **Labels** `sb-label` (black block, white text, ends in a colon) and `sb-label--light`. **Sticker** `sb-sticker` (highlighter yellow).
- **Buttons** `sb-btn` (outlined, inverts on hover), `--ink` (solid, turns highlighter on hover), `--block`. Monospace, sentence case.
- **Text link** `sb-textlink`: link blue, underlined, highlighter on hover.
- **Section head** `sb-head`: title and a link or label on one line, ink rule under.
- **Index** `sb-index`: dated rows with dotted rules, like a table of contents.
- **Pricing** `sb-plans` of `sb-plan` (`--feature` for the 2px frame), each with a `sb-plan__swatch` in a tile color, `sb-plan__price` and a "+" list. `sb-toggle` for monthly and yearly, `sb-table` for comparison, `sb-faq` for questions.
- **Article** `sb-article-cover` (a wide tile in a tile color with the title), `sb-byline`, `sb-prose` (bold `sb-q` questions, "->" bullets), `sb-pull` (mustard block), `sb-code`.
- **Forms** `sb-form`, `sb-field`, `sb-input`, `sb-select`, `sb-textarea`, `sb-hint`, `sb-choices` of `sb-choice` (fog tiles that take a 2px frame when picked), `sb-check`, `sb-steps`, `sb-fieldset`.
- **Footer** `sb-footer`: columns of plain links, a dotted rule and a `sb-pixel` sign-off.

## Pages in this kit

| File | Page |
|---|---|
| `demo.html` | Landing: masthead, tabs, hero with two buttons, the 15-tile wall, a how-it-works index, a notes index, an ink call to action |
| `pricing.html` | Three plans with color swatches, a monthly and yearly toggle, a comparison table, FAQ |
| `blog.html` | An essay with a tomato cover tile, byline, prose, a pull quote, a code block and a "read next" row of short tiles |
| `signup.html` | A form with steps, plan choices and a check, beside a small wall of info tiles |

## Page recipe

1. `<body class="sb">`, the masthead, then a row of `sb-tabs` for the main sections.
2. A short left-aligned `sb-hero`: one `sb-hero-title`, one `sb-lede`, two buttons at most.
3. The wall. Most pages should have one: it is the style. Start with a `--note` tile, then scramble the colors.
4. Plain sections after it: an `sb-index`, an `sb-head` with a list, a fog section.
5. One `sb-section--ink` near the end with a single call to action, then `sb-footer`.

**Pricing recipe:** tabs, a hero with the `sb-toggle` on the right, `sb-plans` (one `--feature`), a small note, the `sb-table`, then `sb-faq` in a fog section.

**Article recipe:** tabs, a full-width `sb-article-cover` with a label, the title and the date pinned to the bottom, then `sb-narrow` with `sb-byline`, `sb-prose`, one `sb-pull`, and a row of `sb-tile--short` tiles to read next.

**Sign-up recipe:** a two-column grid. Info tiles on one side (an orange note tile with the key fact), the form on the other with `sb-steps`, fields, `sb-choices` and an `sb-btn--ink sb-btn--block`.

## Don'ts

- Don't round the corners of tiles, buttons, tabs or fields. Only the search and filter are pills.
- Don't add shadows, gradients, photos inside tiles or hover lifts.
- Don't use a second text face or uppercase headlines.
- Don't put text in tile colors, or two same-colored tiles side by side.
- Don't use more than one highlighter sticker per screen.
- Don't center the layout. This style reads like a list, top-left to bottom-right.
- No em dashes in copy.
