Fair Value of Financial Instruments - Fair Values of Financial Instruments Measured on a Recurring Basis (Details) - USD ($) $ in Thousands | Sep. 30, 2022 | Dec. 31, 2021 |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | $ 994,150 | |
Recurring | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 393,892 | $ 449,417 |
Recurring | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 178,995 | 247,560 |
Recurring | U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 221,773 | 189,010 |
Recurring | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 134,308 | 82,486 |
Prepaid expenses and other current assets | 1,869 | 1,137 |
Other assets | 5,530 | 6,297 |
Recurring | Non-U.S. government and supranational bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 35,467 | 41,684 |
Recurring | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 28,050 | 49,331 |
Recurring | U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 1,665 | 1,000 |
Level 1 | Recurring | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 1 | Recurring | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 1 | Recurring | U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 221,773 | 189,010 |
Level 1 | Recurring | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Prepaid expenses and other current assets | 0 | 0 |
Other assets | 0 | 0 |
Level 1 | Recurring | Non-U.S. government and supranational bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 1 | Recurring | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 1 | Recurring | U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 2 | Recurring | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 393,892 | 449,417 |
Level 2 | Recurring | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 178,995 | 247,560 |
Level 2 | Recurring | U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 2 | Recurring | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 134,308 | 82,486 |
Prepaid expenses and other current assets | 1,869 | 1,137 |
Other assets | 5,530 | 6,297 |
Level 2 | Recurring | Non-U.S. government and supranational bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 35,467 | 41,684 |
Level 2 | Recurring | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 28,050 | 49,331 |
Level 2 | Recurring | U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 1,665 | 1,000 |
Level 3 | Recurring | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 3 | Recurring | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 3 | Recurring | U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 3 | Recurring | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Prepaid expenses and other current assets | 0 | 0 |
Other assets | 0 | 0 |
Level 3 | Recurring | Non-U.S. government and supranational bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 3 | Recurring | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Level 3 | Recurring | U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 0 | 0 |
Money market funds | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 1,122,738 | 711,188 |
Money market funds | Level 1 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 1,122,738 | 711,188 |
Money market funds | Level 2 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Money market funds | Level 3 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Commercial paper | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 80,992 | 114,976 |
Commercial paper | Level 1 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Commercial paper | Level 2 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 80,992 | 114,976 |
Commercial paper | Level 3 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
U.S. treasury securities | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 4,246 | |
U.S. treasury securities | Level 1 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 4,246 | |
U.S. treasury securities | Level 2 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | |
U.S. treasury securities | Level 3 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | $ 0 | |
Corporate bonds | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | | 4,310 |
Corporate bonds | Level 1 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | | 0 |
Corporate bonds | Level 2 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | | 4,310 |
Corporate bonds | Level 3 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | | $ 0 |