# Night Graph

A private thinking tool at night. Soft charcoal pages, never pure black, hold big left-aligned Geist headlines and one calm violet accent. The product is the picture: an app window with three panes, a file tree on the left, a note set in a reading serif in the middle, and a graph of linked dots on the right, with a small phone overlapping its corner. Inline `[[links]]` and `#tags` glow lavender, and a faint field of dots and thin lines drifts behind the hero like a constellation. It feels thoughtful, private and quietly nerdy, like a tool for people who keep things for a long time.

Use it for: note-taking and research tools, personal knowledge apps, family history and archives, writing tools, education products, privacy-first consumer apps, anything where connections between things are the point. Avoid it for: loud retail and sales pages, kids brands, food and hospitality that need photography, bright daytime brands.

## How to use this file

Give this file, `tokens.css` and `components.css` to your AI coding tool and say:

> Build [your page] in the Night Graph style. Follow DESIGN.md exactly. Use the tokens in tokens.css and the classes in components.css; don't invent new colors, fonts, radii or shadows.

`demo.html` (a landing page), `pricing.html`, `blog.html` and `signup.html` are complete example pages built only with the kit, for an invented family history app called Rootline.

## Fonts

All free on Google Fonts:

```html
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap" rel="stylesheet">
```

| Role | Font | Use |
|---|---|---|
| Headlines and UI | Geist 400 to 700 | Hero at 700 with -0.04em tracking. Section titles at 650. Buttons and nav at 500 to 550. |
| Reading text | Source Serif 4 400 and 600, italic | Note bodies inside windows, article paragraphs, quotes and testimonials. This is the "thinking" voice. |
| Tags and labels | Geist Mono 400 to 500 | `#tags`, eyebrows, badges, table heads, footnotes, graph labels. 11 to 12px. |

## Color

| Token | Hex | Role |
|---|---|---|
| `--ng-night` | #17161B | The page, the tree pane, the window title bar, inputs |
| `--ng-pane` | #1F1E24 | Windows, cards, plans, the CTA panel |
| `--ng-raised` | #28272E | Quiet buttons, the selected tree row, avatars |
| `--ng-hover` | #312F38 | Hover on quiet buttons |
| `--ng-line` | #35333D | Every 1px border |
| `--ng-line-bright` | #4A4754 | Graph edges, constellation lines, window lights |
| `--ng-text` | #ECEAF1 | Headlines and strong text |
| `--ng-dim` | #A29EAD | Leads, body copy, nav links |
| `--ng-faint` | #6D6978 | Footnotes, placeholders, `[[ ]]` brackets |
| `--ng-violet` | #8A6CF4 | The one accent: main button, the focused node, list dots, focus rings |
| `--ng-lavender` | #BBA9FF | Links, wikilinks, tags, eyebrows, icons |
| `--ng-moss` | #5FC48C | Status dots and one graph node only |
| `--ng-amber` | #E6AE4E | Status dots only |

Rules:
- The page is charcoal, not black. Depth comes from three close surfaces (night, pane, raised), not from contrast.
- Violet is for one filled button per screen and for the focused node in a graph. Everything else that is "linked" uses lavender text or the soft violet wash (`--ng-violet-soft`).
- Moss and amber are tiny dots, never fills.
- The violet haze (`--ng-haze`) sits top right of the hero and in the featured plan. Keep it faint.

## Type scale

| Token | Size | Use |
|---|---|---|
| `--ng-text-hero` | clamp(42px, 6.4vw, 84px) | Left-aligned page titles, one short sentence with a full stop |
| `--ng-text-h2` | clamp(30px, 3.8vw, 48px) | Section titles |
| `--ng-text-lead` | clamp(19px, 2vw, 26px) | Dim leads under titles, with a `<strong>` phrase in full white |
| `--ng-text-h3` | 19px | Card and plan names |
| `--ng-text-read` | 18px | Serif article paragraphs |
| `--ng-text-body` | 16px | UI and card text |
| `--ng-text-micro` | 12px | Mono footnotes and tags |

Headlines are short, calm statements that end with a full stop ("Remember where you come from."). Leads are dim, with one phrase lifted to white to carry the point.

## Shape and space

- Radius: 4px tags inside notes and tree rows, 6px buttons and inputs, 10px card icons and toggles, 14px windows and cards, 22px plans, CTA and the auth card, pill for tags and badges.
- Borders: 1px `--ng-line` on cards, plans, tables, the nav when scrolled content sits under it, and pane dividers inside windows.
- Shadows: windows float on a deep, soft drop shadow with a faint white ring (`--ng-shadow-window`). The violet button gets a violet under-glow (`--ng-shadow-btn`). Cards get a top sheen and a light shadow.
- Atmosphere: `.ng-hero::before` paints the violet haze plus a 28px dot field, masked to fade downwards. A `.ng-constellation` SVG of dots and lines sits behind the hero copy on the right, with one pulsing violet node.
- Sections: 80px vertical padding, 128px above the hero. Container 1160px with 24px gutters. Reading column 680px.
- Motion: slow and quiet. Content rises 14px on load (`.ng-rise`), the focused node pulses (`.ng-pulse`), buttons sink 1px on press.

## Components (in components.css)

