Summary of Significant Accounting Policies - Recently Adopted Accounting Pronouncements (Details) - USD ($)
12 Months Ended
Jan. 01, 2018
Dec. 31, 2020
Dec. 31, 2019
Dec. 31, 2018
Jan. 01, 2019
Dec. 31, 2017
Recently Adopted Accounting Pronouncements            
Additional paid-in capital   $ 621,946,000 $ 586,798,000     $ 17,277,000
Accumulated deficit   (480,471,000) (312,740,000) $ (150,082,000)   (60,979,000)
Change in fair value of the unvested awards   $ 141,560,000 274,213,000 393,008,000   (43,687,000)
Lease, Practical Expedients, Package [true false]   true        
Financial impact on the Company's condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment            
Operating lease, right-of-use-asset   $ 40,447,000 46,559,000      
Property, plant and equipment, net   53,952,000 56,924,000 62,796,000    
Deferred rent       143,000    
Accrued expenses and other current liabilities       12,118,000    
Accrued expenses and other current liabilities   13,417,000 16,042,000      
Lease financing obligation       41,441,000    
Operating lease liabilities, current portion   8,945,000 10,540,000      
Operating lease liabilities, net of current portion   32,762,000 36,867,000      
Accumulated deficit   (480,471,000) (312,740,000) (150,082,000)   (60,979,000)
Accumulated deficit            
Recently Adopted Accounting Pronouncements            
Change in fair value of the unvested awards   $ (480,471,000) (312,740,000) (150,082,000)   $ (60,979,000)
Adjustments            
Recently Adopted Accounting Pronouncements            
Change in fair value of the unvested awards     800,000      
Adjustments | Accumulated deficit            
Recently Adopted Accounting Pronouncements            
Change in fair value of the unvested awards     $ 800,000 $ 92,000    
Adjustments | ASU 2016-02            
Recently Adopted Accounting Pronouncements            
Accumulated deficit         $ 800,000  
Financial impact on the Company's condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment            
Operating lease, right-of-use-asset         1,751,000  
Property, plant and equipment, net         (45,142,000)  
Deferred rent         (143,000)  
Accrued expenses and other current liabilities         (4,451,000)  
Lease financing obligation         (41,441,000)  
Operating lease liabilities, current portion         616,000  
Operating lease liabilities, net of current portion         1,226,000  
Accumulated deficit         800,000  
Adjustments | ASU 2018-07            
Recently Adopted Accounting Pronouncements            
Additional paid-in capital $ (92,000)          
Accumulated deficit 92,000          
Change in fair value of the unvested awards 100,000          
Financial impact on the Company's condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment            
Accumulated deficit 92,000          
Balance as adjusted | ASU 2016-02            
Recently Adopted Accounting Pronouncements            
Accumulated deficit         (149,282,000)  
Financial impact on the Company's condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment            
Operating lease, right-of-use-asset         1,751,000  
Property, plant and equipment, net         17,654,000  
Accrued expenses and other current liabilities         7,667,000  
Operating lease liabilities, current portion         616,000  
Operating lease liabilities, net of current portion         1,226,000  
Accumulated deficit         $ (149,282,000)  
Balance as adjusted | ASU 2018-07            
Recently Adopted Accounting Pronouncements            
Additional paid-in capital 17,185,000          
Accumulated deficit (60,887,000)          
Financial impact on the Company's condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment            
Accumulated deficit $ (60,887,000)          
Non-employees            
Assumptions used to determine the fair value of outstanding awards granted            
Risk-free interest rate 2.30% 1.10% 2.07% 2.71%    
Expected volatility 74.00% 69.40% 76.90% 74.00%    
Expected term (in years) 6 years 1 month 6 days 6 years 18 days 6 years 21 days 6 years 2 months 15 days    
Common stock value $ 6.28          
Non-employees | Unvested restricted common stock            
Assumptions used to determine the fair value of outstanding awards granted            
Number of outstanding options 4,767,014          
Weighted average grant-date fair value (per share) $ 5.88          
Non-employees | Stock options to purchase common stock            
Assumptions used to determine the fair value of outstanding awards granted            
Number of outstanding options 330,917