# Rail Box

Minimal, cheeky and friendly: the whole website feels like a small tool that does one thing well. The page is near-pure black. A slim icon rail runs down the left edge (it becomes a tab bar along the bottom on phones), and the first screen is almost empty: one small "supported" pill at the top, a line-drawn mascot, a short lowercase headline and one big rounded input box with a row of chips under it. One monospace family sets everything, and every bit of copy is lowercase. Controls are soft rounded chips in three greys; the chosen one turns into a white chip with black text. There is no brand color at all. The only tints are a mint dot for "done" and a rose for errors and the mascot's blush.

Use it for: single-purpose web tools and utilities, converters, indie apps, small consumer products with a sense of humour, kitchen and hobby tools, link and file helpers, privacy-minded services, anything where the main action is "paste, pick, go". Avoid it for: luxury and fashion, photo-led brands, children's products that need color, corporate and enterprise sales pages, and anything that needs warmth from imagery or a strong brand color.

## 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 Rail Box 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. Wrap every page in `.rb-shell` with the `.rb-rail` first and the content in `.rb-main`. Keep all copy lowercase.

`demo.html` (a landing page), `pricing.html`, `blog.html` and `signup.html` are complete example pages built only with the kit, for an invented kitchen tool called mise: paste a link from any recipe site and get back just the ingredients and the steps.

## Fonts

One family, free on Google Fonts:

```html
<link href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
```

| Role | Font | Use |
|---|---|---|
| Headlines | Geist Mono 600 | Hero and section headings. Lowercase, ending in a full stop, tracking -0.04em on the hero and -0.025em on h2. |
| Body and UI | Geist Mono 400 to 500 | Paragraphs at 14px with a loose 1.7 line-height, chips and inputs (500), labels, tables. |
| Buttons | Geist Mono 600 | The white button and block buttons. |

Never add a second family. The single mono is what keeps it feeling like a tool.

## Color

| Token | Hex | Role |
|---|---|---|
| `--rb-black` | #040405 | The page and the main area |
| `--rb-rail` | #0E0E10 | The rail, the bottom bar, tiles, cards and plans |
| `--rb-chip` | #1A1A1D | Chips, segmented controls, icon buttons, inline code |
| `--rb-chip-hi` | #26262A | Chip hover, the active rail item, tile icons, step numbers |
| `--rb-line` | #2C2C31 | Every 1px border |
| `--rb-white` | #F1F1F3 | Headings, the active chip, the primary button, the mascot |
| `--rb-text` | #C4C4CA | Body copy |
| `--rb-mute` | #85858E | Labels, rail labels, help text, placeholders |
| `--rb-dim` | #4E4E55 | Footnotes, legal lines, "not included" rows |
| `--rb-mint` | #93E2B4 | Done states, "included" marks, the unread dot |
| `--rb-rose` | #FF8F8F | Errors and the mascot's blush only |

Rules:
- Black and greys do all the work. White is the "selected" color: one white chip per group, one white primary button per screen.
- Mint and rose are states, never decoration. No mint headings, no rose buttons.
- No gradients, no glows, no shadows, no photos. Visuals are line drawings in `currentColor` (2 to 2.5px strokes, round caps).

## Type scale

| Token | Size | Use |
|---|---|---|
| `--rb-text-hero` | clamp(28px, 4.2vw, 48px) | Hero, one or two lines, weight 600 |
| `--rb-text-h2` | clamp(22px, 2.8vw, 30px) | Section headings |
| `--rb-text-h3` | 16px | Tile, card and plan titles |
| `--rb-text-lead` | 16px | The sentence under a heading, max 52ch |
| `--rb-text-body` | 14px | Body, line-height 1.7 (articles go to 15px and 1.8) |
| `--rb-text-small` | 13px | Chips, labels, tables |
| `--rb-text-micro` | 11px | Rail labels, help, tags, legal |

Copy is lowercase, short and a little dry ("just the recipe, please.", "three steps. the third is eating."). Headings end with a full stop. Labels above sections are plain grey words ("how it works"), never uppercase eyebrows.

## Shape and space

- Radius: 10px on chips, buttons and inputs, 14px on the big input box, tiles, cards and plans, 12px on rail items, fully round on the "supported" pill, tags and dots.
- Borders: 1px `--rb-line`. The featured plan and the "after" card get a `--rb-white` or `--rb-mute` border instead of a fill.
- No shadows anywhere. Focus is a soft double ring (`--rb-focus`).
- The rail is 72px wide; on phones it is a 64px bar fixed to the bottom.
- Content centers: the input box and articles max out at 620px, tile grids at 1040px.
- Sections are 112px apart (72px on phones). The first screen is mostly empty space on purpose.

## Components (in components.css)

