# Information Density Patterns for Long-form Documents
**Why this exists:** The `md-document` converter renders long-form markdown (specs, RFCs, reports, explainers) — typically 100-2000 lines of prose, code, tables, and callouts. Past 100 lines the linear flow loses orientation. This document codifies the patterns that restore it.
## The four density patterns
### 1. Hierarchy made visible
Linear markdown shows hierarchy through indented `#` characters. HTML shows hierarchy through typography scale, color, weight, spacing, and surface. The renderer uses a modular type scale (`typography.scale_ratio`, default 1.25 = major third) so each heading level is visibly proportional. H2 sections get a hairline `border-bottom` for visual chunking. Callouts get a 4px accent border that signals "stop and read."
### 2. Lateral navigation
Linear reading is one channel — top to bottom. The renderer adds:
- **Sticky-sidebar TOC** (default) — always visible, jumps to any H2/H3 in one click.
- **Scrollspy** — the current section's TOC entry gets `aria-current="location"` as the reader scrolls, so they always know where they are.
- **Anchored headings** — every H2-H6 gets an `id` derived from the heading text, so deep links work without further effort.
- **Smooth scroll** — TOC clicks animate, not jump, so the reader keeps spatial context.
### 3. Lateral structure
Side-by-side comparison is impossible in linear markdown. HTML provides:
- **Tables** — rendered with `
`, semantic `/`, per-column alignment from the GFM delimiter row.
- **Collapsible sections** — `` blocks for content the reader can skip on first pass. (TOC variant `collapsible-top` uses this for the TOC itself.)
- **Callouts** — `