# APIFor brand: apifordevdesign.md

The design system for apifor.dev (website, docs, dashboard, MCP consent, social and launch graphics).
Colors come from khmuhtadin.com. Fonts are DM Sans and DM Mono.
Version 1.1, 28 Nov 2026. Read the whole file before designing.

Layers: 1 Core primitives, 2 Brand elements, 3 Graphic modes (semantic tokens), 4 The grid, 5 Tone of voice, 6 Product UI rules.

## Rules that always apply
1. Use token names (CSS variables), never raw hex in components.
2. Never invent a color, font, spacing or radius value that is not listed here.
3. Every surface is built in one Graphic Mode: Light (default), Dark, or Maker. Pick the mode, then take colors from that mode.
4. Everything sits on an invisible 8px cross grid. Never draw the cross grid.
5. One lime signal per view (two at most). Neutrals do the rest.

---

## 1. Core primitives

### 1.1 Color (from khmuhtadin.com)

Core
| Token | Hex |
|---|---|
| `--core-white` | `#FFFFFF` |
| `--core-ink` | `#111111` |

Accent: Lime. Main lime `#BDEE63` is the signature color. It is a FILL, never text on light backgrounds.
| Token | Hex | Notes |
|---|---|---|
| `--lime-10` | `#F5FCE6` | lightest tint |
| `--lime-20` | `#EAF9CC` | hover tint |
| `--lime-30` | `#D9F5A4` | focus ring, pressed |
| `--lime-main` | `#BDEE63` | main brand lime |
| `--lime-60` | `#9FD13F` | hover on lime fill |
| `--lime-70` | `#4E7912` | lime-colored TEXT on light (5.16:1 on white) |
| `--lime-80` | `#33500B` | dark-mode accent background, text on lime-20 |
| `--lime-90` | `#1E3006` | darkest |

Greys (khmuhtadin.com scale)
`--gray-0 #FFFFFF`, `--gray-05 #FAFAFA`, `--gray-10 #F7F7F7`, `--gray-15 #F1F1F1`, `--gray-20 #EDEDED`, `--gray-25 #E3E3E3`, `--gray-30 #D4D6DA`, `--gray-40 #B4B8BF`, `--gray-50 #9095A0`, `--gray-60 #6C7179`, `--gray-70 #4A4D52`, `--gray-80 #333333`, `--gray-85 #262626`, `--gray-90 #1C1C1C`, `--gray-95 #111111`.

Functional (app states only, never decoration): success `#4E7912` on `#F5FCE6`; warning `#B45309` on `#FEF3E2`; error `#D93636` on `#FDEEEE`; info `#2F6FEB` on `#EAF1FE`. Dark: same hues as text on `--gray-90` panels with a 1px tinted border.

Contrast pairs (computed)
| Pair | Ratio | Verdict |
|---|---|---|
| ink on lime-main | 14.0 | default text on lime |
| white on lime-main | 1.35 | FAIL, never |
| lime-70 on white | 5.16 | lime text on light |
| lime-70 on gray-10 | 4.82 | ok |
| gray-60 on white | 4.91 | lightest body grey on light |
| gray-60 on gray-10 | 4.58 | ok |
| gray-60 on gray-20 | 4.20 | large text only |
| lime-main on ink | 14.0 | lime text allowed in Dark |
| gray-50 on ink | 6.29 | secondary text in Dark |
| gray-50 on gray-90 | 5.67 | ok |
| lime-80 on lime-20 | 8.25 | ok |

### 1.2 Typography

| Role | Typeface | Weight | Rules |
|---|---|---|---|
| Display | DM Sans | Medium 500 | largest type |
| Headline | DM Sans | Medium 500 | titles |
| Body | DM Sans | Regular 400 (500 for emphasis) | running text |
| Mono | DM Mono | Regular 400 | ALWAYS ALL CAPS. Tags, labels, dates, counts, metadata |
| Code | DM Mono | Regular 400 | code blocks keep normal case |

Why: DM Sans is calm, open and neo-grotesque, and is already khmuhtadin.com's face; DM Mono is its monospaced sibling. Self-host woff2 (latin + latin-ext). Only weights 400 and 500. No 600/700, no italics for emphasis. `font-feature-settings: "liga" 1`. Lowercase product names such as "apifor.dev" survive uppercase tags: wrap in `<span style="text-transform:none">`.