| Class | What it is |
|---|---|
| `.ng` | Put on `<body>`: charcoal page, Geist, light text |
| `.ng-container`, `.ng-section`, `--tight`, `.ng-rule` | Layout |
| `.ng-nav`, `--lined`, `__inner`, `__links`, `__end`, `.ng-logo`, `__mark`, `.ng-hide-sm` | Sticky blurred nav |
| `.ng-hero-title`, `.ng-h2`, `.ng-h3`, `.ng-lead`, `.ng-body`, `.ng-micro`, `.ng-eyebrow` | Type. The eyebrow has a glowing violet dot. |
| `.ng-link`, `.ng-wikilink`, `.ng-tag` | Inline marks: underlined link, `[[wikilink]]` with faint brackets, `#tag` chip |
| `.ng-btn`, `--violet`, `--quiet`, `--text`, `--lg`, `--sm`, `--block` | Buttons |
| `.ng-hero`, `__lead`, `__actions`, `__note`, `.ng-constellation` | Left-aligned hero over the dot field and constellation |
| `.ng-stage`, `.ng-window`, `__bar`, `__lights`, `__tabs`, `__tab`, `--on`, `__panes`, `--two` | The three-pane app window |
| `.ng-tree`, `__label`, `__item`, `--file`, `--open`, `--on`, `__nest` | File tree pane |
| `.ng-note`, `__title`, `__meta` | Note pane in the reading serif |
| `.ng-graph`, `__label` | Graph pane: draw it as inline SVG with grey nodes, lavender neighbours and one violet focus node |
| `.ng-phone`, `__notch`, `__title`, `__row` | Small phone that overlaps the window corner |
| `.ng-grid--2/3/4`, `.ng-card`, `__icon`, `--link` | Cards |
| `.ng-split`, `.ng-list` | Two-column text and visual, glowing-dot list |
| `.ng-stats`, `.ng-stat`, `__num`, `__label` | Big numbers on a hairline |
| `.ng-quote`, `.ng-avatar` | Serif testimonial |
| `.ng-badge`, `--violet`, `.ng-dot`, `--violet`, `--amber` | Mono badges and status dots |
| `.ng-toggle` | Segmented toggle (`aria-pressed="true"` is the active button) |
| `.ng-plans`, `.ng-plan`, `--featured`, `__top`, `__price`, `__amount`, `__per` | Pricing |
| `.ng-table-wrap`, `.ng-table`, `.ng-yes` | Comparison table |
| `.ng-faq` | `<details>` FAQ with a violet plus |
| `.ng-auth`, `.ng-form`, `.ng-field`, `.ng-label`, `.ng-input`, `.ng-select`, `.ng-hint`, `.ng-check`, `.ng-or` | Forms |
| `.ng-article`, `.ng-callout`, `.ng-byline`, `.ng-backlinks` | Long-form post with a backlinks footer |
| `.ng-cta` | Panel with the haze and dot field |
| `.ng-footer`, `__grid`, `__base` | Footer |
| `.ng-rise`, `.ng-pulse` | Motion |

## Pages in this kit

- `demo.html`: landing page. Nav, left-aligned hero over the constellation, the three-pane window with an overlapping phone, a split with a glowing-dot list and stats, three cards, two serif quotes, CTA, footer.
- `pricing.html`: left-aligned title, monthly or yearly toggle, three plans with the middle one hazed violet, a comparison table, a two-column FAQ and a CTA.
- `blog.html`: badge, title, byline, a two-pane window as the figure, a serif article with inline code, a callout and a pull quote, and a "linked from" row of cards.
- `signup.html`: one auth card floating over the constellation, social buttons, the form and a violet submit.

## Page recipe

1. `.ng-nav` with the logo, four links and a quiet button on the right.
2. A left-aligned `.ng-hero`: a mono eyebrow, a one-sentence title with a full stop, a dim lead with one white phrase, one violet button and a text link, and a mono footnote. Add a `.ng-constellation` behind it.
3. A `.ng-stage` with the `.ng-window` showing real-looking content: a tree, a note with tags and wikilinks, and a graph. Overlap a `.ng-phone` on wide screens.
4. Sections that alternate text with stats, cards and quotes. Keep headings left-aligned.
5. Finish with a `.ng-cta` and the footer.

Pricing: a left-aligned title and `.ng-toggle`, three `.ng-plan`s with the middle one `--featured` and its button `--violet`, then a table and a two-column FAQ.

Article: a `.ng-badge`, title, `.ng-byline`, a two-pane window as the figure, then `.ng-article` in the serif with `<code>`, a `.ng-callout`, a blockquote, and `.ng-backlinks` as the ending.

Sign up: one `.ng-auth` card in a `.ng-hero` (so it gets the haze and dot field), a constellation, two quiet social buttons, `.ng-or`, the form and a `--violet --block` submit.

## Don'ts

- Don't use pure black (#000) or pure white; use `--ng-night` and `--ng-text`.
- Don't centre the hero. Titles sit left, the constellation sits right.
- Don't use more than one violet filled button per screen.
- Don't use photos or stock illustration. The window, the graph and the constellation are the pictures.
- Don't set UI in the serif. The serif is only for reading text: notes, articles and quotes.
- Don't add gradients across whole sections; the haze is faint and lives in one corner.
- Don't use em dashes in copy.
