Condensed Consolidated Statements of Redeemable Convertible Preferred Stock and Stockholders' Equity (Deficit) - USD ($) $ in Thousands | Total | Cumulative Effect, Period of Adoption, Adjustment | Initial Public Offering | Private Placement | Series E Redeemable Convertible Preferred Stock | Series E-2 Redeemable Convertible Preferred Stock | Common Stock | Common Stock Initial Public Offering | Common Stock Private Placement | Additional Paid-in Capital | Additional Paid-in Capital Initial Public Offering | Additional Paid-in Capital Private Placement | Accumulated Other Comprehensive Income (Loss) | Accumulated Deficit | Accumulated Deficit Cumulative Effect, Period of Adoption, Adjustment |
Beginning Balance (in shares) at Dec. 31, 2020 | 102,074,703 | | | | | | | | | | | | | | |
Beginning Balance at Dec. 31, 2020 | $ 664,791 | | | | | | | | | | | | | | |
Increase (Decrease) in Temporary Equity [Roll Forward] | | | | | | | | | | | | | | | |
Issuance of redeemable convertible preferred stock, net of issuance costs (in shares) | | | | | 4,650,999 | | | | | | | | | | |
Issuance of redeemable convertible preferred stock, net of issuance costs | | | | | $ 61,631 | | | | | | | | | | |
Issuance of redeemable convertible preferred stock from the exercise of warrants (in shares) | | | | | 9,477,073 | 4,331,644 | | | | | | | | | |
Issuance of redeemable convertible preferred stock from the exercise of warrants | | | | | $ 379,084 | $ 173,275 | | | | | | | | | |
Accretion of redeemable convertible preferred stock to redemption value | $ 4,135 | | | | | | | | | | | | | | |
Ending Balance (in shares) at Mar. 31, 2021 | 120,534,419 | | | | | | | | | | | | | | |
Ending Balance at Mar. 31, 2021 | $ 1,282,916 | | | | | | | | | | | | | | |
Beginning Balance (in shares) at Dec. 31, 2020 | | | | | | | 60,543,337 | | | | | | | | |
Beginning Balance at Dec. 31, 2020 | (405,473) | | | | | | $ 6 | | | $ 0 | | | $ (301) | $ (405,178) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | | | | | | | | |
Issuance of common stock from exercise of options (in shares) | | | | | | | 60,616 | | | | | | | | |
Issuance of common stock from exercise of options | 1 | | | | | | | | | 1 | | | | | |
Vesting of early exercised stock options | 21 | | | | | | | | | 21 | | | | | |
Accretion of redeemable convertible preferred stock to redemption value | (4,135) | | | | | | | | | (4,135) | | | | | |
Stock-based compensation | 6,289 | | | | | | | | | 6,289 | | | | | |
Foreign currency translation adjustment | 911 | | | | | | | | | | | | 911 | | |
Net loss | (385,160) | | | | | | | | | | | | | (385,160) | |
Ending Balance (in shares) at Mar. 31, 2021 | | | | | | | 60,603,953 | | | | | | | | |
Ending Balance at Mar. 31, 2021 | $ (787,546) | | | | | | $ 6 | | | 2,176 | | | 610 | (790,338) | |
Beginning Balance (in shares) at Dec. 31, 2020 | 102,074,703 | | | | | | | | | | | | | | |
Beginning Balance at Dec. 31, 2020 | $ 664,791 | | | | | | | | | | | | | | |
Ending Balance (in shares) at Jun. 30, 2021 | 0 | | | | | | | | | | | | | | |
Ending Balance at Jun. 30, 2021 | $ 0 | | | | | | | | | | | | | | |
Beginning Balance (in shares) at Dec. 31, 2020 | | | | | | | 60,543,337 | | | | | | | | |
Beginning Balance at Dec. 31, 2020 | (405,473) | | | | | | $ 6 | | | 0 | | | (301) | (405,178) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | | | | | | | | |
Foreign currency translation adjustment | 136 | | | | | | | | | | | | | | |
Net loss | (501,689) | | | | | | | | | | | | | | |
Ending Balance (in shares) at Jun. 30, 2021 | | | | | | | 209,040,398 | | | | | | | | |
Ending Balance at Jun. 30, 2021 | $ 1,492,970 | | | | | | $ 21 | | | 2,399,981 | | | (165) | (906,867) | |
Beginning Balance (in shares) at Dec. 31, 2020 | 102,074,703 | | | | | | | | | | | | | | |
Beginning Balance at Dec. 31, 2020 | $ 664,791 | | | | | | | | | | | | | | |
Beginning Balance (in shares) at Dec. 31, 2020 | | | | | | | 60,543,337 | | | | | | | | |
Beginning Balance at Dec. 31, 2020 | (405,473) | | | | | | $ 6 | | | 0 | | | (301) | (405,178) | |
Ending Balance (in shares) at Dec. 31, 2021 | | | | | | | 221,833,195 | | | | | | | | |
Ending Balance at Dec. 31, 2021 | $ 1,326,978 | $ 191 | | | | | $ 22 | | | 2,464,730 | | | 77 | (1,137,851) | $ 191 |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | | | | | | | | |
Accounting Standards Update [Extensible Enumeration] | Accounting Standards Update 2016-02 [Member] | | | | | | | | | | | | | | |
Beginning Balance (in shares) at Mar. 31, 2021 | 120,534,419 | | | | | | | | | | | | | | |
Beginning Balance at Mar. 31, 2021 | $ 1,282,916 | | | | | | | | | | | | | | |
Increase (Decrease) in Temporary Equity [Roll Forward] | | | | | | | | | | | | | | | |
Conversion of redeemable convertible preferred stock in connection with initial public offering (in shares) | | | (120,534,419) | | | | | | | | | | | | |
Conversion of redeemable convertible preferred stock in connection with initial public offering | | | $ (1,282,916) | | | | | | | | | | | | |
Ending Balance (in shares) at Jun. 30, 2021 | 0 | | | | | | | | | | | | | | |
Ending Balance at Jun. 30, 2021 | $ 0 | | | | | | | | | | | | | | |
Beginning Balance (in shares) at Mar. 31, 2021 | | | | | | | 60,603,953 | | | | | | | | |
Beginning Balance at Mar. 31, 2021 | (787,546) | | | | | | $ 6 | | | 2,176 | | | 610 | (790,338) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | | | | | | | | |
Vesting of early exercised stock options | 21 | | | | | | | | | 21 | | | | | |
Conversion of redeemable convertible preferred stock to common stock in connection with initial public offering (in shares) | | | | | | | | 120,534,419 | | | | | | | |
Conversion of redeemable convertible preferred stock to common stock in connection with initial public offering | | | 1,282,916 | | | | | $ 12 | | | $ 1,282,904 | | | | |
Issuance of common stock (in shares) | | | | | | | | 27,027,027 | 874,999 | | | | | | |
Issuance of common stock | | | $ 1,027,374 | $ 35,000 | | | | $ 3 | | | $ 1,027,371 | $ 35,000 | | | |
Stock-based compensation | 52,509 | | | | | | | | | 52,509 | | | | | |
Foreign currency translation adjustment | (775) | | | | | | | | | | | | (775) | | |
Net loss | (116,529) | | | | | | | | | | | | | (116,529) | |
Ending Balance (in shares) at Jun. 30, 2021 | | | | | | | 209,040,398 | | | | | | | | |
Ending Balance at Jun. 30, 2021 | 1,492,970 | | | | | | $ 21 | | | 2,399,981 | | | (165) | (906,867) | |
Beginning Balance (in shares) at Dec. 31, 2021 | | | | | | | 221,833,195 | | | | | | | | |
Beginning Balance at Dec. 31, 2021 | 1,326,978 | 191 | | | | | $ 22 | | | 2,464,730 | | | 77 | (1,137,851) | 191 |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | | | | | | | | |
Issuance of common stock from exercise of options (in shares) | | | | | | | 534,019 | | | | | | | | |
Issuance of common stock from exercise of options | 871 | | | | | | | | | 871 | | | | | |
Issuance of common stock related to release of RSU and SVAs (in shares) | | | | | | | 537,980 | | | | | | | | |
Issuance of common stock under the Employee Stock Purchase Plan (in shares) | | | | | | | 87,215 | | | | | | | | |
Issuance of common stock under the Employee Stock Purchase Plan | 1,292 | | | | | | | | | 1,292 | | | | | |
Vesting of early exercised stock options | 21 | | | | | | | | | 21 | | | | | |
Stock-based compensation | 27,527 | | | | | | | | | 27,527 | | | | | |
Foreign currency translation adjustment | 199 | | | | | | | | | | | | 199 | | |
Net loss | (111,903) | | | | | | | | | | | | | (111,903) | |
Ending Balance (in shares) at Mar. 31, 2022 | | | | | | | 222,992,409 | | | | | | | | |
Ending Balance at Mar. 31, 2022 | 1,245,176 | | | | | | $ 22 | | | 2,494,441 | | | 276 | (1,249,563) | |
Beginning Balance (in shares) at Dec. 31, 2021 | | | | | | | 221,833,195 | | | | | | | | |
Beginning Balance at Dec. 31, 2021 | $ 1,326,978 | $ 191 | | | | | $ 22 | | | 2,464,730 | | | 77 | (1,137,851) | $ 191 |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | | | | | | | | |
Issuance of common stock under the Employee Stock Purchase Plan (in shares) | 87,215 | | | | | | | | | | | | | | |
Foreign currency translation adjustment | $ (1,146) | | | | | | | | | | | | | | |
Net loss | (220,498) | | | | | | | | | | | | | | |
Ending Balance (in shares) at Jun. 30, 2022 | | | | | | | 224,192,530 | | | | | | | | |
Ending Balance at Jun. 30, 2022 | 1,161,095 | | | | | | $ 22 | | | 2,520,300 | | | (1,069) | (1,358,158) | |
Beginning Balance (in shares) at Mar. 31, 2022 | | | | | | | 222,992,409 | | | | | | | | |
Beginning Balance at Mar. 31, 2022 | 1,245,176 | | | | | | $ 22 | | | 2,494,441 | | | 276 | (1,249,563) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | | | | | | | | |
Issuance of common stock from exercise of options (in shares) | | | | | | | 262,548 | | | | | | | | |
Issuance of common stock from exercise of options | 687 | | | | | | | | | 687 | | | | | |
Issuance of common stock related to release of RSU and SVAs (in shares) | | | | | | | 937,573 | | | | | | | | |
Vesting of early exercised stock options | 21 | | | | | | | | | 21 | | | | | |
Stock-based compensation | 25,151 | | | | | | | | | 25,151 | | | | | |
Foreign currency translation adjustment | (1,345) | | | | | | | | | | | | (1,345) | | |
Net loss | (108,595) | | | | | | | | | | | | | (108,595) | |
Ending Balance (in shares) at Jun. 30, 2022 | | | | | | | 224,192,530 | | | | | | | | |
Ending Balance at Jun. 30, 2022 | $ 1,161,095 | | | | | | $ 22 | | | $ 2,520,300 | | | $ (1,069) | $ (1,358,158) | |