Earnings per Share and Shareholders' Equity Shareholders Equity - USD ($) shares in Thousands, $ in Thousands | Total | Common Stock [Member] | Additional Paid-in Capital [Member] | Retained Earnings [Member] | AOCI Attributable to Parent [Member] | Stock held in trust [member] [Member] | Deferred Compensation, Share-based Payments [Member] | Treasury Stock, Common |
Stock Issued During Period, Shares, New Issues | | 83,761 | | | | | | |
Stockholders' Equity, Including Portion Attributable to Noncontrolling Interest | $ 326,620 | $ 16,752 | $ 220,472 | $ 1,011,112 | $ (121,210) | $ (3,484) | $ 3,484 | $ (800,506) |
Net (loss) earnings | 17,738 | | | 17,738 | | | | |
Other Comprehensive (Loss) Income, Net of Tax | 370 | | | | 370 | | | |
Stock Issued During Period, Shares, Employee Benefit Plan | | 2 | | | | | | |
Stock Issued During Period, Value, Employee Benefit Plan | 51 | $ 0 | 51 | | | | | |
Stock Issued During Period, Shares, Restricted Stock Award, Gross | | 118 | | | | | | |
Stock Issued During Period, Value, Restricted Stock Award, Gross | 0 | $ (23) | (23) | | | | | |
APIC, Share-based Payment Arrangement, Increase for Cost Recognition | 2,717 | | 2,717 | | | | | |
Stock Issued To Acquired For And Distributed From Rabbi Trust | | 3 | | | | | | |
Stock Value Issued to Acquired For and Distributed From Rabbi Trust | (90) | $ (1) | (89) | | | (92) | (92) | |
Adjustments to Additional Paid in Capital, Other | (2,025) | | (2,025) | | | | | |
Shares Issued, Shares, Share-based Payment Arrangement, after Forfeiture | | 83 | | | | | | |
Stock Issued During Period, Value, Stock Options Exercised | 2,210 | $ 17 | 2,193 | | | | | |
Treasury Stock, Value, Acquired, Cost Method | (26,116) | | | | | | | 26,116 |
Dividends, Cash | 21 | | | 21 | | | | |
Stock Issued During Period, Shares, New Issues | | 83,967 | | | | | | |
Stockholders' Equity, Including Portion Attributable to Noncontrolling Interest | 321,676 | $ 16,793 | 223,474 | 1,028,871 | (120,840) | (3,576) | 3,576 | (826,622) |
Stock Issued During Period, Shares, New Issues | | 54,235 | | | | | | |
Stockholders' Equity, Including Portion Attributable to Noncontrolling Interest | 391,979 | $ 10,847 | 235,660 | 261,870 | (116,398) | (3,777) | 3,777 | 0 |
Adoption of Accounting Standards | $ 261,870 | | | | | | | |
Stockholders' Equity Note Disclosure [Text Block] | The following table illustrates the changes in the balances of each component of shareholders' equity for the three months ended November 30, 2024 (in thousands): Common Stock Additional Treasury Retained Accumulated Stock Deferred Total Issued Amount Balance at August 31, 2024 54,235 $ 10,847 $ 235,660 $ — $ 261,870 $ (116,398) $ (3,777) $ 3,777 $ 391,979 Net earnings — — — — 21,723 — — — 21,723 Other comprehensive income, net of tax — — — — — (9,676) — — (9,676) Stock contribution to employee benefit plans and other 2 — 91 — — — — — 91 Vesting of equity awards 186 37 (37) — — — — — — Cash dividend ($0.04 per share) — — — — 3 — — — 3 Stock based compensation expense — — 3,345 — — — — — 3,345 Stock option exercises 87 18 1,310 — — — — — 1,328 Tax effect related to net share settlement of equity awards — — (6,405) — — — — — (6,405) Stock issued to, acquired for and distributed from rabbi trust — — — — — — 3 (3) — Treasury stock repurchased and retired (110) (22) — — (4,357) — — — (4,379) Balance at November 30, 2024 54,400 $ 10,880 $ 233,964 $ — $ 279,239 $ (126,074) $ (3,774) $ 3,774 $ 398,009 The following table illustrates the changes in the balances of each component of shareholders' equity for the three months ended November 30, 2023 (in thousands): Common Stock Additional Treasury Retained Accumulated Stock Deferred Total Issued Amount Balance at August 31, 2023 83,761 $ 16,752 $ 220,472 $ (800,506) $ 1,011,112 $ (121,210) $ (3,484) $ 3,484 $ 326,620 Net earnings — — — — 17,738 — — — 17,738 Other comprehensive income, net of tax — — — — — 370 — — 370 Stock contribution to employee benefit plans and other 2 — 51 — — — — — 51 Vesting of equity awards 118 23 (23) — — — — — — Cash dividend ($0.04 per share) — — — — 21 — — — 21 Treasury stock repurchases — — — (26,116) — — — — (26,116) Stock based compensation expense — — 2,717 — — — — — 2,717 Stock option exercises 83 17 2,193 — — — — — 2,210 Tax effect related to net share settlement of equity awards — — (2,025) — — — — — (2,025) Stock issued to, acquired for and distributed from rabbi trust 3 1 89 — — — (92) 92 90 Balance at November 30, 2023 83,967 $ 16,793 $ 223,474 $ (826,622) $ 1,028,871 $ (120,840) $ (3,576) $ 3,576 $ 321,676 | | | | | | | |
Net (loss) earnings | $ 21,723 | | | 21,723 | | | | |
Other Comprehensive (Loss) Income, Net of Tax | (9,676) | | | | (9,676) | | | |
Stock Issued During Period, Shares, Employee Benefit Plan | | 2 | | | | | | |
Stock Issued During Period, Value, Employee Benefit Plan | 91 | $ 0 | 91 | | | | | |
Stock Issued During Period, Shares, Restricted Stock Award, Gross | | 186 | | | | | | |
Stock Issued During Period, Value, Restricted Stock Award, Gross | 0 | $ (37) | (37) | | | | | |
APIC, Share-based Payment Arrangement, Increase for Cost Recognition | 3,345 | | 3,345 | | | | | |
Stock Issued To Acquired For And Distributed From Rabbi Trust | | 0 | | | | | | |
Stock Value Issued to Acquired For and Distributed From Rabbi Trust | 0 | $ 0 | 0 | | | 3 | 3 | |
Adjustments to Additional Paid in Capital, Other | (6,405) | | (6,405) | | | | | |
Shares Issued, Shares, Share-based Payment Arrangement, after Forfeiture | | 87 | | | | | | |
Stock Issued During Period, Value, Stock Options Exercised | 1,328 | $ 18 | 1,310 | | | | | |
Treasury Stock, Retired, Cost Method, Amount | (4,379) | | | 4,357 | | | | |
Treasury Stock, Retired, Par Value Method, Amount | | | | (22) | | | | |
Treasury Stock, Shares, Retired | | (110) | | | | | | |
Dividends, Cash | 3 | | | 3 | | | | |
Stock Issued During Period, Shares, New Issues | | 54,400 | | | | | | |
Stockholders' Equity, Including Portion Attributable to Noncontrolling Interest | 398,009 | $ 10,880 | $ 233,964 | $ 279,239 | $ (126,074) | $ (3,774) | $ 3,774 | $ 0 |
Adoption of Accounting Standards | $ 279,239 | | | | | | | |