Summary of Financial Assets Measured at Fair Value on Recurring Basis (Details) - USD ($) $ in Thousands | Mar. 31, 2018 | Dec. 31, 2017 |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | $ 174,952 | $ 311,979 |
Fair Value, Measurements, Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Assets, Fair Value Disclosure | 438,298 | 581,947 |
Fair Value, Measurements, Recurring | Prepaid expenses and other current assets | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Other assets | 3,114 | 3,075 |
Fair Value, Measurements, Recurring | Short-term notes receivable | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Short-term notes receivable | 4,859 | 4,476 |
Fair Value, Measurements, Recurring | Cash Equivalents | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | 255,373 | 253,155 |
Fair Value, Measurements, Recurring | Cash Equivalents | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | | 7,246 |
Fair Value, Measurements, Recurring | Cash Equivalents | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | | 2,016 |
Fair Value, Measurements, Recurring | Short-term Investments | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 164,740 | 272,031 |
Fair Value, Measurements, Recurring | Short-term Investments | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 20,446 | 58,502 |
Fair Value, Measurements, Recurring | Short-term Investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 106,251 | 145,557 |
Fair Value, Measurements, Recurring | Short-term Investments | U.S. government agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 8,947 | 3,006 |
Fair Value, Measurements, Recurring | Short-term Investments | U.S. government treasury bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 28,095 | 60,580 |
Fair Value, Measurements, Recurring | Short-term Investments | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 1,001 | 4,386 |
Fair Value, Measurements, Recurring | Long-term Investments | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 10,212 | 39,948 |
Fair Value, Measurements, Recurring | Long-term Investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 3,246 | 24,993 |
Fair Value, Measurements, Recurring | Long-term Investments | U.S. government agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 6,966 | 14,955 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Assets, Fair Value Disclosure | 283,468 | 313,735 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Prepaid expenses and other current assets | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Other assets | 0 | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Short-term notes receivable | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Short-term notes receivable | 0 | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Cash Equivalents | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | 255,373 | 253,155 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Cash Equivalents | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Cash Equivalents | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Short-term Investments | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Short-term Investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Short-term Investments | U.S. government agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Short-term Investments | U.S. government treasury bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 28,095 | 60,580 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Short-term Investments | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Long-term Investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | Long-term Investments | U.S. government agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Assets, Fair Value Disclosure | 149,971 | 263,736 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Prepaid expenses and other current assets | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Other assets | 3,114 | 3,075 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Short-term notes receivable | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Short-term notes receivable | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Cash Equivalents | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Cash Equivalents | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | | 7,246 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Cash Equivalents | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | | 2,016 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Short-term Investments | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 20,446 | 58,502 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Short-term Investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 106,251 | 145,557 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Short-term Investments | U.S. government agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 8,947 | 3,006 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Short-term Investments | U.S. government treasury bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Short-term Investments | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 1,001 | 4,386 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Long-term Investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 3,246 | 24,993 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | Long-term Investments | U.S. government agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 6,966 | 14,955 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Assets, Fair Value Disclosure | 4,859 | 4,476 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Prepaid expenses and other current assets | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Other assets | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Short-term notes receivable | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Short-term notes receivable | 4,859 | 4,476 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Cash Equivalents | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Cash Equivalents | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Cash Equivalents | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Cash equivalents | | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Short-term Investments | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Short-term Investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Short-term Investments | U.S. government agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Short-term Investments | U.S. government treasury bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Short-term Investments | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Long-term Investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | 0 | 0 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 3) | Long-term Investments | U.S. government agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Investments | $ 0 | $ 0 |