Income taxes - Assessing realizability of deferred tax assets (Details) - USD ($) $ in Thousands |
Dec. 31, 2017 |
Dec. 31, 2016 |
|---|---|---|
| Federal | ||
| Net operating loss carryforwards | ||
| The amount of gross unrealized net operating loss carryforwards | $ 82,461 | $ 55,780 |
| State | ||
| Net operating loss carryforwards | ||
| The amount of gross unrealized net operating loss carryforwards | 73,934 | 56,006 |
| Foreign | ||
| Net operating loss carryforwards | ||
| The amount of gross unrealized net operating loss carryforwards | $ 10,811 | $ 9,672 |