# DESIGN SYSTEM & UI GUIDELINES (DESIGN.md)
<!-- Machine-Readable Design System Contract for AI Coding Agents (Cursor, Claude Code, Copilot, Windsurf) -->
Project: My Next-Gen App
Specification Version: 1.0.0
Accessibility Target: WCAG 2.2 Level AA (Strict Compliance)
---
## 1. Aesthetic Directive & Core Philosophy
High-craft dark cyber theme with 85% glassmorphic surfaces, subtle neon highlights, and sub-1px border sheens.
- **Theme Mode:** Dark-First with High-Precision Contrast
- **Visual Depth:** Translucent glass surfaces with backdrop-filter: blur(16px)
- **Corner Radii:** Cards = `1rem`, Inputs/Buttons = `calc(1rem * 0.75)`
- **Max Content Container:** `80rem (1280px)`
---
## 2. Semantic Color Token Matrix
| Token Name | Hex / CSS Value | Role & Usage Rules |
| :--- | :--- | :--- |
| **Primary Accent** | `#38bdf8` | Main Call-to-Actions (CTAs), primary active buttons, key highlights |
| **Secondary Accent** | `#818cf8` | Secondary interactive elements, badges, supporting focus rings |
| **Accent / State** | `#f43f5e` | High-priority warnings, alerts, special badges, tertiary state |
| **Canvas Background** | `#090a0f` | Root application background (`body`, `html`) |
| **Surface Card** | `#0e111a` | Elevated cards, modals, sidebars, floating dropdowns |
| **Border / Divider** | `rgba(255, 255, 255, 0.08)` | Subtle 1px structural borders, dividers, subtle card seams |
| **Text Primary** | `#f8fafc` | High-contrast headings (h1-h4), active text, primary body copy |
| **Text Muted** | `#94a3b8` | Secondary labels, captions, helper hints, timestamps |
---
## 3. Typography Hierarchy
- **UI & Display Font:** `'Plus Jakarta Sans', system-ui, sans-serif`
- **Code & Monospace Font:** `'JetBrains Mono', monospace`
### Font Scale & Line Heights:
- **Heading 1 (Page Title):** `text-3xl sm:text-5xl font-semibold tracking-tight leading-tight`
- **Heading 2 (Section Title):** `text-xl sm:text-2xl font-bold tracking-tight`
- **Heading 3 (Card Subheading):** `text-base font-semibold`
- **Body Copy:** `text-sm sm:text-base leading-relaxed font-normal`
- **Code & Token Labels:** `text-xs font-mono font-medium tracking-wide`
---
## 4. Component Construction Rules for AI Agents
### A. Buttons & CTAs
- **Primary Button:** Solid `bg-[#38bdf8]`, high-contrast text, `px-4 py-2.5 rounded-xl font-medium text-xs shadow-lg hover:brightness-110 active:scale-[0.98] transition-colors`
- **Secondary / Ghost Button:** `bg-white/5 hover:bg-white/10 border border-white/10 px-4 py-2.5 rounded-xl text-xs`
- **Focus Rings:** Always include `focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#38bdf8]`
### B. Cards & Panels
- Structure: `p-6 rounded-2xl bg-[#0e111a] border border-[rgba(255, 255, 255, 0.08)] shadow-xl backdrop-blur-md`
- Interactive Cards: Add `hover:border-[#38bdf8]/40 transition-colors group`
### C. Form Inputs & Textareas
- Base Style: `w-full bg-[#090a0f] border border-[rgba(255, 255, 255, 0.08)] px-3.5 py-2.5 rounded-xl text-xs font-mono focus:outline-none focus:border-[#38bdf8] focus:ring-1 focus:ring-[#38bdf8]`
---
## 5. Strict AI Rules (Do NOT Violate)
1. **Never invent arbitrary colors:** Use strictly the tokens defined in Section 2.
2. **Never drop border radius:** Always apply `1rem` to cards and dialogs.
3. **Accessibility:** Ensure all text passes WCAG AA (minimum 4.5:1 contrast ratio).
4. **Icons:** Use `lucide-react` standard icons with `w-4 h-4` or `w-5 h-5` dimensions.