# Agentic Design System by Madhav Nair: instructions for AI agents > A small, headless design system (CSS variables + W3C design tokens + semantic HTML recipes). Free to use. No framework, no build step. ## Files (load the CSS in this order) 1. https://madhavnair.in/css/base.css: base colour, type, shadow and motion tokens per mode (+ Inter @font-face) 2. https://madhavnair.in/css/tokens.css: spacing, radii, type scale and semantic tokens 3. https://madhavnair.in/css/themes.css: themes as token overrides (html[data-theme], html[data-mode]) 4. https://madhavnair.in/css/components.css: component recipes (prefix c-) - https://madhavnair.in/design/tokens.json: the same tokens in W3C Design Tokens (DTCG) format - https://madhavnair.in/design/components.json: component specs: anatomy, variants, tokens used, accessibility rules, exact HTML - https://madhavnair.in/DESIGN.md: the design language for humans - https://madhavnair.in/design/madhav-design-system.zip: all of the above, plus Inter, licences and a sample index.html that works offline ## Rules (must) 1. Use tokens only. No raw hex/rgb colours or radii in component CSS. Radii: --r-sm, --r, --r-lg, --r-pill. 2. Set html[data-mode="light"|"dark"] before first paint; themes change tokens, never components. 3. One accent (--accent). Use it for the current item, the primary chip and small tags. Never for body text or large fills. 4. Dark mode primary button = dark pill (--pill) + accent chip (c-btn + c-btn__chip). 5. Sticky bars are solid (--chrome) and sit at top: var(--hh). Never translucent. 6. Media sits in c-plate or c-card--media and is clipped. Real images with width, height and alt. 7. No fixed min-heights on stacked cards. Spacing from the --s-1…--s-9 scale. 8. Geist Pixel (--pixel) for tiny labels only. 9. Copy: candid, specific, British English. No invented metrics, quotes or claims. ## Don't Glow, gradient text, HUD looks, heavy gradients, neon overload, nested double frames, hover-only content, autoplaying motion. ## Test checklist (must pass before shipping) - No horizontal scroll at 320, 360, 390, 412, 768, 1024, 1280, 1440, 1920px. - Text ≥ 4.5:1, text on accent ≥ 4.5:1, focus ring ≥ 3:1, in light and dark. - Tap targets ≥ 44px on touch; everything reachable by keyboard with visible focus. - prefers-reduced-motion: no running animations. 200% zoom: reflows. - One h1, title, description, canonical, OG image, alt text on every image. - Sticky elements don't overlap each other or hide content. ## Components ### card (.c-card) Anatomy: c-pill (optional), heading, body, c-card__foot (optional, pinned to bottom) Variants: c-card--lead: the one current thing; 3px accent edge, c-card--media: no padding, media clipped, body in c-card__body, c-card--quiet: sunken, no shadow Tokens: --bg-raised, --bg-sunken, --r-lg, --s-5, --shadow-1, --border, --accent A11y: One heading per card. If the whole card is a link, use only one . No fixed min-height. HTML:
Now

Card title

Short supporting text.

Read more
### button (.c-btn) Anatomy: c-btn__chip (icon on accent), label Variants: (base): ink pill (light), dark pill (dark) with accent chip, c-btn--accent: accent fill, c-btn--ghost: outline only Tokens: --fg, --bg-page, --pill, --accent, --on-accent, --r, --r-sm A11y: At least 44×44px. Visible :focus-visible ring ≥3:1. Text on accent ≥4.5:1. HTML: Primary ### pill (.c-pill) Anatomy: c-pill__dot (optional), text Variants: none Tokens: --bg-sunken, --fg-2, --accent, --r-sm, --t-xs A11y: Not interactive. The dot is decorative. HTML: Label ### chip (.c-chip) Anatomy: text Variants: [aria-pressed=true]: selected Tokens: --fg, --bg-page, --fg-2, --r-pill, --border-strong A11y: State via aria-pressed. 44px tap height on touch. HTML: ### tag (.c-tag) Anatomy: text Variants: c-tag--pixel: Geist Pixel label; sparingly Tokens: --accent, --on-accent, --r-sm, --t-xs, --pixel A11y: Text on accent ≥4.5:1. Never the only signal of state. HTML: New BETA ### section (.c-section) Anatomy: c-section__head, content Variants: c-section--tight: smaller block padding Tokens: --s-8, --s-6, --s-5 A11y: Has a heading or aria-label. HTML:

Section title

Section content.

### sticky-bar (.c-sticky) Anatomy: controls Variants: none Tokens: --chrome, --line, --hh, --s-2 A11y: Solid, never translucent. top = header height (--hh). Anchors need scroll-margin-top. HTML:
### plate (.c-plate) Anatomy: img with width/height + alt, figcaption (optional) Variants: none Tokens: --bg-raised, --r-lg, --shadow-1, --border A11y: Meaningful alt. Lazy-load below the fold. HTML:
Caption