Fair Value Measurements (Details) - USD ($) $ in Thousands |
Mar. 31, 2018 |
Dec. 31, 2017 |
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
$ 952,816
|
$ 966,970
|
| Level 1 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
553,667
|
582,835
|
| Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
399,149
|
384,135
|
| Level 3 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
0
|
0
|
| Cash and cash equivalents |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
553,667
|
582,835
|
| Cash and cash equivalents | Level 1 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
553,667
|
582,835
|
| Commercial Paper [Member] |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
|
8,984
|
| Commercial Paper [Member] | Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
|
8,984
|
| Commercial Paper, Not Included with Cash and Cash Equivalents [Member] | Short-term investments |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
|
9,970
|
| Commercial Paper, Not Included with Cash and Cash Equivalents [Member] | Short-term investments | Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
|
9,970
|
| U.S. treasury securities | Short-term investments |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
158,472
|
160,085
|
| U.S. treasury securities | Short-term investments | Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
158,472
|
160,085
|
| U.S. treasury securities | Long-term investments |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
99,060
|
79,169
|
| U.S. treasury securities | Long-term investments | Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
99,060
|
79,169
|
| U.S. agency securities | Short-term investments |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
21,313
|
9,893
|
| U.S. agency securities | Short-term investments | Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
21,313
|
9,893
|
| U.S. agency securities | Long-term investments |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
8,505
|
18,468
|
| U.S. agency securities | Long-term investments | Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
8,505
|
18,468
|
| Corporate bonds | Short-term investments |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
61,867
|
46,839
|
| Corporate bonds | Short-term investments | Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
61,867
|
46,839
|
| Corporate bonds | Long-term investments |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
49,932
|
50,727
|
| Corporate bonds | Long-term investments | Level 2 |
|
|
| Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] |
|
|
| Investments Fair Value |
$ 49,932
|
$ 50,727
|