Investments and fair value measurements - Summary of Held-to-Maturity Debt Securities Maturity (Details) - USD ($)
$ in Thousands
Mar. 31, 2022
Dec. 31, 2021
Amortized Cost    
One year or less $ 30,051  
After one year through five years 32,747  
Amortized Cost $ 62,798 $ 67,164
Amortized Cost, Percent of Total    
One year or less 48.00%  
After one year through five years 52.00%  
Total 100.00%  
Fair Value    
One year or less $ 29,973  
After one year through five years 31,863  
Fair Value $ 61,836 $ 67,400
Fair Value, Percent of Total    
One year or less 48.00%  
After one year through five years 52.00%  
Total 100.00%