Income Taxes - Valuation allowance for deferred tax assets (Details) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Income Taxes      
Valuation allowance as of beginning of year $ 139,877 $ 85,884 $ 33,666
Increases recorded to income tax provision 66,830 53,993 52,218
Valuation allowance as of end of year $ 206,707 $ 139,877 $ 85,884