v3.25.2
Long-term debt - Narrative (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jan. 01, 2027
Jun. 30, 2026
Oct. 08, 2024
Aug. 09, 2024
Dec. 22, 2021
Jun. 30, 2025
Jun. 30, 2024
Jun. 30, 2025
Jun. 30, 2024
Dec. 31, 2024
Debt Instrument [Line Items]                    
Long-term debt, gross           $ 100,000   $ 100,000   $ 100,000
Maturity, due 2029           107,000   107,000    
Secured debt | Loan agreement                    
Debt Instrument [Line Items]                    
Prepayment premium (as a percent)       1.00%            
Long-term debt, gross     $ 100,000     $ 100,000   $ 100,000   100,000
Periodic principal payment     $ 100,000              
Covenant period     6 months 6 months 6 months          
Minimum net product revenue as a percentage of projected monthly net revenue     80.00% 75.00%            
Interest rate, stated percentage, partial prepayment     0.0595              
Basis spread on variable rate     2.50%   0.10%          
Stated interest rate         7.45%          
Interest rate at end of period           10.27%   10.27%    
Default rate (as a percent)         4.00%          
Fair value of the embedded derivative instrument           $ 400   $ 400   $ 600
Final fee (as percent)         6.95%          
Exit fee (as percent)         3.00%          
Exit fee expiration period (in years)         10 years          
Deferred final fee         $ 13,900          
Effective interest rate (as a percent)           11.37%   11.37%   11.57%
Interest expense           $ 3,000 $ 7,500 $ 6,000 $ 15,000  
Secured debt | Loan agreement | Forecast                    
Debt Instrument [Line Items]                    
Debt instrument, prepayment penalty   $ 1,000                
Deferred final fee $ 6,950                  
Secured debt | Loan agreement | Debt Instrument, Redemption, Period One                    
Debt Instrument [Line Items]                    
Prepayment premium (as a percent)     3.00%              
Secured debt | Loan agreement | Debt Instrument, Redemption, Period Two                    
Debt Instrument [Line Items]                    
Prepayment premium (as a percent)     2.00%              
Secured debt | Loan agreement | After December 22, 2023 and prior to December 22, 2025                    
Debt Instrument [Line Items]                    
Prepayment premium (as a percent)     1.00%              
Secured debt | Loan agreement | Minimum                    
Debt Instrument [Line Items]                    
Periodic principal payment     $ 25,000              
Secured debt | Loan agreement | Tranche A term loan                    
Debt Instrument [Line Items]                    
Maximum borrowing capacity       $ 75,000            
Secured debt | Loan agreement | Tranche B-1 term loan                    
Debt Instrument [Line Items]                    
Maximum borrowing capacity       50,000            
Secured debt | Loan agreement | Tranche B-2 term loan                    
Debt Instrument [Line Items]                    
Maximum borrowing capacity       75,000            
Secured debt | Loan agreement | Loan Agreement, Tranche One, Expiring March 31, 2026                    
Debt Instrument [Line Items]                    
Maximum borrowing capacity       50,000            
Secured debt | Loan agreement | Loan Agreement, Tranche One, Expiring June 30, 2026                    
Debt Instrument [Line Items]                    
Maximum borrowing capacity       $ 50,000            
Secured debt | Loan agreement | Tranche C term loan                    
Debt Instrument [Line Items]                    
Final fee (as percent)         2.00%          
Extension fee         2.00%