Commitments and contingencies - Financial Instruments with Off-Balance Sheet Credit Risk (Details) - USD ($) $ in Thousands |
Dec. 31, 2020 |
Dec. 31, 2019 |
|---|---|---|
| Fair Value, Off-balance Sheet Risks, Disclosure Information [Line Items] | ||
| Balance at end of period | $ 2,787,594 | $ 1,105,742 |
| Commitments to extend credit, excluding interest rate lock commitments | ||
| Fair Value, Off-balance Sheet Risks, Disclosure Information [Line Items] | ||
| Balance at end of period | 2,719,996 | 1,086,173 |
| Letters of credit | ||
| Fair Value, Off-balance Sheet Risks, Disclosure Information [Line Items] | ||
| Balance at end of period | $ 67,598 | $ 19,569 |