Annual report pursuant to Section 13 and 15(d)

Subsequent events (Details)

v3.22.0.1
Subsequent events (Details)
$ in Thousands
12 Months Ended
Feb. 22, 2022
USD ($)
Feb. 16, 2022
USD ($)
Jan. 03, 2022
shares
Jul. 01, 2021
USD ($)
Dec. 31, 2021
USD ($)
Dec. 31, 2020
USD ($)
Jan. 21, 2022
USD ($)
Subsequent Event [Line Items]              
Operating lease liabilities         $ 14,614 $ 13,700  
Prepayment to VDL Nedcar         $ 26,134 $ 0  
Manufacturing Services Agreement With Vdl Nedcar              
Subsequent Event [Line Items]              
Prepayment to VDL Nedcar       $ 30,400      
Subsequent Event | Manufacturing Services Agreement With Vdl Nedcar              
Subsequent Event [Line Items]              
Prepayment to VDL Nedcar $ 8,400            
Proceeds from Legal Settlements   $ 30,400          
Subsequent Event | Employee Stock              
Subsequent Event [Line Items]              
Shares available in ESPP (in shares) | shares     4,034,783        
Term of share increase to ESPP     10 years        
Percent increase in shares     0.01        
Shares contributed to ESPP (in shares) | shares     8,069,566        
Share-Based Compensation Arrangement By Share-based Payment Award, Purchase Period     3 months        
Industrialization Facility in Bentonville, AR | Subsequent Event              
Subsequent Event [Line Items]              
Term of lease             10 years
Operating lease liabilities             $ 17,700