v3.22.2.2
Summary of significant accounting policies - Collaboration and Royalty Revenue (Details) - USD ($)
$ in Thousands
1 Months Ended 3 Months Ended 9 Months Ended
Sep. 30, 2022
Sep. 30, 2022
Sep. 30, 2021
Sep. 30, 2022
Sep. 30, 2021
Aug. 31, 2021
Mar. 31, 2021
Collaboration and royalty revenue              
Revenue   $ 217,127 $ 138,743 $ 531,389 $ 373,364    
Collaboration and grant revenue              
Collaboration and royalty revenue              
Revenue   50,017 10,011 50,024 30,018    
Royalty revenue              
Collaboration and royalty revenue              
Revenue   32,924 13,127 73,645 33,348    
SMA License Agreement | Collaboration and grant revenue              
Collaboration and royalty revenue              
Revenue   50,000 10,000 50,000 30,000    
SMA License Agreement | Royalty revenue              
Collaboration and royalty revenue              
Revenue   $ 32,900 13,100 $ 73,600 33,300    
SMA License Agreement | Sales Milestones              
Collaboration and royalty revenue              
Milestone payments received     $ 20,000   $ 20,000 $ 10,000 $ 20,000
Net sales milestone threshold achieved $ 750,000            
SMA License Agreement | Sales Milestones | Prepaids and other current assets              
Collaboration and royalty revenue              
Milestone payments due $ 50,000