<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>429</ContextCount>
  <ElementCount>612</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>118</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>9</UnitCount>
  <MyReports>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1001002 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1002003 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1003004 - Statement - Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ConsolidatedStatementsofOperations</Role>
      <ShortName>Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1004005 - Statement - Consolidated Statements of Operations (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ConsolidatedStatementsofOperationsParenthetical</Role>
      <ShortName>Consolidated Statements of Operations (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1005006 - Statement - Consolidated Statements of Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ConsolidatedStatementsofComprehensiveLoss</Role>
      <ShortName>Consolidated Statements of Comprehensive Loss</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1006007 - Statement - Consolidated Statements of Changes in Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ConsolidatedStatementsofChangesinStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>1007008 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>2101101 - Disclosure - Organization and business operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Organizationandbusinessoperations</Role>
      <ShortName>Organization and business operations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2103102 - Disclosure - Summary of significant accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Summaryofsignificantaccountingpolicies</Role>
      <ShortName>Summary of significant accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2110103 - Disclosure - Business combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Businesscombinations</Role>
      <ShortName>Business combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2116104 - Disclosure - Investments and fair value measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Investmentsandfairvaluemeasurements</Role>
      <ShortName>Investments and fair value measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2133105 - Disclosure - Revenue recognition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Revenuerecognition</Role>
      <ShortName>Revenue recognition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2136106 - Disclosure - Liability for loss and loss adjustment expenses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Liabilityforlossandlossadjustmentexpenses</Role>
      <ShortName>Liability for loss and loss adjustment expenses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2140107 - Disclosure - Segment information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Segmentinformation</Role>
      <ShortName>Segment information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2145108 - Disclosure - Income tax</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Incometax</Role>
      <ShortName>Income tax</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2151109 - Disclosure - Fixed assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Fixedassets</Role>
      <ShortName>Fixed assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2157110 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2161111 - Disclosure - Stockholders??? equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Stockholdersequity</Role>
      <ShortName>Stockholders??? equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2163112 - Disclosure - Stock compensation expense</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Stockcompensationexpense</Role>
      <ShortName>Stock compensation expense</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2169113 - Disclosure - Earnings per share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Earningspershare</Role>
      <ShortName>Earnings per share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2173114 - Disclosure - Related party transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Relatedpartytransactions</Role>
      <ShortName>Related party transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2177115 - Disclosure - Commitments and contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Commitmentsandcontingencies</Role>
      <ShortName>Commitments and contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2181116 - Disclosure - Accumulated other comprehensive income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Accumulatedothercomprehensiveincome</Role>
      <ShortName>Accumulated other comprehensive income</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2184117 - Disclosure - Accrued expenses and other liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Accruedexpensesandotherliabilities</Role>
      <ShortName>Accrued expenses and other liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2187118 - Disclosure - Employee benefit plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Employeebenefitplan</Role>
      <ShortName>Employee benefit plan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2189119 - Disclosure - Research and development</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Researchanddevelopment</Role>
      <ShortName>Research and development</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2192120 - Disclosure - Warrant liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Warrantliabilities</Role>
      <ShortName>Warrant liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2194121 - Disclosure - Regulation and statutory financial information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Regulationandstatutoryfinancialinformation</Role>
      <ShortName>Regulation and statutory financial information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2196122 - Disclosure - Subsequent events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/Subsequentevents</Role>
      <ShortName>Subsequent events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2197123 - Disclosure - SEC Schedule, Article 12-09, Valuation and Qualifying Accounts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SECScheduleArticle1209ValuationandQualifyingAccounts</Role>
      <ShortName>SEC Schedule, Article 12-09, Valuation and Qualifying Accounts</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2204201 - Disclosure - Summary of significant accounting policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SummaryofsignificantaccountingpoliciesPolicies</Role>
      <ShortName>Summary of significant accounting policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2305301 - Disclosure - Summary of significant accounting policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SummaryofsignificantaccountingpoliciesTables</Role>
      <ShortName>Summary of significant accounting policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Summaryofsignificantaccountingpolicies</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2311302 - Disclosure - Business combinations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/BusinesscombinationsTables</Role>
      <ShortName>Business combinations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Businesscombinations</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2317303 - Disclosure - Investments and fair value measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsTables</Role>
      <ShortName>Investments and fair value measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Investmentsandfairvaluemeasurements</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2334304 - Disclosure - Revenue recognition (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/RevenuerecognitionTables</Role>
      <ShortName>Revenue recognition (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Revenuerecognition</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2337305 - Disclosure - Liability for loss and loss adjustment expenses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/LiabilityforlossandlossadjustmentexpensesTables</Role>
      <ShortName>Liability for loss and loss adjustment expenses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Liabilityforlossandlossadjustmentexpenses</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2341306 - Disclosure - Segment information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SegmentinformationTables</Role>
      <ShortName>Segment information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Segmentinformation</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2346307 - Disclosure - Income tax (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/IncometaxTables</Role>
      <ShortName>Income tax (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Incometax</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2352308 - Disclosure - Fixed assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/FixedassetsTables</Role>
      <ShortName>Fixed assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Fixedassets</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2358309 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Debt</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2364310 - Disclosure - Stock compensation expense (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/StockcompensationexpenseTables</Role>
      <ShortName>Stock compensation expense (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Stockcompensationexpense</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2370311 - Disclosure - Earnings per share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/EarningspershareTables</Role>
      <ShortName>Earnings per share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Earningspershare</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2374312 - Disclosure - Related Party Disclosures (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/RelatedPartyDisclosuresTables</Role>
      <ShortName>Related Party Disclosures (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2378313 - Disclosure - Commitments and contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/CommitmentsandcontingenciesTables</Role>
      <ShortName>Commitments and contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Commitmentsandcontingencies</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2382314 - Disclosure - Accumulated other comprehensive income (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/AccumulatedothercomprehensiveincomeTables</Role>
      <ShortName>Accumulated other comprehensive income (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Accumulatedothercomprehensiveincome</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2385315 - Disclosure - Accrued expenses and other liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/AccruedexpensesandotherliabilitiesTables</Role>
      <ShortName>Accrued expenses and other liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cic.com/role/Accruedexpensesandotherliabilities</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2390316 - Disclosure - Research and Development (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ResearchandDevelopmentTables</Role>
      <ShortName>Research and Development (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2402401 - Disclosure - Organization and business operations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/OrganizationandbusinessoperationsDetails</Role>
      <ShortName>Organization and business operations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/Organizationandbusinessoperations</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Summary of significant accounting policies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SummaryofsignificantaccountingpoliciesNarrativeDetails</Role>
      <ShortName>Summary of significant accounting policies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2407403 - Disclosure - Summary of significant accounting policies - Summary of useful lives assigned to fixed assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SummaryofsignificantaccountingpoliciesSummaryofusefullivesassignedtofixedassetsDetails</Role>
      <ShortName>Summary of significant accounting policies - Summary of useful lives assigned to fixed assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2408404 - Disclosure - Summary of significant accounting policies - Schedule of trade names (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SummaryofsignificantaccountingpoliciesScheduleoftradenamesDetails</Role>
      <ShortName>Summary of significant accounting policies - Schedule of trade names (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2409405 - Disclosure - Summary of significant accounting policies - Schedule of gross premiums written and ceded premiums (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SummaryofsignificantaccountingpoliciesScheduleofgrosspremiumswrittenandcededpremiumsDetails</Role>
      <ShortName>Summary of significant accounting policies - Schedule of gross premiums written and ceded premiums (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>2412406 - Disclosure - Business combinations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/BusinesscombinationsDetails</Role>
      <ShortName>Business combinations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/BusinesscombinationsTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>2413407 - Disclosure - Business combinations - North American Title Acquisition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/BusinesscombinationsNorthAmericanTitleAcquisitionDetails</Role>
      <ShortName>Business combinations - North American Title Acquisition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>2414408 - Disclosure - Business combinations - Schedule of additional information on total consideration transferred (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/BusinesscombinationsScheduleofadditionalinformationontotalconsiderationtransferredDetails</Role>
      <ShortName>Business combinations - Schedule of additional information on total consideration transferred (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>2415409 - Disclosure - Business combinations - Schedule of purchase price allocation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/BusinesscombinationsScheduleofpurchasepriceallocationDetails</Role>
      <ShortName>Business combinations - Schedule of purchase price allocation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>2418410 - Disclosure - Investments and fair value measurements - Summary of Held-to-Maturity Debt Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofHeldtoMaturityDebtSecuritiesDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Held-to-Maturity Debt Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>2419411 - Disclosure - Investments and fair value measurements - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsNarrativeDetails</Role>
      <ShortName>Investments and fair value measurements - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>2420412 - Disclosure - Investments and fair value measurements - Summary of Held-to-Maturity Debt Securities Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofHeldtoMaturityDebtSecuritiesMaturityDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Held-to-Maturity Debt Securities Maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>2421413 - Disclosure - Investments and fair value measurements - Schedule of Unrealized Loss on Held-to-Maturity Debt Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsScheduleofUnrealizedLossonHeldtoMaturityDebtSecuritiesDetails</Role>
      <ShortName>Investments and fair value measurements - Schedule of Unrealized Loss on Held-to-Maturity Debt Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>2422414 - Disclosure - Investments and fair value measurements -Summary of Available-for-Sale Debt Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofAvailableforSaleDebtSecuritiesDetails</Role>
      <ShortName>Investments and fair value measurements -Summary of Available-for-Sale Debt Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>2423415 - Disclosure - Investments and fair value measurements - Summary of Realized Gains (Losses) on Available-for-Sale Debt Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofRealizedGainsLossesonAvailableforSaleDebtSecuritiesDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Realized Gains (Losses) on Available-for-Sale Debt Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>2424416 - Disclosure - Investments and fair value measurements - Summary of Equity Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofEquitySecuritiesDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Equity Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>2425417 - Disclosure - Investments and fair value measurements - Realized Gain (Loss) on Equity Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsRealizedGainLossonEquitySecuritiesDetails</Role>
      <ShortName>Investments and fair value measurements - Realized Gain (Loss) on Equity Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>2426418 - Disclosure - Investments and fair value measurements - Summary of Mortgage Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofMortgageLoansDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Mortgage Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>2427419 - Disclosure - Investments and fair value measurements - Schedule of Investment Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsScheduleofInvestmentIncomeDetails</Role>
      <ShortName>Investments and fair value measurements - Schedule of Investment Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>2428420 - Disclosure - Investments and fair value measurements - Summary of Accrued Interest (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofAccruedInterestDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Accrued Interest (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>2429421 - Disclosure - Investments and fair value measurements - Summary of Company's Investments Measured at Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofCompanysInvestmentsMeasuredatFairValueDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Company's Investments Measured at Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>2430422 - Disclosure - Investments and fair value measurements - Summary of Company's Liabilities Measured at Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofCompanysLiabilitiesMeasuredatFairValueDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Company's Liabilities Measured at Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>2431423 - Disclosure - Investments and fair value measurements - Summary of Fair Values of the Sponsor Earnout Shares Using a Monte Carlo Simulation Valuation Model (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsSummaryofFairValuesoftheSponsorEarnoutSharesUsingaMonteCarloSimulationValuationModelDetails</Role>
      <ShortName>Investments and fair value measurements - Summary of Fair Values of the Sponsor Earnout Shares Using a Monte Carlo Simulation Valuation Model (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>2432424 - Disclosure - Investments and fair value measurements - Changes for Level 3 Items Measured at Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/InvestmentsandfairvaluemeasurementsChangesforLevel3ItemsMeasuredatFairValueDetails</Role>
      <ShortName>Investments and fair value measurements - Changes for Level 3 Items Measured at Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>2435425 - Disclosure - Revenue recognition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/RevenuerecognitionDetails</Role>
      <ShortName>Revenue recognition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/RevenuerecognitionTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>2438426 - Disclosure - Liability for loss and loss adjustment expenses - Summary of Liability for Loss and Loss Adjustment Expenses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/LiabilityforlossandlossadjustmentexpensesSummaryofLiabilityforLossandLossAdjustmentExpensesDetails</Role>
      <ShortName>Liability for loss and loss adjustment expenses - Summary of Liability for Loss and Loss Adjustment Expenses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>2439427 - Disclosure - Liability for loss and loss adjustment expenses - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/LiabilityforlossandlossadjustmentexpensesNarrativeDetails</Role>
      <ShortName>Liability for loss and loss adjustment expenses - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>2442428 - Disclosure - Segment information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SegmentinformationNarrativeDetails</Role>
      <ShortName>Segment information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>2443429 - Disclosure - Segment information - Summary of Operating Results by Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SegmentinformationSummaryofOperatingResultsbySegmentDetails</Role>
      <ShortName>Segment information - Summary of Operating Results by Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>2444430 - Disclosure - Segment information - Reconciliation of Adjusted Gross Profit to Loss Before Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SegmentinformationReconciliationofAdjustedGrossProfittoLossBeforeIncomeTaxesDetails</Role>
      <ShortName>Segment information - Reconciliation of Adjusted Gross Profit to Loss Before Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>2447431 - Disclosure - Income tax - Income tax expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/IncometaxIncometaxexpenseDetails</Role>
      <ShortName>Income tax - Income tax expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>2448432 - Disclosure - Income tax - Reconciliation of federal income tax rate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/IncometaxReconciliationoffederalincometaxrateDetails</Role>
      <ShortName>Income tax - Reconciliation of federal income tax rate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>2449433 - Disclosure - Income tax - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/IncometaxNarrativeDetails</Role>
      <ShortName>Income tax - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>2450434 - Disclosure - Income tax - Deferred tax assets and liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/IncometaxDeferredtaxassetsandliabilitiesDetails</Role>
      <ShortName>Income tax - Deferred tax assets and liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>2453435 - Disclosure - Fixed assets - Schedule of fixed assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/FixedassetsScheduleoffixedassetsDetails</Role>
      <ShortName>Fixed assets - Schedule of fixed assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>2454436 - Disclosure - Fixed assets - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/FixedassetsNarrativeDetails</Role>
      <ShortName>Fixed assets - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>2455437 - Disclosure - Fixed assets - Schedule of net gains and losses on sales of fixed assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/FixedassetsScheduleofnetgainsandlossesonsalesoffixedassetsDetails</Role>
      <ShortName>Fixed assets - Schedule of net gains and losses on sales of fixed assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>2456438 - Disclosure - Fixed assets - Internally developed software and acquired software (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/FixedassetsInternallydevelopedsoftwareandacquiredsoftwareDetails</Role>
      <ShortName>Fixed assets - Internally developed software and acquired software (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>2459439 - Disclosure - Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/DebtDetails</Role>
      <ShortName>Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/DebtTables</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>2460440 - Disclosure - Debt - Summary of Loan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/DebtSummaryofLoanDetails</Role>
      <ShortName>Debt - Summary of Loan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>2462441 - Disclosure - Stockholders??? equity - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/StockholdersequityNarrativeDetails</Role>
      <ShortName>Stockholders??? equity - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>2465442 - Disclosure - Stock compensation expense - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/StockcompensationexpenseNarrativeDetails</Role>
      <ShortName>Stock compensation expense - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>2466443 - Disclosure - Stock compensation expense - Summary of Weighted-Average Assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/StockcompensationexpenseSummaryofWeightedAverageAssumptionsDetails</Role>
      <ShortName>Stock compensation expense - Summary of Weighted-Average Assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>2467444 - Disclosure - Stock compensation expense - Summary of Stock Options (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/StockcompensationexpenseSummaryofStockOptionsDetails</Role>
      <ShortName>Stock compensation expense - Summary of Stock Options (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>2468445 - Disclosure - Stock compensation expense - Nonvested Restricted and Performance Stock Awards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/StockcompensationexpenseNonvestedRestrictedandPerformanceStockAwardsDetails</Role>
      <ShortName>Stock compensation expense - Nonvested Restricted and Performance Stock Awards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>2471446 - Disclosure - Earnings per share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/EarningspershareDetails</Role>
      <ShortName>Earnings per share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/EarningspershareTables</ParentRole>
      <Position>94</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>2472447 - Disclosure - Earnings per share - Antidilutive Securities Excluded from Computation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/EarningspershareAntidilutiveSecuritiesExcludedfromComputationDetails</Role>
      <ShortName>Earnings per share - Antidilutive Securities Excluded from Computation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>95</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>2475448 - Disclosure - Related party transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/RelatedpartytransactionsDetails</Role>
      <ShortName>Related party transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/Relatedpartytransactions</ParentRole>
      <Position>96</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>2476449 - Disclosure - Related party transactions - Summary of Related Party Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/RelatedpartytransactionsSummaryofRelatedPartyTransactionsDetails</Role>
      <ShortName>Related party transactions - Summary of Related Party Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>97</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>2479450 - Disclosure - Commitments and contingencies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/CommitmentsandcontingenciesNarrativeDetails</Role>
      <ShortName>Commitments and contingencies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>98</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>2480451 - Disclosure - Commitments and contingencies - Schedule of Minimum Operating Lease Payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/CommitmentsandcontingenciesScheduleofMinimumOperatingLeasePaymentsDetails</Role>
      <ShortName>Commitments and contingencies - Schedule of Minimum Operating Lease Payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>2483452 - Disclosure - Accumulated other comprehensive income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/AccumulatedothercomprehensiveincomeDetails</Role>
      <ShortName>Accumulated other comprehensive income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/AccumulatedothercomprehensiveincomeTables</ParentRole>
      <Position>100</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>2486453 - Disclosure - Accrued expenses and other liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/AccruedexpensesandotherliabilitiesDetails</Role>
      <ShortName>Accrued expenses and other liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/AccruedexpensesandotherliabilitiesTables</ParentRole>
      <Position>101</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>2488454 - Disclosure - Employee benefit plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/EmployeebenefitplanDetails</Role>
      <ShortName>Employee benefit plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/Employeebenefitplan</ParentRole>
      <Position>102</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>2491455 - Disclosure - Research and development (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/ResearchanddevelopmentDetails</Role>
      <ShortName>Research and development (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/Researchanddevelopment</ParentRole>
      <Position>103</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>2493456 - Disclosure - Warrant liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/WarrantliabilitiesDetails</Role>
      <ShortName>Warrant liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/Warrantliabilities</ParentRole>
      <Position>104</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>2495457 - Disclosure - Regulation and statutory financial information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/RegulationandstatutoryfinancialinformationDetails</Role>
      <ShortName>Regulation and statutory financial information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/Regulationandstatutoryfinancialinformation</ParentRole>
      <Position>105</Position>
    </Report>
    <Report instance="cic-20220314.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>2498458 - Disclosure - SEC Schedule, Article 12-09, Valuation and Qualifying Accounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cic.com/role/SECScheduleArticle1209ValuationandQualifyingAccountsDetails</Role>
      <ShortName>SEC Schedule, Article 12-09, Valuation and Qualifying Accounts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cic.com/role/SECScheduleArticle1209ValuationandQualifyingAccounts</ParentRole>
      <Position>106</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="POS AM" original="cic-20220314.htm">cic-20220314.htm</File>
    <File>cic-20220314.xsd</File>
    <File>cic-20220314_cal.xml</File>
    <File>cic-20220314_def.xml</File>
    <File>cic-20220314_lab.xml</File>
    <File>cic-20220314_pre.xml</File>
    <File>exhibit231-posam.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>cic-20220314_g1.jpg</File>
    <File>cic-20220314_g2.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2021-01-31</BaseTaxonomy>
    <BaseTaxonomy items="1415">http://fasb.org/us-gaap/2021-01-31</BaseTaxonomy>
    <BaseTaxonomy items="17">http://xbrl.sec.gov/dei/2021q4</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
