Extract problem rendering logic into shared generateProblemStackFunction() to serve as single source of truth for both full worksheets and previews. - Add typstHelpers.ts with generateTypstHelpers() for colors/ten-frames/diagonal-split - Add generateProblemStackFunction() returning problem-stack() Typst function - Update typstGenerator.ts to use shared function instead of inline code - Remove 117 lines of duplicate problem rendering code from typstGenerator This ensures worksheet and preview always render identically. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>