Common stock (Details)
$ / shares in Units, $ in Thousands
1 Months Ended 3 Months Ended
Jul. 31, 2017
$ / shares
shares
Jun. 30, 2018
USD ($)
director
Vote
$ / shares
shares
Mar. 31, 2018
$ / shares
shares
Common stock      
Shares authorized (in shares)   27,314,288 27,314,288
Par value (in dollars per share) | $ / shares   $ 0.001 $ 0.001
Common stock      
Common stock      
Shares authorized (in shares)   27,314,288 27,314,288
Par value (in dollars per share) | $ / shares   $ 0.001 $ 0.001
Common stock reserved for the conversion of outstanding shares of preferred stock   22,306,801 22,306,801
Number of vote per share | Vote   1  
Number of directors to be elected | director   2  
Cash dividends declared (in dollars per share) | $ / shares   $ 0  
Cash dividends paid | $   $ 0  
Common A stock      
Common stock      
Shares authorized (in shares)   26,258 26,258
Par value (in dollars per share) | $ / shares $ 0.001    
Shares issued and sold (in shares) 26,258    
Maximum | Common A stock      
Common stock      
Dividends to be received upon declaration (as a percent)   100.00%  
Dividends to be received upon deemed liquidation (as a percent)   300.00%