# Pixel Arcade - Construction Instructions & AI Prompting Guide
> Version 1.0 - Theme 14 in the catalog - slug `pixel-arcade`

---

## Table of Contents

1. [Design Philosophy & Core Rules](#1-design-philosophy--core-rules)
2. [Font Law](#2-font-law)
3. [Color Application Rules](#3-color-application-rules)
4. [Border Radius Decision Framework](#4-border-radius-decision-framework)
5. [Shadow & Elevation Rules](#5-shadow--elevation-rules)
6. [Component Construction Guides](#6-component-construction-guides)
7. [Interactive States](#7-interactive-states)
8. [Layout Rules](#8-layout-rules)
9. [Anti-Patterns](#9-anti-patterns)
10. [AI Prompting Guide](#10-ai-prompting-guide)
11. [Pre-Ship Checklist](#11-pre-ship-checklist)

---

## 1. Design Philosophy & Core Rules

8-bit arcade look: navy canvas, white 4px outlines, hard pink offset shadows and Press Start 2P type.

### The Rules
1. Zero radius everywhere. A rounded corner breaks the pixel grid.
2. Every surface has a 4px white outline and a 6px hard pink offset shadow.
3. Only five colours: navy, white, yellow, pink, cyan. No gradients, no opacity tricks.
4. Type is small (10 to 14px) with line height 1.8. Large pixel type is reserved for titles.

---

## 2. Font Law

Use only Press Start 2P. Fallback stack ends in `system-ui, sans-serif`.

- Display and headings: Press Start 2P, weight 400, tracking 0em.
- Body: Press Start 2P.
- Labels: Press Start 2P, uppercase, weight 400.
- Never mix in a font from another system. If a glyph is missing, fall back, do not swap families.

---

## 3. Color Application Rules

| Use | Token | Value |
|---|---|---|
| Page | `--ds-color-bg-base` | `#0f0f2d` |
| Cards | `--ds-color-bg-surface` | `#1b1b4b` |
| Inputs, wells | `--ds-color-bg-sunken` | `#0a0a20` |
| Main action | `--ds-color-primary` | `#ffd400` |
| Secondary action | `--ds-btn-secondary-bg` | `#08d9d6` |
| Body text | `--ds-color-text-primary` | `#ffffff` |
| Supporting text | `--ds-color-text-secondary` | `#c9caff` |

- One main action per view.
- Never type a raw hex or font name in a component. Read the token.
- Semantic colours (success, warning, error, info) are for status only.

---

## 4. Border Radius Decision Framework

- Badge or chip: 0px.
- Button or input: 0px.
- Card or modal: 0px.
- Anything else: use the nearest token. Never invent a radius.

---

## 5. Shadow & Elevation Rules

- Cards: `6px 6px 0 #ff2e63`.
- Dropdowns: `6px 6px 0 #ff2e63`.
- Modals: `8px 8px 0 #ff2e63`.
- Focus: `4px 4px 0 #08d9d6`.
- Do not mix shadow styles from other systems.

---

## 6. Component Construction Guides

**Card:** surface background, 4px border `#ffffff`, radius 0px, card shadow, padding 24px.

**Button:** pick one variant. Label style `uppercase`, weight 400. Pressed state is `translate(4px, 4px)`.

**Badge:** label style, semantic background, no shadow.

**Table:** header uses `#ff2e63` with `#0f0f2d` text. Rows separated by border light.

**Form field:** label above, helper text below in muted colour, error replaces helper text.

---

## 7. Interactive States

| State | Rule |
|---|---|
| Hover | Primary darkens or lightens one step. Shadow `4px 4px 0 #ff2e63` |
| Active | `translate(4px, 4px)` |
| Focus | `4px 4px 0 #08d9d6`, always visible |
| Disabled | Text `#7b7cc0`, no hover |

---

## 8. Layout Rules

- Max content width 1040px, 24px gutters.
- Stack to one column below 768px.
- Keep one primary action per section and align it to the same edge as the heading.

---

## 9. Anti-Patterns

- Do not use anti-aliased soft shadows or blur.
- Do not use any other font. Fallback is monospace, never a sans.
- Do not set body text longer than two lines in this font. Keep copy short.
- Do not hard-code colours, fonts, radii or shadows in components.
- Do not define tokens at `:root`. Everything stays under `[data-ds="pixel-arcade"]`.
- Do not mix components from other design systems on the same page.

---

## 10. AI Prompting Guide

Paste this at the start of a chat:

> Build the UI with the Pixel Arcade design system. Read `design-system.md` and `instructions.md` first. Use only the `--ds-*` tokens under `[data-ds="pixel-arcade"]`. Fonts: Press Start 2P. Follow every rule in section 1 of instructions.md. Do not add styles that are not in the token sheet. When unsure, ask before inventing.

Good follow-up prompts:
- "Add a pricing section using only Pixel Arcade tokens."
- "Check this page against the Pixel Arcade anti-pattern list and fix violations."

---

## 11. Pre-Ship Checklist

- [ ] All colours, fonts, radii and shadows come from tokens
- [ ] One main action per view
- [ ] Text contrast is 4.5:1 or better
- [ ] Focus state is visible on every interactive element
- [ ] No rule from section 9 is broken
- [ ] Wrapped in `data-ds="pixel-arcade"`
