Investments and Fair Value - Schedule of Assets Measured on a Recurring and Nonrecurring Basis (Details) - USD ($) $ in Thousands | Mar. 31, 2019 | Dec. 31, 2018 |
Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | $ 26,644 | $ 47,199 |
Recurring fair value measurements: | Money market mutual funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 26,644 | 47,199 |
Level 1 | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 26,644 | 47,199 |
Level 1 | Recurring fair value measurements: | Money market mutual funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 26,644 | 47,199 |
Level 2 | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Level 2 | Recurring fair value measurements: | Money market mutual funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Short-term investments | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Amortized cost | 187,489 | 175,736 |
Gross Unrealized Gains | 37 | 0 |
Gross Unrealized Gains (Losses) | (406) | (696) |
Short-term investments | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 187,120 | 175,040 |
Short-term investments | Level 1 | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 59,671 | 69,605 |
Short-term investments | Level 1 | Recurring fair value measurements: | U.S. government and agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 59,671 | 69,605 |
Short-term investments | Level 1 | Recurring fair value measurements: | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 0 | 0 |
Short-term investments | Level 1 | Recurring fair value measurements: | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 0 | 0 |
Short-term investments | Level 2 | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 127,449 | 105,435 |
Short-term investments | Level 2 | Recurring fair value measurements: | U.S. government and agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 44,698 | 42,904 |
Short-term investments | Level 2 | Recurring fair value measurements: | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 75,522 | 56,025 |
Short-term investments | Level 2 | Recurring fair value measurements: | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 7,229 | 6,506 |
Short-term investments | U.S. government and agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Amortized cost | 104,649 | 112,995 |
Gross Unrealized Gains | 0 | 0 |
Gross Unrealized Gains (Losses) | (280) | (486) |
Short-term investments | U.S. government and agency bonds | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 104,369 | 112,509 |
Short-term investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Amortized cost | 75,598 | 56,235 |
Gross Unrealized Gains | 37 | 0 |
Gross Unrealized Gains (Losses) | (113) | (210) |
Short-term investments | Corporate bonds | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 75,522 | 56,025 |
Short-term investments | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Amortized cost | 7,242 | 6,506 |
Gross Unrealized Gains | 0 | 0 |
Gross Unrealized Gains (Losses) | (13) | 0 |
Short-term investments | Certificates of deposit | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 7,229 | 6,506 |
Long-term investments | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Amortized cost | 76,562 | 140,865 |
Gross Unrealized Gains | 238 | 142 |
Gross Unrealized Gains (Losses) | (11) | (223) |
Long-term investments | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 76,789 | 140,784 |
Long-term investments | Level 1 | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 49,517 | 64,086 |
Long-term investments | Level 1 | Recurring fair value measurements: | U.S. government and agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 49,517 | 64,086 |
Long-term investments | Level 1 | Recurring fair value measurements: | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 0 | 0 |
Long-term investments | Level 1 | Recurring fair value measurements: | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 0 | 0 |
Long-term investments | Level 2 | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 27,272 | 76,698 |
Long-term investments | Level 2 | Recurring fair value measurements: | U.S. government and agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 10,513 | 26,316 |
Long-term investments | Level 2 | Recurring fair value measurements: | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 13,328 | 46,718 |
Long-term investments | Level 2 | Recurring fair value measurements: | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 3,431 | 3,664 |
Long-term investments | U.S. government and agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Amortized cost | 59,877 | 90,458 |
Gross Unrealized Gains | 164 | 99 |
Gross Unrealized Gains (Losses) | (11) | (155) |
Long-term investments | U.S. government and agency bonds | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 60,030 | 90,402 |
Long-term investments | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Amortized cost | 13,265 | 46,743 |
Gross Unrealized Gains | 63 | 43 |
Gross Unrealized Gains (Losses) | 0 | (68) |
Long-term investments | Corporate bonds | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | 13,328 | 46,718 |
Long-term investments | Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Amortized cost | 3,420 | 3,664 |
Gross Unrealized Gains | 11 | 0 |
Gross Unrealized Gains (Losses) | 0 | 0 |
Long-term investments | Certificates of deposit | Recurring fair value measurements: | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Fair Value | $ 3,431 | $ 3,664 |