Beyond In-Distribution Success: Scaling Curves of CoT Granularity for Language Model Generalization