Income Taxes - Unrecognized tax benefits (Details) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Dec. 31, 2018
Summary of unrecognized tax benefits        
Unrecognized tax benefits beginning of the period $ 12,157 $ 1,885 $ 1,804  
Decrease related to the prior year     (365)  
Increased related to the current year 347 10,272 446  
Unrecognized tax benefits, end of the period $ 12,504 12,157 1,885  
Income tax - accrual for interest or penalties   0 $ 0 $ 0
Unrecognized tax benefits that would impact effective tax rate   0    
Income tax examination for federal or state   $ 0