Cash, Cash Equivalents, Marketable Securities, and Restricted Cash - Components (Details) - USD ($) $ in Thousands | Sep. 30, 2022 | Dec. 31, 2021 | Sep. 30, 2021 |
Cash, Money Market Funds, and Marketable Securities | | | |
Cash and cash equivalents | $ 277,592 | $ 245,197 | $ 385,903 |
Fair value, cash balances | 277,592 | 245,197 | |
Cost, available-for-sale securities | 77,264 | 237,371 | |
Gross unrealized gain, available-for-sale securities | 0 | 7 | |
Gross unrealized loss, available-for-sale securities | (156) | (79) | |
Fair value, available-for-sale debt securities | 77,108 | 237,299 | |
Cost, cash balances and available-for-sale securities | 354,856 | 482,568 | |
Gross unrealized gain, cash balances and available-for-sale securities | 0 | 7 | |
Gross unrealized loss, cash balances and available-for-sale securities | (156) | (79) | |
Fair value, cash balances and available-for-sale securities | 354,700 | 482,496 | |
U.S. government agency bonds | | | |
Cash, Money Market Funds, and Marketable Securities | | | |
Corporate debt securities, cost | 40,042 | | |
Corporate debt securities, gross unrealized gain | 0 | | |
Corporate debt securities, gross unrealized loss | (87) | | |
Corporate debt securities, fair value | 39,955 | | |
Commercial paper | | | |
Cash, Money Market Funds, and Marketable Securities | | | |
Cost, available-for-sale securities | 36,821 | 174,578 | |
Gross unrealized gain, available-for-sale securities | 0 | 7 | |
Gross unrealized loss, available-for-sale securities | (69) | (54) | |
Fair value, available-for-sale debt securities | 36,752 | 174,531 | |
Corporate debt securities | | | |
Cash, Money Market Funds, and Marketable Securities | | | |
Corporate debt securities, cost | | 32,322 | |
Corporate debt securities, gross unrealized gain | | 0 | |
Corporate debt securities, gross unrealized loss | | (11) | |
Corporate debt securities, fair value | | 32,311 | |
Asset-backed securities | | | |
Cash, Money Market Funds, and Marketable Securities | | | |
Corporate debt securities, cost | | 30,070 | |
Corporate debt securities, gross unrealized gain | | 0 | |
Corporate debt securities, gross unrealized loss | | (14) | |
Corporate debt securities, fair value | | 30,056 | |
Money market | | | |
Cash, Money Market Funds, and Marketable Securities | | | |
Corporate debt securities, cost | 350 | | |
Corporate debt securities, gross unrealized gain | 0 | | |
Corporate debt securities, gross unrealized loss | 0 | | |
Corporate debt securities, fair value | 350 | | |
Cost, available-for-sale securities | | 350 | |
Gross unrealized gain, available-for-sale securities | | 0 | |
Gross unrealized loss, available-for-sale securities | | 0 | |
Fair value, available-for-sale debt securities | | 350 | |
Certificate of deposit | | | |
Cash, Money Market Funds, and Marketable Securities | | | |
Cost, available-for-sale securities | 51 | 51 | |
Gross unrealized gain, available-for-sale securities | 0 | 0 | |
Gross unrealized loss, available-for-sale securities | 0 | 0 | |
Fair value, available-for-sale debt securities | $ 51 | $ 51 | |