Implement smart width-checking for complex mathematical displays to enable
inline rendering when space permits, dramatically improving multiline layout.
Changes:
- Add shouldBreakBeforeDisplay() helper to check width before line breaks
- Add performLineBreak() helper for clean line transitions
- Modify fraction handling to stay inline when they fit within maxWidth
- Modify radical handling to stay inline when they fit within maxWidth
- Support radicals with degrees (cube roots, nth roots, etc.)