Mainland China Contribution Plan - Additional Information (Detail) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
May 31, 2026 |
May 31, 2025 |
May 31, 2024 |
|
| Compensation and Retirement Disclosure [Abstract] | |||
| Contributions for employee benefits | $ 341,640 | $ 300,749 | $ 234,474 |