Fair Value of Financial Instruments - Fair Values of Financial Instruments Measured on a Recurring Basis (Details) - USD ($) $ in Thousands | Jun. 30, 2022 | Dec. 31, 2021 |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | $ 1,017,510 | |
Recurring | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 424,541 | $ 449,417 |
Recurring | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 191,147 | 247,560 |
Recurring | U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 246,357 | 189,010 |
Recurring | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 91,645 | 82,486 |
Prepaid expenses and other current assets | 1,834 | 1,137 |
Other assets | 5,529 | 6,297 |
Recurring | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 30,020 | 49,331 |
Recurring | Non-U.S. government and supranational bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 33,800 | 41,684 |
Recurring | U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | | 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 | 246,357 | 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 | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 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 | U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | | 0 |
Level 2 | Recurring | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 424,541 | 449,417 |
Level 2 | Recurring | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 191,147 | 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 | 91,645 | 82,486 |
Prepaid expenses and other current assets | 1,834 | 1,137 |
Other assets | 5,529 | 6,297 |
Level 2 | Recurring | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 30,020 | 49,331 |
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 | 33,800 | 41,684 |
Level 2 | Recurring | U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | | 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 | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | 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 | U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable securities | | 0 |
Money market funds | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 1,014,280 | 711,188 |
Money market funds | Level 1 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 1,014,280 | 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 | 149,891 | 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 | 149,891 | 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 | 8,987 | |
U.S. treasury securities | Level 1 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 8,987 | |
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 | 5,014 | 4,310 |
Corporate bonds | Level 1 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Corporate bonds | Level 2 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 5,014 | 4,310 |
Corporate bonds | Level 3 | Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | $ 0 | $ 0 |