| Stock-Based Compensation - Summary of Stock-Based Compensation Expense (Details) - USD ($) $ in Thousands | 3 Months Ended | 9 Months Ended | ||
|---|---|---|---|---|
| Sep. 30, 2023 | Sep. 30, 2022 | Sep. 30, 2023 | Sep. 30, 2022 | |
| Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] | ||||
| Share-based payment arrangement, expense | $ 27,267 | $ 13,043 | $ 69,747 | $ 51,905 | 
| Research and development expenses | ||||
| Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] | ||||
| Share-based payment arrangement, expense | 21,455 | 9,409 | 54,657 | 37,519 | 
| Selling, general and administrative expenses | ||||
| Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] | ||||
| Share-based payment arrangement, expense | $ 5,812 | $ 3,634 | $ 15,090 | $ 14,386 | 
| X | ||||||||||
| 
- Definition Amount of expense for award under share-based payment arrangement. Excludes amount capitalized. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. No definition available. 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |