v3.25.2
Stock-Based Compensation - Additional Information (Detail) - USD ($)
shares in Thousands, $ in Thousands
12 Months Ended
May 31, 2025
May 31, 2024
May 31, 2023
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]      
Common stock authorized for issuance   7,780,633  
Pre-tax stock-based compensation expense $ 16,186 $ 16,688 $ 19,178
Pre-tax stock-based compensation from continuing operations 13,521 13,155 14,566
Stock based compensation expense, after tax 12,107 14,999 14,786
Unrecognized compensation cost $ 29,857    
Non-Qualified Stock Options      
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]      
Purchase price percentage of fair market value on the grant date for stock options 100.00%    
Stock options expiration period 10 years    
Pre-tax stock-based compensation expense $ 888 1,485 1,381
Total intrinsic value of stock options exercised 4,589    
Cash received from the exercise of stock options 3,834    
Tax benefit realized from share-based payment awards $ 960    
Non-Qualified Stock Options | First Anniversary | Issued On or After June 30, 2011      
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]      
Stock options vesting percentage 33.00%    
Non-Qualified Stock Options | Second Anniversary | Issued On or After June 30, 2011      
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]      
Stock options vesting percentage 33.00%    
Non-Qualified Stock Options | Third Anniversary | Issued On or After June 30, 2011      
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]      
Stock options vesting percentage 33.00%    
Non-Qualified Stock Options | Maximum      
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]      
Purchase price percentage of fair market value on the grant date for stock options 100.00%    
Service-Based Restricted Common Shares      
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]      
Pre-tax stock-based compensation expense $ 13,901 $ 14,046 $ 17,884
Pre-tax stock-based compensation, period of recognition 3 years    
Performance Shares      
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]      
Stock options expiration period 3 years