Type scale (px, multiples of 4; letter spacing as % of size)
| Style | Size | Line height | Tracking |
|---|---|---|---|
| display-lg | 160 | 144 (90%) | -1% |
| display-md | 120 | 108 (90%) | -1% |
| display-sm | 96 | 88 | -1% |
| heading-xxxl | 80 | 80 | -1% |
| heading-xxl | 56 | 56 | -1% |
| heading-xl | 48 | 48 | -1% |
| heading-lg | 40 | 44 | -1% |
| heading-md | 32 | 36 | 0 |
| heading-sm | 28 | 32 | 0 |
| heading-xs | 24 | 28 | 0 |
| heading-xxs | 20 | 24 | 0 |
| body-xl | 18 | 28 | 0 |
| body-lg | 16 | 24 | 0 |
| body-md | 14 | 20 | 0 |
| body-sm (web only) | 12 | 16 | 0 |
| mono-lg | 16 | 20 | +1% |
| mono-md | 14 | 18 | +2% |
| mono-sm | 12 | 16 | +2% |
| code | 14 | 20 | 0 |
Mobile: display caps at 64/60, heading-xxxl → 48/48, heading-xxl → 40/40.
Headlines and blocks of 4 lines or fewer: `text-wrap: balance`. Paragraphs: `text-wrap: pretty`. Body measure 45 to 75 characters. Numbers in tables/metrics: `font-variant-numeric: tabular-nums`. Hierarchy by size and placement, not color.

### 1.3 Spacing (rule of 8)
4, 8, 12, 16, 24, 32, 40, 48, 64, 80, 88, 96, 120, 160, 240. 4 and 12 only inside small elements (tags, inputs).

### 1.4 Radius (multiples of 4)
`--r-xs 4`, `--r-sm 8`, `--r-md 12`, `--r-lg 16`, `--r-xl 24`, `--r-full 400` (tags, buttons). Nested radius: inner = outer - padding.

---

## 2. Brand elements

### 2.1 Logo
- Symbol "a.": a lowercase single-storey a with a lime period, in an ink tile. Geometry (viewBox 0 0 32 32): tile `rect width=32 height=32 rx=7` ink; bowl `circle cx=12.8 cy=16 r=6.5` stroke 3.75 white, no fill; stem `path M20.05 9.6 V22.4` stroke 3.75 round, white; period `circle cx=24.8 cy=22.4 r=2.8` lime-main. The a is apifor, the period is the dot in .dev and the one record you came for.
- Wordmark: `apifor.dev` in DM Sans Medium, -2% tracking, lowercase, ".dev" in gray-60 (gray-50 on Dark).
- Lockup: symbol left, wordmark right, gap = half symbol height (16 on a 32 tile). Clear space = symbol height.
- Versions: ink tile (light), gray-85 tile with white wordmark (dark), mono ink, mono white (glyph knocked out of the tile). Never the full-color symbol on lime; on lime use mono ink. Keep the period lime.
- Favicon / app icon: the symbol itself (tile radius 22%).
- Ship as SVG files: `logo/apifor-lockup-light.svg`, `logo/apifor-lockup-dark.svg`, `logo/apifor-symbol.svg`, `logo/apifor-symbol-mono-ink.svg`, `logo/apifor-symbol-mono-white.svg`, `logo/apifor-app-icon.svg`.
### 2.2 Graphic devices
All devices come from URLs and API paths. No dots on joins or ends, no corner marks, no connecting lines, no dotted backgrounds.

**Path tag.** ONE pill (`--r-full`, `--bg-secondary` fill, no border), DM Mono 400 ALL CAPS, mono-sm, height 32. Segments are separated by a slash "/" in `--text-secondary` with 8px padding each side: `REST / MCP / ONE KEY`, `GET / V1 / HOLIDAYS`, `CASE STUDY / VODAFONE`. Optional lead segment: lime-main fill + ink text as a nested pill flush to the left inside the outer pill (no gap, no dot). Labels only, never sentences.

**Tag.** A plain pill, DM Mono caps, `--bg-secondary` or lime-main fill, padding 8×16, nothing outside its edge. Use for a single label or a vertical stack (method, licence, date). Status badges may keep a 6px state dot INSIDE the pill (functional UI only).

**Deboss.** A panel filled with the SAME color as its surroundings plus two inner shadows, so it looks pressed in. Use for the one thing to notice: hero request box, key reveal, quick-start command, pricing highlight.
| Size | top-left inset | bottom-right inset |
|---|---|---|
| S | 4 4 8 | -4 -4 8 |
| M | 8 8 12 | -8 -8 12 |
| L | 12 12 16 | -12 -12 16 |
Colors: Light top-left `--gray-20 #EDEDED`, bottom-right `#FFFFFF`. Dark top-left `#0A0A0A`, bottom-right `rgba(255,255,255,.06)`. Lime deboss (only on lime fill): top-left `rgba(51,80,11,.35)`, bottom-right `rgba(245,252,230,.6)`.

**Step path.** A horizontal list (vertical on mobile) of steps written as slash index + label: `/01 Sign up   /02 Verify email   /03 Create a key   /04 Call /v1`. Steps are separated only by space or a 1px `--border` hairline. The current or highlighted step is a lime-filled pill. No connecting lines, no dots. Max 5 steps, exactly one lime.

