v3.26.3
Derivative Financial Instruments and Hedging Activities - Schedule of Pretax Gains (Losses) on Derivatives Not Accounted for as Hedging Instruments (Details) - USD ($)
$ in Thousands
12 Months Ended
Aug. 31, 2026
Aug. 31, 2025
Aug. 31, 2024
Derivative Instruments and Hedging Activities Disclosures [Line Items]      
Pretax gains (losses) on derivatives not accounted for as hedging instruments $ 9,297 $ 64,805 $ (29,391)
Commodity derivatives | Location, Statement of Income, Balance [Axis]: us-gaap:CostOfGoodsAndServicesSold      
Derivative Instruments and Hedging Activities Disclosures [Line Items]      
Pretax gains (losses) on derivatives not accounted for as hedging instruments 16,271 21,473 5,380
Foreign exchange derivatives | Location, Statement of Income, Balance [Axis]: us-gaap:CostOfGoodsAndServicesSold      
Derivative Instruments and Hedging Activities Disclosures [Line Items]      
Pretax gains (losses) on derivatives not accounted for as hedging instruments (6,769) 39,681 (31,874)
Foreign exchange derivatives | Location, Statement of Income, Balance [Axis]: us-gaap:SellingGeneralAndAdministrativeExpense      
Derivative Instruments and Hedging Activities Disclosures [Line Items]      
Pretax gains (losses) on derivatives not accounted for as hedging instruments $ (205) $ 3,651 $ (2,897)