Consolidated Statements of Convertible Preferred Stock and Stockholders' (Deficit)/Equity - USD ($)
$ in Thousands
Total
Common Stock [Member]
Additional Paid-in Capital [Member]
Accumulated Deficit [Member]
Accumulated Other Comprehensive Income (Loss) [Member]
Convertible Preferred Stock [Member]
Beginning balance (in shares) at Dec. 31, 2012           64,475,633
Beginning balance at Dec. 31, 2012           $ 180,423
Ending balance (in shares) at Dec. 31, 2013           64,475,633
Ending balance at Dec. 31, 2013           $ 180,423
Beginning balance (in shares) at Dec. 31, 2012   9,897,997,000        
Beginning balance at Dec. 31, 2012 $ (65,388) $ 1 $ 3,631 $ (69,054) $ 34  
Increase (Decrease) in Stockholders' Equity [Roll Forward]            
Exercise of stock options (in shares)   1,036,077,000        
Exercise of stock options, net 564   564      
Vesting of early exercised stock options, restricted common stock, and warrants 128   128      
Early exercise of warrant issued (in shares)   60,000,000        
Stock-based compensation 2,427   2,427      
Expense related to warrant 135   135      
Comprehensive loss (62,216)     (62,182) (34)  
Ending balance (in shares) at Dec. 31, 2013   10,994,074,000        
Ending balance at Dec. 31, 2013 (124,350) $ 1 6,885 (131,236) 0  
Increase (Decrease) in Temporary Equity [Roll Forward]            
Conversion of preferred stock to common stock (in shares)   64,475,633,000       64,475,633
Conversion of preferred stock to common stock 180,423 $ 7 180,416     $ (180,423)
Ending balance (in shares) at Dec. 31, 2014           0
Ending balance at Dec. 31, 2014           $ 0
Increase (Decrease) in Stockholders' Equity [Roll Forward]            
Vesting of restricted common stock 21   21      
Exercise of stock options (in shares)   2,956,676,000        
Exercise of stock options, net 3,294   3,294      
Vesting of early exercised stock options, restricted common stock, and warrants 321          
Vesting of early exercised warrant issued 300   300      
Stock-based compensation 14,215   14,215      
Expense related to warrant 2,639   2,639      
Issuance of common stock upon initial public offering, net of issuance costs (in shares)   12,765,000,000        
Issuance of common stock upon initial public offering, net of issuance costs 185,628 $ 1 185,627      
Comprehensive loss (85,980)     (85,940) (40)  
Ending balance (in shares) at Dec. 31, 2014   91,191,383,000        
Ending balance at Dec. 31, 2014 176,190 $ 9 393,397 (217,176) (40)  
Ending balance (in shares) at Dec. 31, 2015           0
Ending balance at Dec. 31, 2015           $ 0
Increase (Decrease) in Stockholders' Equity [Roll Forward]            
Vesting of restricted stock units (in shares)   295,468,000        
Exercise of stock options (in shares)   4,131,241,000        
Exercise of stock options, net 3,944 $ 1 3,943      
Vesting of early exercised stock options, restricted common stock, and warrants 0          
Stock-based compensation 18,179   18,179      
Comprehensive loss (79,959)     (79,920) (39)  
Ending balance (in shares) at Dec. 31, 2015   95,618,092,000        
Ending balance at Dec. 31, 2015 $ 118,354 $ 10 $ 415,519 $ (297,096) $ (79)