Consolidated Statements of Convertible Preferred Stock and Stockholders' Equity 2 (Deficit) - USD ($)
$ in Thousands
Convertible preferred stock
Series D convertible preferred stock
Series E convertible preferred stock
Series F convertible preferred stock
Total
Balance at the beginning of the period at Dec. 31, 2012 $ 36,755        
Balance at the beginning of the period (in shares) at Dec. 31, 2012 46,987,747        
Increase (Decrease) in Convertible Preferred Stock          
Issuance of convertible preferred stock, net of issuance costs   $ 9,933 $ 39,886    
Balance at the end of the period at Dec. 31, 2013 $ 86,574        
Balance at the end of the period (in shares) at Dec. 31, 2013 81,131,524        
Increase (Decrease) in Convertible Preferred Stock          
Issuance of convertible preferred stock, net of issuance costs (in shares)   8,000,000 26,143,777    
Issuance of convertible preferred stock, net of issuance costs       $ 115,731  
Balance at the end of the period at Dec. 31, 2014 $ 202,305       $ 202,305
Balance at the end of the period (in shares) at Dec. 31, 2014 141,131,524 8,000,000 26,143,777 60,000,000 141,131,524
Increase (Decrease) in Convertible Preferred Stock          
Issuance of convertible preferred stock, net of issuance costs (in shares)   8,000,000 26,143,777 60,000,000 141,131,524
Conversion of preferred stock into common stock upon initial public offering costs (in shares) (141,131,524)        
Conversion of preferred stock into common stock upon initial public offering costs $ (202,305)       $ 202,305
Balance at the end of the period (in shares) at Dec. 31, 2015         0
Increase (Decrease) in Convertible Preferred Stock          
Issuance of convertible preferred stock, net of issuance costs (in shares)         0