# How a page is built

1. **Scrape** — each route's server HTML is stored in `scraped/html/<page>.html`
   (real markup plus nsave's serialized router payload).
2. **Split** — `<header>`, `<main>` and `<footer>` are cut into
   `components/exact/<page>-{header,main,footer}.html`, which each route imports
   through `raw-loader` (`html.d.ts` declares the `*.html` module).
3. **Answers** — nsave renders FAQ answers only on interaction, so
   `scripts/inject-faq.mjs` bakes the real answer text (from nsave's own payload and
   JS chunks, kept in `components/exact/faq.json`) into the markup using nsave's own
   collapse pattern: `grid-rows-[0fr] -> grid-rows-[1fr]`.
   Re-run it with `npm run inject-faq` (idempotent, renumbers panel ids per file).
4. **Render** — `components/ExactPage.tsx` injects the markup and boots the behaviours.