# Tokens

Four themes: **Pearl** (light, cool), **Champagne** (light, warm), **Midnight** (dark, black) and **Amethyst** (dark, purple).

## Read this first: there are three token families, and they disagree

| File | Used by | Selector | Pearl bg | Pearl accent |
|---|---|---|---|---|
| `tokens-design-repo.css` | Design-repo components (combined A and B, v10, auth touch, top bar unify) | `html[data-t=pearl\|champagne\|midnight\|amethyst]` | `#F2F2F5` | `#0019C9` |
| `tokens-launch.css` | Launch-site components (v11, v12) | `html[data-theme=day\|night][data-pal=white\|beige\|black\|purple]` | `#FAF9F5` | `#0019C9` |
| `tokens.json` | Everything above as data, plus the shared design-repo values | | | |

The launch values are the **computed values read from the live v12 Version 2 page** in all four themes. Pearl is `#F2F2F5` in `DESIGN.md` 6.1 and the design repo but `#FAF9F5` on the launch page. The main button colour also differs: the launch pills use `--a`, which is blue `#0019C9` in Pearl, near-black `#1C1814` in Champagne, pale `#E6EEFF` in Midnight and pale `#E6DEF5` in Amethyst; the design repo uses ink buttons (`--ink`) with accent `#0019C9` / `#0019C9` / `#7C88FF` / `#9AA3FF`. For the rebuild, pick one family and delete the other. Each component page in this kit loads exactly one token file, so nothing is mixed.

Theme map used by the kit switcher: Pearl = day / white, Champagne = day / beige, Midnight = night / black, Amethyst = night / purple. `components/_shared/kit.js` sets all three attributes at once.

## Colour (what each variable is)

`--bg` page, `--bg2` second layer, `--tx` text, `--tx2` secondary text, `--tx3` hints, `--card` card fill, `--ln` hairline, `--hl` top highlight, `--gl` and `--gl2` glass fills, `--sh` card shadow, `--acc` accent (launch: `--a` and `--aTx` for pill fill and its text), `--danger` and `--ok` (design repo: `--bad`, `--good`, `--warn`, `--goldTx`), `--ring` focus ring. Per-theme light: `--flare` and `--flare-glow` (progress flare, runway lights), `--rw-*` (design repo) and `--rwLt --rwLine --rwBar --rwCl --rwSurf` (launch).

| Theme | Flare | Meaning |
|---|---|---|
| Pearl | `#0019C9` navy | |
| Champagne | `#B8892E` gold | |
| Midnight | `#E4E9F2` white | |
| Amethyst | `#C3B5FF` lilac | |

## Type

| Use | Font | Weight and size seen in the sources |
|---|---|---|
| Titles (every H1) | Clash Display | 600, 34 px / 1.05 on a phone, tight tracking (-.015em). 400 and 500 ship but are unused in the sign-up CSS |
| Buttons, labels, pills | General Sans | 600. Labels 12 px / .02em. Pills 16.5 px (stack) to 21 px (large). Small button 14 px |
| Body and fields | Satoshi | 400 body, 500 to 700 inside fields. Fields 16 px (stops iOS zoom) |
| Numbers, codes, clock | JetBrains Mono | 500 to 600, tabular numbers. Clock 13 px, code cells 22 px, step count 12 px |
| ICAO codes | Nippo | 500 and 700. Not used in the sign-up CSS, shipped for the app |
| Google button text | Google Sans | `fonts/legacy-v3`, only inside the Google button (Google's brand rule) |

## Spacing

Base gap 12 px (`--sp`). Field to field 14 px; label to field 7 px; card padding 22 px; pill height 54 px (`--pill-h`; the large pill is 56 px, small is 38 px); touch target 44 px (`--tap`); steps bar segments 3 px high with a 5 px gap.

## Radii

Pills and chips 999 px; fields 15 px; code cells 14 px; alerts 16 px; note cards 18 px; cards 22 to 28 px; the info box `--r` is 24 px.

## Glass

Recipe (DESIGN.md 6.2): fill `--gl`, `backdrop-filter: blur(24px) saturate(180%)`, top highlight `inset 0 1px 0 var(--hl)`, hairline `inset 0 0 0 .5px var(--ln)`, then `--sh`. Real blur only on the top bar, the nav pill and named sheets (here: top bar and the theme sheet). Everything else fakes glass with a translucent fill, a highlight and a hairline, which is cheaper and does not break scrolling.

## Shadows

One per theme (`--sh`): Pearl `0 14px 40px rgba(30,20,60,.10)` (launch) or the three-layer version in the design repo; Midnight and Amethyst are darker (`.6`). The pills use only inset highlights and hairlines.

## Motion

| Name | Value | Where |
|---|---|---|
| `--ease` | `cubic-bezier(.32,.72,0,1)` | pill transitions, glide (520 ms), segmented thumb (.5 s) |
| `--fold` | `cubic-bezier(.22,.9,.24,1)` | rows folding away (.62 s), parts opening (.5 to .6 s) |
| `--spring` (launch) | `linear(0,.006,.025 2.8%, ... 1.017 63.9%, 1.001)` | the opened part settling (.66 s) |
| `--spring` (design repo) | stiffness 380, damping 32, sampled over 560 ms (about 1% overshoot) | split row 64/36 |
| `--d-split` `--d-swap` `--d-in` `--d-flare` | 560 / 120 / 220 / 1100 ms | design repo |
| `--e-flare` | `cubic-bezier(.05,.7,.1,1)` | progress flare |
| Beat 1 / beat 2 | 200 ms fade, then fold and glide | sign-in in place |
| Sheet | open 500 ms, close 420 ms | settings sheet |

Reduced motion: every animated component has a `prefers-reduced-motion` branch that shortens to a quick cross-fade.
