Income taxes - Assessing realizability of deferred tax assets (Details) - USD ($) $ in Thousands |
Dec. 31, 2020 |
Dec. 31, 2019 |
|---|---|---|
| Federal | ||
| Net operating loss carryforwards | ||
| The amount of gross unrealized net operating loss carryforwards | $ 170,907 | $ 164,373 |
| Operating loss carryforwards to be carried forward indefinitely | 87,162 | |
| State | ||
| Net operating loss carryforwards | ||
| The amount of gross unrealized net operating loss carryforwards | 181,488 | 170,831 |
| Foreign | ||
| Net operating loss carryforwards | ||
| The amount of gross unrealized net operating loss carryforwards | $ 11,710 | $ 11,671 |