···11+## Design System
22+33+### Design Intent
44+55+The interface should feel like a compact developer console for studying data behavior. It is educational product UI, not a marketing site. The design should make route state, table data, cache behavior, search params, pagination, and live query updates easy to inspect.
66+77+Physical scene: a developer is working through examples on a laptop or external monitor during a focused learning session, switching between editor, browser, and docs. Both light and dark themes are valid because the app may be used in daytime workshops or late-night debugging.
88+99+### Visual Strategy
1010+1111+**Register**: product
1212+**Color strategy**: restrained
1313+**Surface model**: tinted warm neutrals with amber as the single instructional accent
1414+**Shape language**: square, technical, grid-like
1515+**Texture**: hairline borders, dense spacing, table rhythm, monospace labels
1616+1717+The design should not look like a Pokemon fan interface. Pokemon is just the dataset. The product is the prefetching behavior.
1818+1919+### Color Tokens
2020+2121+All color should come from `src/styles/tokens.css` unless a new token is intentionally added.
2222+2323+**Primitive families**
2424+2525+- `--color-amber-*`: primary instructional accent.
2626+- `--color-warm-*`: tinted neutral ramp for light and dark surfaces.
2727+- `--color-green-*`: cached or available state.
2828+- `--color-red-*`: error state.
2929+3030+**Semantic roles**
3131+3232+- `--bg-primary`: app page background.
3333+- `--bg-secondary`: header, secondary bands, hovered rows, form surfaces.
3434+- `--bg-tertiary`: deeper nested surface when separation is needed.
3535+- `--bg-card`: primary content panels.
3636+- `--text-primary`: main reading text and active labels.
3737+- `--text-secondary`: section labels and supporting labels.
3838+- `--text-muted`: hints, subtitles, disabled states, metadata.
3939+- `--accent-default`: active accent, selected state, instructional callouts.
4040+- `--accent-subtle`: hover and quiet emphasis background.
4141+- `--border-default`: normal hairline separation.
4242+- `--border-strong`: table headers, stronger dividers, emphasis borders.
4343+- `--status-cached`, `--status-fetching`, `--status-idle`, `--status-error`: data state indicators.
4444+4545+Do not use raw black or white. Keep new colors in OKLCH and add semantic aliases before using them repeatedly.
4646+4747+### Typography
4848+4949+**Primary UI font**: JetBrains Mono via `--font-mono`.
5050+**Display font**: Barlow via `--font-display`.
5151+5252+Use monospace for route names, status labels, tables, filters, buttons, and console controls. Use display type sparingly for major headings, especially the landing page title and large article titles.
5353+5454+Current scale:
5555+5656+- `--text-xs`: dense labels, table headings, badges.
5757+- `--text-sm`: default body and controls.
5858+- `--text-base`: landing descriptions and prominent card titles.
5959+- `--text-lg`: console card headings.
6060+- `--text-xl` and above: section headings and hero headings.
6161+6262+Uppercase labels should be short. Avoid long uppercase prose because it harms scan speed.
6363+6464+### Layout
6565+6666+The app uses a compact, document-like structure:
6767+6868+- Sticky horizontal navigation at the top.
6969+- Landing page with a concise intro and grouped example links.
7070+- Example pages with `max-w-7xl`, 24px page padding, a section header, then a strategy/content split.
7171+- Console cards for data tables, filters, skeletons, and controls.
7272+7373+The strategy route layout uses:
7474+7575+- Left column: explanation panel through `StrategyArticle`.
7676+- Right column: interactive console content through `ConsoleCard`.
7777+- Desktop split: `minmax(0,0.9fr)` and `minmax(34rem,1.1fr)`.
7878+7979+Keep table areas dimensionally stable while loading. Existing examples reserve height with `min-h-125` and skeleton rows; preserve that pattern to prevent layout jump.
8080+8181+### Components
8282+8383+**Header**
8484+8585+- Sticky, top aligned, z-indexed above examples.
8686+- Horizontal overflow is acceptable and intentional.
8787+- Active nav item uses `>` as a terminal prompt.
8888+- Theme toggle cycles system, light, dark.
8989+9090+**Example cards**
9191+9292+- Used on the landing page as route launchers.
9393+- Zero radius, one-pixel border, visible hover border shift.
9494+- The recommended starting example uses `--accent-surface` and an uppercase badge.
9595+- Keep card copy short and behavior-specific.
9696+9797+**ConsoleCard**
9898+9999+- Primary framed work surface.
100100+- White or dark card background via `--bg-card`.
101101+- One-pixel border, zero radius, 24px padding.
102102+- Use hover only when the whole card is interactive.
103103+104104+**SectionHeader**
105105+106106+- Route title and `//` subtitle.
107107+- Border-bottom separates the console header from route content.
108108+- Keep subtitles terse and implementation-focused.
109109+110110+**PokemonTable**
111111+112112+- Monospace table with uppercase headers.
113113+- Row hover uses secondary background.
114114+- IDs are muted, names are primary, types are compact badges.
115115+- Preserve readability over decoration.
116116+117117+**StatusDot**
118118+119119+- `cached`: green with subtle ring.
120120+- `fetching`: amber with reduced-motion-safe pulse.
121121+- `idle`: neutral.
122122+- `error`: red with subtle ring.
123123+124124+Status dots should always be paired with visible or accessible labels when the meaning is not obvious from surrounding copy.
125125+126126+**Forms and Pagination**
127127+128128+- Inputs inherit console styling: zero radius, secondary background, accent focus.
129129+- Buttons and pagination links use bordered rectangular controls.
130130+- Disabled pagination should be visible but inert.
131131+- Search state should be reflected in URL search params and visible page text.
132132+133133+### Motion
134134+135135+Motion is functional. The fetching dot pulse is the canonical motion pattern. Keep transitions short (`--duration-fast` or `--duration-normal`) and limited to color, opacity, transform, or shadow. Respect `prefers-reduced-motion`.
136136+137137+Do not animate layout properties. Do not introduce ornamental motion.
138138+139139+### Accessibility
140140+141141+- Preserve visible focus rings on links, buttons, and inputs.
142142+- Do not rely on color alone for status when the context is ambiguous.
143143+- Keep contrast at WCAG 2.1 AA or better.
144144+- Theme changes must remain keyboard accessible.
145145+- Loading skeletons should reserve space and avoid flashing.
146146+- Reduced motion must disable repeated attention-grabbing animation.
147147+148148+### Copy Rules
149149+150150+- Be concrete about behavior: prefetch, cache, loader, synced collection, search param, live query.
151151+- Use route names consistently with the nav sequence.
152152+- No em dashes in product copy.
153153+- Avoid hype, jokes, or generic SaaS wording.
154154+- Replace placeholder instructional content before treating a route as finished.
155155+156156+### Known Design Debt
157157+158158+- `StrategyArticle` still uses lorem ipsum and a decorative oversized rounded/shadowed panel. It does not yet match the sharper console system.
159159+- The landing page lists six examples, while the header includes eight. The home page should include the live query examples or label them as a separate advanced group.
160160+- `Header` contains `flex-hteshrink-0`, which appears to be a typo for a flex/shrink utility.
161161+- `README.md` still contains starter TanStack instructions and direct `pnpm` commands, which conflict with repo Vite+ rules.