- **Shell**: `.rb-shell` > `.rb-rail` + `.rb-main`.
- **Rail**: `.rb-rail__logo`, `.rb-rail__item` (icon over an 11px label, `--on` or `aria-current="page"` for the current page), `.rb-rail__badge` adds a mint dot, `.rb-rail__spacer` pushes `.rb-rail__more` items to the bottom. Items with `.rb-rail__more` hide on phones, so keep five or fewer of the others.
- **Top row**: `.rb-top` with a centered `.rb-pill` (`.rb-pill__plus`) and `.rb-top__end` for one `.rb-iconbtn`.
- **Stage**: `.rb-stage` centers `.rb-mascot` (or `--sm`), the hero, the lead and the `.rb-tool`. `.rb-stage__note` sits at the bottom of the first screen for legal lines.
- **Tool**: `.rb-box` (icon, `.rb-box__input`, white square `.rb-box__go`) then `.rb-tool__row` with a `.rb-seg` on the left and a lone `.rb-chip` on the right.
- **Chips**: `.rb-chip` (with an optional 15px icon), `.rb-chip--on` or `aria-pressed="true"` for the white selected state, `.rb-seg` for a joined group, `.rb-chips` for a loose row. `.rb-tag` for small outlined labels, `.rb-tag--mint` for "included" or "recommended", `.rb-dot` for status.
- **Buttons**: `.rb-btn` (white), `.rb-btn--ghost` (grey chip), `.rb-btn--block` (full width, 48px), `.rb-link`, `.rb-kbd`.
- **Sections**: `.rb-section`, `.rb-head` (grey label, h2, optional lead, all centered), `.rb-grid` of `.rb-tile` (`__num`, `__ico`), `.rb-cloud` of tags.
- **Before and after**: `.rb-split` with `.rb-card` (drawn grey `.rb-noise` bars and dashed `.rb-noise__ad` boxes) and `.rb-card--clean` holding a `.rb-check` list and `.rb-steps`.
- **Feedback**: `.rb-toast` with a `.rb-dot`.
- **FAQ**: `.rb-faq` with `details` and `summary`, "+" and "-" markers.
- **Pricing**: `.rb-plans`, `.rb-plan` (`--on` for the featured one), `.rb-plan__top`, `.rb-price` with `small`, `.rb-feats` (`li.rb-no` for "not included"), `.rb-table-wrap` and `.rb-table` with `.rb-yes`.
- **Article**: `.rb-article`, `.rb-meta`, `.rb-byline` with `.rb-avatar`, `.rb-prose` (h2, lists with "-" markers, blockquote cards, inline code), `.rb-figure`.
- **Forms**: `.rb-form`, `.rb-field`, `.rb-input` (`--bad`), `.rb-help`, `.rb-error`, `.rb-tick` checkboxes that fill white, `.rb-divider`.
- **Footer**: `.rb-foot`, one dim line and a row of grey links.

## Pages in this kit

- `demo.html`: landing. Rail, pill, mascot, hero, the paste box with chips, then how it works (three tiles), before and after, extras (four tiles), supported sites cloud, FAQ and a white call to action.
- `pricing.html`: small mascot, hero, a monthly or yearly segmented toggle, three plans with the middle one outlined in white, a comparison table and billing FAQ.
- `blog.html`: a 620px article with tags, byline, prose, a drawn bar chart, a quote card and an end card with the mascot.
- `signup.html`: the stage again, but holding a short form: an email or passkey segment, two fields, a chip question, two checkboxes, a white block button and a grey sign-in button.

## Page recipe

1. `.rb-shell` with the rail first. Mark the current page on its rail item.
2. `.rb-top` with one pill that says what the tool covers.
3. `.rb-stage`: mascot, a lowercase hero of six words or fewer, one lead sentence, then the one action (`.rb-tool` or a `.rb-form`).
4. Below the first screen, sections in `.rb-section` with a centered `.rb-head`. Alternate tile grids with one richer block (before and after, a table, a cloud).
5. FAQ, one white button, footer.

Pricing recipe: small mascot, hero, `.rb-seg` billing toggle, `.rb-plans` with one `.rb-plan--on`, comparison table, FAQ. Every plan ends in a block button; only the featured one is white.

Article recipe: top row with a back `.rb-iconbtn`, `.rb-article` with `.rb-meta` tags, hero at about 38px, byline under a rule, `.rb-prose`, one figure drawn in greys, end card with the mascot and a white button.

Sign-up recipe: the stage with the mascot, hero and lead, then `.rb-form` at 400px: a segment to pick the method, fields with grey labels and help lines, chips for a quick question, `.rb-tick` options, the white block button, a toast for success, a divider and a ghost sign-in button.

## Don'ts

- Don't add a brand color, a gradient or a shadow. If something needs to stand out, make it white.
- Don't use uppercase, title case or a second font.
- Don't put photos or illustrations with fills on the page. One line-drawn mascot per page is the limit, plus small line icons.
- Don't fill the first screen. One box, one row of chips, lots of black.
- Don't put more than one white chip in a group or more than one white button in a view.
- Don't replace the rail with a top nav bar, and don't hide it on phones: it moves to the bottom.
