Loans and allowance for loan losses - Nonaccrual TDRs and the related specific valuation allowance by portfolio segment (Details)
3 Months Ended 9 Months Ended 12 Months Ended
Sep. 30, 2020
USD ($)
Sep. 30, 2019
USD ($)
Sep. 30, 2020
USD ($)
loan
Sep. 30, 2019
USD ($)
Dec. 31, 2019
USD ($)
loan
Information concerning Troubled Debt Restructurings          
Number of Loans 0 0      
Specific Valuation Allowance [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment $ 28,000   $ 28,000   $ 24,000
Number of Loans | loan     3   3
Portfolio Segment [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 7,862,000   $ 7,862,000   $ 8,410,000
Number of Loans | loan     37   38
Performing Financing Receivable [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 6,584,000   $ 6,584,000   $ 7,059,000
Number of Loans | loan     26   29
Nonperforming Financial Instruments [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 1,278,000   $ 1,278,000   $ 1,351,000
Number of Loans | loan     11   9
Commercial real estate          
Information concerning Troubled Debt Restructurings          
Number of Loans     1,000 1,000  
Commercial real estate | Specific Valuation Allowance [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 4,000   $ 4,000   $ 15,000
Commercial real estate | Portfolio Segment [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 5,422,000   5,422,000   5,806,000
Commercial real estate | Performing Financing Receivable [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 5,115,000   5,115,000   5,309,000
Commercial real estate | Nonperforming Financial Instruments [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 307,000   307,000   497,000
Consumer real estate | Specific Valuation Allowance [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 8,000   8,000   9,000
Consumer real estate | Portfolio Segment [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 2,243,000   2,243,000   2,393,000
Consumer real estate | Performing Financing Receivable [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 1,469,000   1,469,000   1,570,000
Consumer real estate | Nonperforming Financial Instruments [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 774,000   $ 774,000   823,000
Owner Occupied [Member] | Commercial real estate          
Information concerning Troubled Debt Restructurings          
Number of Loans     1,000    
Owner Occupied [Member] | Commercial real estate | Specific Valuation Allowance [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 4,000   $ 4,000   15,000
Owner Occupied [Member] | Commercial real estate | Portfolio Segment [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 3,731,000   3,731,000   3,502,000
Owner Occupied [Member] | Commercial real estate | Performing Financing Receivable [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 3,424,000   3,424,000   3,502,000
Owner Occupied [Member] | Commercial real estate | Nonperforming Financial Instruments [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 307,000   307,000    
Non-Owner Occupied [Member] | Commercial real estate          
Information concerning Troubled Debt Restructurings          
Number of Loans       1,000  
Non-Owner Occupied [Member] | Commercial real estate | Portfolio Segment [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 1,691,000   1,691,000   2,304,000
Non-Owner Occupied [Member] | Commercial real estate | Performing Financing Receivable [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 1,691,000   1,691,000   1,807,000
Non-Owner Occupied [Member] | Commercial real estate | Nonperforming Financial Instruments [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment         497,000
First Deed of Trust [Member] | Consumer real estate | Specific Valuation Allowance [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 8,000   8,000   9,000
First Deed of Trust [Member] | Consumer real estate | Portfolio Segment [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 1,613,000   1,613,000   1,641,000
First Deed of Trust [Member] | Consumer real estate | Performing Financing Receivable [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 901,000   901,000   881,000
First Deed of Trust [Member] | Consumer real estate | Nonperforming Financial Instruments [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 712,000   712,000   760,000
Second Deed of Trust [Member] | Consumer real estate | Portfolio Segment [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 630,000   630,000   752,000
Second Deed of Trust [Member] | Consumer real estate | Performing Financing Receivable [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 568,000   568,000   689,000
Second Deed of Trust [Member] | Consumer real estate | Nonperforming Financial Instruments [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 62,000   62,000   63,000
Commercial and industrial loans (except those secured by real estate) | Commercial and industrial loans | Specific Valuation Allowance [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 16,000   16,000    
Commercial and industrial loans (except those secured by real estate) | Commercial and industrial loans | Portfolio Segment [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment 197,000   197,000   211,000
Commercial and industrial loans (except those secured by real estate) | Commercial and industrial loans | Performing Financing Receivable [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment         180,000
Commercial and industrial loans (except those secured by real estate) | Commercial and industrial loans | Nonperforming Financial Instruments [Member]          
Information concerning Troubled Debt Restructurings          
Recorded Investment $ 197,000   $ 197,000   $ 31,000