Restructuring and Other Expense, Net - Schedule of Progression of Liabilities Associated with Restructuring Activities, Combined with Reconciliation to Restructuring and Other Expense, Net (Detail) - USD ($) $ in Thousands |
12 Months Ended | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Jun. 03, 2024 |
May 31, 2026 |
May 31, 2025 |
May 31, 2024 |
||||||||||||||
| Restructuring Cost and Reserve [Line Items] | |||||||||||||||||
| Beginning Balance | $ 685 | $ 188 | |||||||||||||||
| Expense | $ 6,867 | $ 3,228 | |||||||||||||||
| Restructuring Charges, Statement of Income or Comprehensive Income [Extensible Enumeration] | Restructuring and other expense, net | Restructuring and other expense, net | |||||||||||||||
| Payments | $ (7,359) | $ (2,731) | |||||||||||||||
| Ending Balance | 193 | 685 | $ 188 | ||||||||||||||
| Net loss on sale of assets | 233 | 95 | |||||||||||||||
| Release of contingent liability for Level5 earnout | $ 7,139 | ||||||||||||||||
| Stock-based compensation | 13,734 | 16,186 | 16,688 | ||||||||||||||
| Restructuring and other expense, net | 7,100 | 10,524 | [1] | 29,327 | [1] | ||||||||||||
| Ragasco [Member] | |||||||||||||||||
| Restructuring Cost and Reserve [Line Items] | |||||||||||||||||
| Change in fair value of Ragasco earnout | [2] | 4,536 | |||||||||||||||
| Former CEO | |||||||||||||||||
| Restructuring Cost and Reserve [Line Items] | |||||||||||||||||
| Stock-based compensation | [3] | 2,665 | |||||||||||||||
| Early Retirement And Severance | |||||||||||||||||
| Restructuring Cost and Reserve [Line Items] | |||||||||||||||||
| Beginning Balance | 585 | 188 | |||||||||||||||
| Expense | 941 | 1,993 | |||||||||||||||
| Payments | (1,333) | (1,596) | |||||||||||||||
| Ending Balance | 193 | 585 | $ 188 | ||||||||||||||
| Other Restructuring Charges | |||||||||||||||||
| Restructuring Cost and Reserve [Line Items] | |||||||||||||||||
| Beginning Balance | [4],[5] | 100 | |||||||||||||||
| Expense | 5,926 | [5] | 1,235 | [4] | |||||||||||||
| Payments | $ (6,026) | [5] | (1,135) | [4] | |||||||||||||
| Ending Balance | [4],[5] | $ 100 | |||||||||||||||
| |||||||||||||||||