v3.22.2.2
Revenue recognition - 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
Nov. 30, 2011
Collaboration and royalty revenue                
Remaining potential milestones that can be achieved $ 250,000 $ 250,000   $ 250,000        
Revenue   217,127 $ 138,743 531,389 $ 373,364      
Collaboration 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 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 | Roche And Sma Foundation | Collaboration revenue                
Collaboration and royalty revenue                
Revenue   50,000 10,000 50,000 30,000      
Research And Development Event Milestones | SMA License Agreement                
Collaboration and royalty revenue                
Remaining potential milestones that can be achieved 0 0   0        
Milestone payments received     10,000   10,000      
Sales Milestones | SMA License Agreement                
Collaboration and royalty revenue                
Remaining potential milestones that can be achieved 250,000 $ 250,000   $ 250,000        
Milestone payments received     $ 20,000   $ 20,000 $ 10,000 $ 20,000  
Net sales milestone threshold achieved 750,000              
Sales Milestones | SMA License Agreement | Prepaids and other current assets                
Collaboration and royalty revenue                
Milestone payments due $ 50,000              
Maximum | Research And Development Event Milestones | SMA License Agreement                
Collaboration and royalty revenue                
Remaining potential milestones that can be achieved               $ 135,000
Maximum | Sales Milestones | SMA License Agreement                
Collaboration and royalty revenue                
Remaining potential milestones that can be achieved               $ 325,000