Earnings (Loss) Per Share - Narrative (Details) - USD ($) shares in Thousands, $ in Millions |
3 Months Ended | |
|---|---|---|
Aug. 31, 2026 |
Aug. 31, 2025 |
|
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||
| Remaining authorized stock repurchase amount | $ 157.4 | |
| Stock option expense | ||
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||
| Antidilutive shares excluded from calculation of earnings per share (in shares) | 1,500 | 2,600 |
| Restricted Stock Units (RSUs) | ||
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||
| Antidilutive shares excluded from calculation of earnings per share (in shares) | 600 | 500 |