# DESIGN.md — CSSOM Design System Token Extractor

> Automated design system reverse-engineering engine for Copy Markdown. Traverses the live CSS Object Model (CSSOM) to generate machine-readable YAML frontmatter and standard 10-section design documentation.

## Overview
DESIGN.md inspects computed styles, font declarations, color contrast ratios, continuous border-radii, and elevation shadows from any live website. It outputs standardized design tokens optimized for frontend developers and autonomous AI coding agents (Claude Computer Use, ChatGPT Operator, Cursor).

## Capabilities
- **YAML Frontmatter (version: alpha):** Machine-parsable semantic color roles (primary, canvas, surface, ink, muted, hairline, accents), typography tokens, border radii, shadows, and button components.
- **CSSOM Computation:** Evaluates `getComputedStyle()` across interactive buttons, cards, headings, and body elements.
- **Mathematical Color Neutrality:** Computes perceptual luminance and saturation to prevent mislabeling brand accents as neutrals.
- **10-Section Documentation:** Produces structured Markdown sections covering theme atmosphere, color roles, typography tables, component stylings, spacing grids, depth, do's & don'ts, responsive rules, agent prompt guide, and `:root` CSS variables.

## Standard Output Format
```markdown
---
version: alpha
name: example.com
source:
  url: "https://www.example.com/"
  pagesAnalyzed: 1
  extractedAt: 2026-09-14
colors:
  primary: "#ed5f45"
  canvas: "#ffffff"
  surface: "#fafafa"
  ink: "#333333"
  body: "#808080"
  muted: "#999999"
  hairline: "#e1e7ea"
typography:
  fontFamily: "Geist"
  display-xl:
    fontFamily: "Geist"
    fontSize: "54px"
    fontWeight: 450
    lineHeight: 1.1
  heading-md:
    fontFamily: "Geist"
    fontSize: "24px"
    fontWeight: 500
    lineHeight: 1.3
rounded:
  sm: "8px"
  md: "12px"
  full: "999px"
spacing:
  sm: "12px"
  md: "16px"
  lg: "24px"
---

# example.com DESIGN.md

## 1. Visual Theme & Atmosphere
Clean, minimalist aesthetic built for conversion and clarity.

## 2. Color Palette & Roles
- **Primary / Brand** (`#ed5f45`): Primary call-to-action fill and brand highlights.
- **Canvas** (`#ffffff`): Page foundation and main content canvas.
- **Surface** (`#fafafa`): Card backgrounds and elevated code boxes.

## 3. Typography Rules
Primary Font Family: `Geist`

---
Extracted with [Copy Markdown](https://www.copymarkdown.md)
```

## Navigation & Resources
- Web Interface: https://www.copymarkdown.md/design
- CONTENT.md: https://www.copymarkdown.md/content.md
- LINKS.md: https://www.copymarkdown.md/links.md
- Chrome Web Store: https://chromewebstore.google.com/detail/copy-markdown/chjlhkmhgpojfmddbpplonolmcjbbbem
- Home: https://www.copymarkdown.md
- Built by Michael Vereb: https://www.michaelvereb.com
