Stock incentive plans - Activity related to stock options (Details) - Stock options - USD ($)
$ / shares in Units, shares in Thousands, $ in Thousands
12 Months Ended
Dec. 31, 2018
Dec. 31, 2017
Dec. 31, 2016
Shares      
Outstanding, at the beginning of the period 1,498 276  
Granted 2,515 1,226  
Exercised (40)    
Forfeited and canceled (14) (4)  
Outstanding, at the end of the period 3,959 1,498 276
Vested and expected to vest 3,959    
Exercisable 881    
Weighted-average exercise price      
Outstanding, at the beginning of the period $ 2.48 $ 1.38  
Granted 10.40 2.48  
Exercised 2.57    
Forfeited and canceled 4.79 1.93  
Outstanding, at the end of the period 7.46 $ 2.48 $ 1.38
Vested and expected to vest 7.46    
Exercisable at the end of the period $ 2.69    
Weighted-average remaining contractual term      
Weighted-average remaining contractual term 8 years 9 months 15 days 8 years 11 months 5 days 9 years 2 months 9 days
Vested and expected to vest 8 years 9 months 15 days    
Exercisable 8 years 7 days    
Aggregate intrinsic value      
Outstanding, at the beginning of the period $ 4,146 $ 89  
Outstanding, at the end of the period 35,984 $ 4,146 $ 89
Vested and expected to vest 35,984    
Exercisable $ 12,205    
Term of award 10 years    
Vesting period 4 years    
Weighted-average grant date fair value per share $ 7.03 $ 1.66  
Unrecognized stock-based compensation related to non-vested stock options $ 16,400    
Term in which unrecognized compensation expenses will be recognized   2 years 11 months 16 days