An optimized format number helper for currencies, decimal, and percent styles. Uses `Intl.NumberFormat` and `toLocaleString()`.