| Stock Plans - Stock-based compensation expense (Details) - USD ($) $ in Thousands | 3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
| Jun. 30, 2020 | Jun. 30, 2019 | Jun. 30, 2020 | Jun. 30, 2019 | |
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost | ||||
| Total stock-based compensation expense | $ 79 | $ 350 | $ (5) | $ 486 | 
| Research and development | ||||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost | ||||
| Total stock-based compensation expense | 0 | 14 | 0 | 91 | 
| Selling, general and administrative | ||||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost | ||||
| Total stock-based compensation expense | $ 79 | $ 336 | $ (5) | $ 395 |