**Texture.** None by default. Where a background needs life, use a large faint slash pattern in the hero only (repeating "/" glyphs in DM Mono at 4% opacity of `--text-primary`), or simply a `--bg-secondary` panel. Never behind body text.

**Slash index.** DM Mono: `/01`, `/02`, `/2026`, `03/05` for section numbers and steps.

---

## 3. Graphic modes (semantic tokens)

| Token | Light (default) | Dark | Maker |
|---|---|---|---|
| `--bg-primary` | `#FFFFFF` | `#111111` | `#B4B8BF` |
| `--bg-secondary` | `#F7F7F7` | `#1C1C1C` | `#9095A0` |
| `--bg-tertiary` | `#EDEDED` | `#262626` | `#6C7179` |
| `--bg-accent` | lime-main `#BDEE63` | lime-80 `#33500B` | lime-30 `#D9F5A4` |
| `--text-primary` | `#111111` | `#F7F7F7` | `#111111` |
| `--text-secondary` | gray-60 `#6C7179` | gray-50 `#9095A0` | gray-80 `#333333` |
| `--text-on-accent` | `#111111` | `#F7F7F7` (on lime-80) / `#111111` (on lime-main) | `#111111` |
| `--text-accent` | lime-70 `#4E7912` | lime-main `#BDEE63` | lime-80 `#33500B` |
| `--interactive-primary` | `#F1F1F1` | `#262626` | `#9095A0` |
| `--interactive-primary-hover` | `#EDEDED` | `#333333` | `#B4B8BF` |
| `--interactive-accent` | lime-main | lime-main | `#111111` |
| `--interactive-accent-hover` | lime-60 `#9FD13F` | lime-60 | `#333333` |
| `--focus-ring` | `0 0 0 4px #D9F5A4` + ink 1px | `0 0 0 4px #33500B` + lime 1px | ink 2px |
| `--border` | `#E3E3E3` | `#333333` | `#6C7179` |
| `--stroke-secondary` | `#E3E3E3` | `#4A4D52` | `#F7F7F7` |

Light is the default for apifor.dev and the dashboard. Dark is supported for the dashboard and docs code panels (code blocks are always Dark-mode panels on any page). Maker is for workshop / work-in-progress assets only, never product UI.
Approximate balance per view (Light): white 60%, gray-10 22%, ink 12%, lime 6%.

---

## 4. The grid
Invisible 8px cross grid. Web: 12 columns, 24 gutter, 56 margin, max content 1328 (1440 frame). Tablet 8 col / 16 / 32. Mobile 4 col / 16 / 20. Snap tags, headlines, panels, logo to grid lines. Section spacing 120 desktop, 80 mobile. Large rounded outer frames (`--r-xl`) are allowed to hold hero compositions.

## 5. Tone of voice
A clear-thinking, experienced builder: concise, helpful, technical, supportive, honest. Not flowery, not hype.
- Clear over clever: "One key. Public data for every country."
- Specific over vague: state the real coverage number from data, never "global coverage".
- Sentence case headlines that usually end with a period. No emojis, no em dashes, no exclamation marks.
- Never invent testimonials, logos, user counts, uptime or latency claims.
- Run all copy through the humanizer skill.

## 6. Product UI rules (web + dashboard)
- Buttons: pill (`--r-full`), height 48 (sm 36, lg 56), DM Sans 500 16. Primary = `--interactive-accent` lime fill + ink text, one per region. Secondary = `--interactive-primary` gray fill + ink text (no border). Tertiary = text button with underline on hover. Press: scale .98. Disabled: gray-20 fill, gray-50 text.
- Inputs: height 48, `--r-md`, 1px `--border`, 16px text; focus = `--focus-ring`. Labels above, DM Sans 500 14.
- Cards/panels: `--bg-secondary`, `--r-xl` (24) on marketing, `--r-lg` (16) in dashboard; no shadows except dropdown/modal (`0 24px 48px -24px rgba(17,17,17,.30)`). No card-in-card.
- Tables: DM Sans 14 rows 48px, header labels in DM Mono caps mono-sm gray-60, tabular numbers, row hover `--bg-secondary`.
- Status badges: tag with functional tint fill, no border, 6px dot.
- Code blocks: Dark panel `#111111`, DM Mono 14/20, title bar with method tag + path + copy button; never overlap code.
- Icons: Lucide 1.75 stroke, 20px.
- Motion: 150-200ms ease-out, no bounce; respect prefers-reduced-motion.

---

## Changelog
- v1.1, 28 Nov 2026: dot-joined capsule rows, corner-marked capsules, the node-and-line flow device and the dotted background texture are retired. Replaced by the path tag, tag, step path and the optional hero slash texture (section 2.2). Tokens `--dot-primary`, `--dot-accent` and `--capsule-dot` removed.
- v1, 28 Nov 2026: first release.
