v3.26.1
STOCK-BASED COMPENSATION - Schedule of Stock-Based Compensation Expense (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2026
Jun. 30, 2025
Jun. 30, 2026
Jun. 30, 2025
Share-Based Compensation Arrangement by Share-Based Payment Award [Line Items]        
Total stock-based compensation expense $ 46,891 $ 54,656 $ 78,764 $ 103,771
Location, Statement of Income, Balance [Axis]: us-gaap:GeneralAndAdministrativeExpense        
Share-Based Compensation Arrangement by Share-Based Payment Award [Line Items]        
Total stock-based compensation expense 45,182 52,867 74,337 101,787
Location, Statement of Income, Balance [Axis]: us-gaap:ResearchAndDevelopmentExpense        
Share-Based Compensation Arrangement by Share-Based Payment Award [Line Items]        
Total stock-based compensation expense 889 1,091 1,559 1,195
Location, Statement of Income, Balance [Axis]: us-gaap:RestructuringCosts        
Share-Based Compensation Arrangement by Share-Based Payment Award [Line Items]        
Total stock-based compensation expense 208 0 1,575 0
Location, Statement of Income, Balance [Axis]: mara:CostOperatingAndMaintenance        
Share-Based Compensation Arrangement by Share-Based Payment Award [Line Items]        
Total stock-based compensation expense $ 612 $ 698 $ 1,293 $ 789