- Fix 1: drawSection now checks if ensureSpace triggered a page break by
comparing state.y before/after. Only subtract SECTION_GAP if we're not
at the top of a fresh page, avoiding wasting 20px after page breaks.
- Fix 2: CAPA loop now reserves LINE_HEIGHT * 4 instead of just LINE_HEIGHT
to keep the label and at least a few fields together on the same page.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEYxFQiCyxJvnBCoZeYzB9