Income tax - Schedule of Components of Distributable Earnings (Details) - USD ($) $ in Thousands  | 
Dec. 31, 2024  | 
Dec. 31, 2023  | 
Dec. 31, 2022  | 
|---|---|---|---|
| Income Tax Contingency [Line Items] | |||
| Accumulated capital gains | $ 11,137 | $ (8,190) | $ (3,102) | 
| Unrealized appreciation (depreciation) | (49,546) | 33,029 | (44,592) | 
| Total distributable earnings | 88,920 | 140,013 | 59,909 | 
| Other temporary differences | |||
| Income Tax Contingency [Line Items] | |||
| Total distributable earnings | (25,107) | (18,609) | (20,100) | 
| Undistributed ordinary income | |||
| Income Tax Contingency [Line Items] | |||
| Total distributable earnings | $ 152,436 | $ 133,783 | $ 127,703 | 
| X | ||||||||||
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. No definition available. 
  | 
| X | ||||||||||
- Definition Amount of accumulated undistributed earnings (deficit) from unrealized appreciation (depreciation) of investment company. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
  | 
| X | ||||||||||
- Definition Amount of accumulated undistributed earnings (deficit) from long-term capital gain (loss) of investment company. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
  | 
| X | ||||||||||
- Definition Amount of accumulated undistributed earnings (deficit). Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
  | 
| X | ||||||||||
- Details 
  | 
| X | ||||||||||
- Details 
  |