Other (Income) Expense, Net - Schedule of Other (Income) Expense, Net (Detail) - USD ($) $ in Thousands |
3 Months Ended | |
|---|---|---|
Aug. 31, 2024 |
Aug. 31, 2023 |
|
| Other Income and Expenses [Abstract] | ||
| Pension non-service (credits) costs | $ (27) | $ 2,781 |
| Other | (507) | (227) |
| Other (income) expense, net | $ (534) | $ 2,554 |