| Income taxes - Income before Income Taxes (Details) - USD ($) $ in Thousands | 12 Months Ended | ||
|---|---|---|---|
| Dec. 31, 2018 | Dec. 31, 2017 | Dec. 31, 2016 | |
| Income taxes | |||
| Loss before income taxes | $ (95,017) | $ (69,687) | $ (70,687) | 
| U.S. | |||
| Income taxes | |||
| Loss before income taxes | (1,650) | (3,121) | (3,373) | 
| U.K. | |||
| Income taxes | |||
| Loss before income taxes | $ (93,367) | $ (66,566) | $ (67,314) | 
| X | ||||||||||
| 
- Definition Amount of income (loss) from continuing operations, including income (loss) from equity method investments, before deduction of income tax expense (benefit), and income (loss) attributable to noncontrolling interest. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |