Earnings Per Share - Reconciliation of Shares Used in Computation of Basic and Diluted Earnings Per Common Share (Detail) - shares shares in Thousands |
3 Months Ended | 9 Months Ended | ||||||
|---|---|---|---|---|---|---|---|---|
May 31, 2026 |
May 31, 2025 |
May 31, 2026 |
May 31, 2025 |
|||||
| Earnings Per Share Disclosure [Line Items] | ||||||||
| Weighted average basic common shares outstanding | 30,938 | 31,186 | 30,936 | 31,269 | ||||
| Dilutive effect of restricted stock units | [1] | 807 | 998 | 845 | 963 | |||
| Weighted average diluted common shares outstanding | 31,745 | 32,184 | 31,781 | 32,272 | ||||
| 2.875% Convertible senior notes, due 2028 | ||||||||
| Earnings Per Share Disclosure [Line Items] | ||||||||
| Dilutive effect of convertible notes | [2] | 0 | 0 | 0 | 40 | |||
| ||||||||