Proceeds from issuance of common stock related to warrants Proceeds from Warrant Exercises Stock repurchase program, authorized amount Stock Repurchase Program, Authorized Amount Supplemental disclosures of cash flow information Supplemental Cash Flow Information [Abstract] Changes in operating assets and liabilities: Increase (Decrease) in Other Operating Assets and Liabilities, Net [Abstract] (Gain) loss from change in fair value of warrant liability Gain (Loss) on Change in Fair Value of Warrant Liability Gain (Loss) on Change in Fair Value of Warrant Liability Corporate Headquarters and Data Facility Lease 1 Corporate Headquarters and Data Facility Lease 1 [Member] Corporate Headquarters and Data Facility Lease 1 Earnings Per Share Earnings Per Share, Policy [Policy Text Block] Current year IBNR Current Year Claims and Claims Adjustment Expense, Incurred but Not Reported Current Year Claims and Claims Adjustment Expense, Incurred but Not Reported Fair Value Hierarchy and NAV [Domain] Fair Value Hierarchy and NAV [Domain] Net income Net income Net income Net income Net Income (Loss) Attributable to Parent Right-of-use assets Operating Lease, Right-of-Use Asset Loan-to-value ratio (less than) Loans In Pool, Loan To Value Ratio Loans In Pool, Loan To Value Ratio Risk written policies in 2023 Eligible Policies, Pool Nine [Member] Eligible Policies, Pool Nine Prior year, IBNR Prior Year Claims and Claims Adjustment Expense, Incurred but Not Reported Prior Year Claims and Claims Adjustment Expense, Incurred but Not Reported Statistical Measurement [Domain] Statistical Measurement [Domain] Liability for Claims and Claims Adjustment Expense [Line Items] Liability for Claims and Claims Adjustment Expense [Line Items] Valuation technique, option pricing model Valuation Technique, Option Pricing Model [Member] Security Exchange Name Security Exchange Name Direct Direct Premiums Earned Entity Incorporation, State or Country Code Entity Incorporation, State or Country Code Premiums Receivable Premiums Receivable, Basis of Accounting, Policy [Policy Text Block] Weighted-average remaining lease term (in years) Operating Lease, Weighted Average Remaining Lease Term Net increase (decrease) in cash, cash equivalents and restricted cash Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Period Increase (Decrease), Including Exchange Rate Effect Entity File Number Entity File Number Redemption price (in percent) Debt Instrument, Redemption Price, Percentage Roll-forward of Level 3 liabilities: Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward] Share-based compensation expense APIC, Share-based Payment Arrangement, Increase for Cost Recognition Change in fair value of warrant liability included in earnings Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, Gain (Loss) Included in Earnings Schedule of fair values and gross unrealized gains and losses Debt Securities, Available-for-sale [Table Text Block] 2020 QSR transaction Two Thousand Twenty QSR Transaction [Member] Two Thousand Twenty QSR Transaction Due after ten years Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling after 10 Years, Fair Value Subsequent Event Type [Domain] Subsequent Event Type [Domain] Lessee, Lease, Description [Line Items] Lessee, Lease, Description [Line Items] Total number of policies in-force Liability For Unpaid Claims And Claims Adjustment Expense, Incurred But Not Reported (IBNR) Claims, Total Policies In-Force Liability For Unpaid Claims And Claims Adjustment Expense, Incurred But Not Reported (IBNR) Claims, Total Policies In-Force 2021-2 ILN Transaction 2021-2 ILN [Member] 2021-2 ILN Debt Issuance costs Debt Issuance Costs, Line of Credit Arrangements, Gross Organization, Consolidation and Presentation of Financial Statements [Abstract] Organization, Consolidation and Presentation of Financial Statements [Abstract] Valuation Approach and Technique [Domain] Valuation Approach and Technique [Domain] Weighted-average discount rate Operating Lease, Weighted Average Discount Rate, Percent Anti-dilutive shares (in shares) Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount Liability Class [Axis] Liability Class [Axis] Subsequent Events [Abstract] Commitment fees in interest expense Line of Credit Facility, Commitment Fee Amount Number of states in which the entity operates Number of States in which Entity Operates Current first layer retained loss Current First Layer Retained Loss Current First Layer Retained Loss Secured Overnight Financing Rate Secured Overnight Financing Rate (SOFR) Overnight Index Swap Rate [Member] Utilities Utilities, Industry Group [Member] Utilities, Industry Group [Member] Unrealized losses in accumulated other comprehensive income, net of tax benefit of $26,176 and $11,997 for the quarters ended March 31, 2022 and 2021, respectively OCI, Debt Securities, Available-for-Sale, Unrealized Holding Gain (Loss), before Adjustment, after Tax Schedule of Deferred Compensation Arrangement with Individual, Excluding Share-based Payments and Postretirement Benefits, by Title of Individual and by Type of Deferred Compensation [Table] Schedule of Deferred Compensation Arrangement with Individual, Excluding Share-based Payments and Postretirement Benefits, by Title of Individual and by Type of Deferred Compensation [Table] Change in unrealized investment gains/losses, tax expense (benefit) Change in unrealized investment gains/losses, tax expense (benefit) OCI, Debt Securities, Available-for-Sale, Gain (Loss), after Adjustment, Tax Component of claims paid covered under QSR Transaction Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid Including Amounts Covered By Insurance, Amount Under QSR Transaction Component of total amount of payments to settle insured claims and pay costs incurred in the claims settlement process, including amount covered by insurance, covered under QSR transaction. Local Phone Number Local Phone Number Credit Facility [Domain] Credit Facility [Domain] Assets Assets [Abstract] 2028 Lessee​ Operating Lease ​Liability ​Payments ​Due​ Year​ Six Lessee​ Operating Lease ​Liability ​Payments ​Due​ Year​ Six Ceded Credit Risk, Reinsurer [Domain] Ceded Credit Risk, Reinsurer [Domain] Municipal debt securities Municipal debt securities US States and Political Subdivisions Debt Securities [Member] Variable rate floor (in percent) Debt Instrument, Variable Interest Rate Floor Debt Instrument, Variable Interest Rate Floor Schedule of investments by maturity Investments Classified by Contractual Maturity Date [Table Text Block] Proceeds from issuance of common stock related to employee equity plans Proceeds, Issuance of Shares, Share-based Payment Arrangement, Including Option Exercised Liability for Unpaid Claims and Claims Adjustment Expense [Roll Forward] Liability for Unpaid Claims and Claims Adjustment Expense [Roll Forward] Retained Earnings Retained Earnings [Member] Debt Instrument [Axis] Debt Instrument [Axis] Other assets Increase (Decrease) in Prepaid Expense and Other Assets Reinsurance Disclosures [Abstract] Reinsurance Disclosures [Abstract] Accrued investment income Increase (Decrease) in Accrued Investment Income Receivable Common stock: class A shares issued related to warrant exercises Stock Issued During Period, Value, Conversion of Convertible Securities Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation [Line Items] Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation [Line Items] Secured Debt Secured Debt [Member] Right-of-use assets obtained in exchange for new operating lease liabilities Right-of-Use Asset Obtained in Exchange for Operating Lease Liability Reinsurance Policy [Domain] Reinsurance Policy [Domain] Reinsurance Policy, Type [Axis] Reinsurance Policy, Type [Axis] 2021-1 ILN Transaction 2021-1 ILN [Member] 2021-1 ILN Prior years Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid, Prior Years Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation [Table] Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation [Table] Diluted net income Net Income (Loss) Attributable to Parent, Diluted Prior years Prior Year Claims and Claims Adjustment Expense Basic (in dollars per share) Basic earnings per share (in dollars per share) Earnings Per Share, Basic 2030 Lessee ​Operating​ Lease​ Liability​ Payments​ Due ​Year​ Eight Lessee ​Operating​ Lease​ Liability​ Payments​ Due ​Year​ Eight Operating lease expense Operating Lease, Expense Due after five through ten years Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling after Five Through Ten Years, Amortized Cost Amount retained Reinsurance Retention Policy, Amount Retained U.S. Treasury securities and obligations of U.S. government agencies U.S. Treasury securities and obligations of U.S. government agencies U.S. Treasury securities and obligations of U.S. government agencies US Treasury and Government [Member] 2025 Lessee, Operating Lease, Liability, to be Paid, Year Three Claims applied to pool deductible Liability for Unpaid Claims and Claims Adjustment Expense, Claims Applied to Deductible Liability for Unpaid Claims and Claims Adjustment Expense, Claims Applied to Deductible Beginning balance Ending balance Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability Value Prior to June 1, 2022 Prior to June 1, 2022 [Member] Prior to June 1, 2022 Investment income Investment Income, Interest and Dividend Cash paid on operating leases Operating Lease, Payments Reinsurance recoverable Reinsurance Recoverables, Gross Ceded Credit Risk, Reinsurer [Axis] Ceded Credit Risk, Reinsurer [Axis] Debt Secured Debt Unearned premiums Increase (Decrease) in Unearned Premiums Statutory Accounting Practices [Line Items] Statutory Accounting Practices [Line Items] Claims paid, including amounts covered by insurance Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid Including Amounts Covered By Insurance Amount of payments to settle insured claims and pay costs incurred in the claims settlement process, including amount covered by insurance. 2029 Lessee​ Operating ​Lease​ Liability​ Payments ​Due​ Year​ Seven Lessee​ Operating ​Lease​ Liability​ Payments ​Due​ Year​ Seven 2022 QSR Transaction 2022 QSR Transaction [Member] 2022 QSR Transaction Net income amount Statutory Accounting Practices, Statutory Net Income Amount Carried cost Long-term Debt Total assets Assets, Fair Value Disclosure Prepaid expenses Prepaid Expense Ceded Credit Risk [Line Items] Ceded Credit Risk [Line Items] Quoted Prices in Active Markets for Identical Assets (Level 1) Fair Value, Inputs, Level 1 [Member] Cash flows from investing activities Net Cash Provided by (Used in) Investing Activities [Abstract] Fair Value by Liability Class [Domain] Fair Value by Liability Class [Domain] Other liabilities Other Liabilities Direct Direct Premiums Written Income Tax Disclosure [Abstract] Income Tax Disclosure [Abstract] Entity Small Business Entity Small Business Future Payment Due Under Operating Leases Lessee, Operating Lease, Liability, Payment, Due [Abstract] Primary loans in default Liability For Unpaid Claims And Claims Adjustment Expense, Incurred But Not Reported (IBNR) Claims, Number Of Primary Loans In Default Liability For Unpaid Claims And Claims Adjustment Expense, Incurred But Not Reported (IBNR) Claims, Number Of Primary Loans In Default Base rate Base Rate [Member] Total liabilities and shareholders' equity Liabilities and Equity Common stock: class A shares issued under stock plans, net of shares withheld for employee taxes Stock Issued During Period, Value, Employee Stock Purchase Plan, Net of Tax Withholdings Stock Issued During Period, Value, Employee Stock Purchase Plan, Net of Tax Withholdings Investments, Debt and Equity Securities [Abstract] Investments, Debt and Equity Securities [Abstract] Fannie Mae Eligible Policies, Pool Two [Member] Eligible Policies, Pool Two [Member] NMIC and Re One combined NMic and Re one Combined [Member] NMic and Re one Combined [Member] Scenario [Axis] Scenario [Axis] 2027 Lessee, Operating Lease, Liability, to be Paid, Year Five Proceeds from redemptions, maturities and sale of fixed-maturity investments, available-for-sale Proceeds from Sale and Maturity of Debt Securities, Available-for-sale Ceding commission earned Reinsurance Ceding Commission Earned Reinsurance Ceding Commission Earned Due after five through ten years Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling after Five Through Ten Years, Fair Value Restricted cash Restricted Cash Additional paid-in capital Additional Paid in Capital Lessee, Lease, Description [Table] Lessee, Lease, Description [Table] Organization, Basis of Presentation and Summary of Accounting Principles Business Description and Basis of Presentation [Text Block] 2018 Term loan Senior Secured Term Loan 2018 [Member] Senior Secured Term Loan 2018 [Member] Earnings per Share (EPS) Earnings Per Share [Text Block] Repurchase of common stock Treasury Stock, Value, Acquired, Cost Method Shares repurchased, average price per share (in dollar per share) Treasury Stock Acquired, Average Cost Per Share Entity Interactive Data Current Entity Interactive Data Current Contingency reserve Statutory Accounting Practices, Contingency Reserve Contingency reserve recorded under Statutory Accounting Principles is a liability to protect against loss during periods of extreme contraction. Schedule of statutory net income (loss), surplus, contingency reserve and risk-to-capital ratio Statutory Accounting Practices Disclosure [Table Text Block] Reinsurance coverage amount amortized (as a percent) Reinsurance Agreement, Optional Termination Right, Percent Of Reinsurance Coverage Threshold Reinsurance Agreement, Optional Termination Right, Percent Of Reinsurance Coverage Threshold Minimum Minimum [Member] Gross realized investment gains Debt Securities, Available-for-sale, Realized Gain 2024 Lessee, Operating Lease, Liability, to be Paid, Year Two Borrowings outstanding Long-term Line of Credit Total liabilities Financial and Nonfinancial Liabilities, Fair Value Disclosure Unearned premiums Unearned Premiums Other comprehensive loss, net of tax: Other Comprehensive Income (Loss), Net of Tax, Portion Attributable to Parent [Abstract] Insurance claims and claim (benefits) expenses Policyholder Benefits and Claims Incurred, Net, Property, Casualty and Liability Entity Common Stock, Shares Outstanding (in shares) Entity Common Stock, Shares Outstanding Gross unrealized gains Debt Securities, Available-for-sale, Accumulated Gross Unrealized Gain, before Tax Entity Address, State or Province Entity Address, State or Province Regulatory Information Insurance Disclosure [Text Block] Fair value, 12 months or greater Debt Securities, Available-for-sale, Continuous Unrealized Loss Position, 12 Months or Longer Debt Debt Disclosure [Text Block] Beginning balance (in shares) Ending balance (in shares) Shares, Outstanding Due in one year or less Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling within One Year, Fair Value Premiums receivable Increase (Decrease) in Premiums Receivable Significant Unobservable Inputs (Level 3) Fair Value, Inputs, Level 3 [Member] Key Inputs and Assumptions, Valuation Techniques Fair Value Measurement Inputs and Valuation Techniques [Line Items] 2018 ILN Transaction 2018 ILN [Member] 2018 ILN [Member] Premiums receivable Premiums Receivable, Net Risk written policies in 2020 Eligible Policies, Pool Six [Member] Eligible Policies, Pool Six 2020 Revolving credit facility Secured Revolving Credit Facility 2020 [Member] Secured Revolving Credit Facility 2020 Accounts payable and accrued expenses Accounts Payable and Accrued Liabilities Lease liabilities Present value of lease payments Operating Lease, Liability Document Transition Report Document Transition Report Repurchase of common stock (in shares) Treasury Stock Shares Acquired Cost Method Treasury Stock Shares Acquired Cost Method Treasury Stock, At Cost Treasury Stock, Common [Member] Debt Securities By Industry [Axis] Debt Securities By Industry [Axis] Debt Securities By Industry [Axis] Reinsurance Reinsurance [Text Block] Basis of Presentation Basis of Accounting, Policy [Policy Text Block] Commitments and contingencies Commitments and Contingencies 2021 Revolving credit facility Secured Revolving Credit Facility 2021 [Member] Secured Revolving Credit Facility 2021 Subsequent Event [Table] Subsequent Event [Table] Leases Lessee, Operating Leases [Text Block] Accumulated other comprehensive (loss) income, net of tax Accumulated Other Comprehensive Income (Loss), Net of Tax Entity Emerging Growth Company Entity Emerging Growth Company Asset-backed securities Debt Securities, Available-for-sale, Maturity, without Single Maturity Date, Fair Value Remaining in 2022 Lessee, Operating Lease, Liability, to be Paid, Remainder of Fiscal Year Anticipated payment related to annual operating expenses Anticipated Operating Expense Payments, Annual Amount of anticipated payments related to operating expenses of counterparty. Investments Investments in Debt and Marketable Equity Securities (and Certain Trading Assets) Disclosure [Text Block] Legal Entity [Axis] Legal Entity [Axis] Cover page. Cover [Abstract] Corporate debt securities as component of total (percent) Debt Securities, Corporate, Component Of Total. Percentage Debt Securities, Corporate, Component Of Total. Percentage Total expenses Costs and Expenses Amount reinsured Reinsurance Retention Policy, Excess Retention, Amount Reinsured ILN transactions ILN Transactions [Member] ILN Transactions [Member] Schedule of aging unrealized losses Schedule of Unrealized Loss on Investments [Table Text Block] Class of warrant or right, outstanding (in shares) Class of Warrant or Right, Outstanding Less effects of discounting Lessee, Operating Lease, Liability, Undiscounted Excess Amount Reinsurance recoverable on unpaid claims Less reinsurance recoverables Add reinsurance recoverables Reinsurance Recoverable for Paid and Unpaid Claims and Claims Adjustments Beginning balance, net of reinsurance recoverables Reserve at end of period, net of reinsurance recoverables Liability for Unpaid Claims and Claims Adjustment Expense, Net Warrants Line of Credit and Related Warrants [Text Block] Line of Credit and Related Warrants [Text Block] Net premiums written Premiums Written, Net [Abstract] Net unrealized (losses) gains in accumulated other comprehensive income, tax (benefit) expense OCI, Debt Securities, Available-for-Sale, Unrealized Holding Gain (Loss), before Adjustment, Tax Roll-forward of level 3 liabilities measured at fair value Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Table Text Block] Comprehensive income: Comprehensive Income (Loss), Net of Tax, Attributable to Parent [Abstract] Financial Instrument [Axis] Financial Instrument [Axis] Entity [Domain] Entity [Domain] Due after one through five years Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling after One Through Five Years, Amortized Cost Schedule of Available-for-sale Securities [Table] Schedule of Available-for-sale Securities [Table] Prepaid expenses Increase (Decrease) in Prepaid Expense Reinsurance funds withheld Funds Held under Reinsurance Agreements, Liability Equity [Abstract] Fair Value Hierarchy and NAV [Axis] Fair Value Hierarchy and NAV [Axis] Document Quarterly Report Document Quarterly Report Debt instrument covenant, maximum debt-to-total capitalization ratio Debt Instrument, Covenant Terms, Debt to Total Capitalization Ratio, Maximum Debt Instrument, Covenant Terms, Debt to Total Capitalization Ratio, Maximum Warrants expired unexercised during period (in shares) Class Of Warrant Or Right, Number Of Warrants Shares Expired Unexercised During Period Class Of Warrant Or Right, Number Of Warrants Shares Expired Unexercised During Period Measurement Input Type [Domain] Measurement Input Type [Domain] (Gain) loss from change in fair value of warrant liability Fair Value Adjustment of Warrants Proceeds from maturity of short-term investments Proceeds from Sale of Short-term Investments Fair value, less than 12 months Debt Securities, Available-for-sale, Continuous Unrealized Loss Position, Less than 12 Months Common Stock - Class A Common stock Common Stock [Member] Variable Rate [Axis] Variable Rate [Axis] Claims and claim expenses paid: Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid [Abstract] Debt Securities, Available-for-sale [Line Items] Debt Securities, Available-for-sale [Line Items] Gross unrealized losses Debt Securities, Available-for-sale, Accumulated Gross Unrealized Loss, before Tax Treasury stock, common shares (in shares) Treasury Stock, Common, Shares Net realized investment gains Net realized investment gains Debt Securities, Available-for-sale, Realized Gain (Loss) Increase (Decrease) in Stockholders' Equity [Roll Forward] Increase (Decrease) in Stockholders' Equity [Roll Forward] Document Fiscal Year Focus Document Fiscal Year Focus Share-based compensation expense Share-based Payment Arrangement, Noncash Expense Initial First Layer Retained Loss Initial First Layer Retained Loss Initial First Layer Retained Loss Variable Rate [Domain] Variable Rate [Domain] Consumer Consumer, Industry Group [Member] Consumer, Industry Group [Member] Additional Paid-in Capital Additional Paid-in Capital [Member] Second layer amount reinsured Reinsurance Retention Policy, Excess Retention, Second Layer Amount Reinsured Reinsurance Retention Policy, Excess Retention, Second Layer Amount Reinsured Right to purchase, number of shares per warrant (in shares) Number Of Shares, Right To Purchase Per Warrant Number Of Shares, Right To Purchase Per Warrant Long-term Debt, Type [Domain] Long-term Debt, Type [Domain] Deductible on policy Mortgage Pool Insurance, Claim Deductible Mortgage Pool Insurance, Claim Deductible Interest payable Interest Payable Reserves for Insurance Claims and Claim Expenses Liability for Future Policy Benefits and Unpaid Claims Disclosure [Text Block] Risk-in-Force of loans in pool past due 60 days or more Loans In Pool, Past Due 60 Days Or More, Loan Risk in Force Loans In Pool, Past Due 60 Days Or More, Risk in Force Purchase of fixed-maturity investments, available-for-sale Payments to Acquire Debt Securities, Available-for-sale Prior to March 1, 2025 Prior To March 1, 2025 [Member] Prior To March 1, 2025 Percent of premiums ceded under QSR Transaction Percent of pool RIF reinsured Reinsurance Retention Policy, Reinsured Risk, Percentage Warrants issued (in shares) Class of Warrant or Right, Number of Securities Called by Warrants or Rights Risk premiums paid Reinsurance Retention, Risk Premiums Paid Reinsurance Retention, Risk Premiums Paid Reserve for insurance claims and claim expenses Increase (Decrease) in Liability for Claims and Claims Adjustment Expense Reserve Warrants expired unexercised resulting in gain (loss) during period Class Of Warrant Or Right, Warrants Expired Unexercised Resulting In Gain (Loss) During Period Class Of Warrant Or Right, Warrants Expired Unexercised Resulting In Gain (Loss) During Period Fair value of long term debt Long-term Debt, Fair Value Software and equipment Payments to Acquire Property, Plant, and Equipment Valuation Approach and Technique [Axis] Valuation Approach and Technique [Axis] Maximum Maximum [Member] Reclassification adjustment for realized losses (gains) included in net income, tax expense (benefit) Other Comprehensive Income (Loss), Reclassification Adjustment from AOCI for Sale of Securities, Tax Total liabilities Liabilities Technology Technology, Industry Group [Member] Technology, Industry Group [Member] Prior year case reserves Prior Year Claims and Claims Adjustment Expense, Case Reserves Prior Year Claims and Claims Adjustment Expense, Case Reserves Cash flows from financing activities Net Cash Provided by (Used in) Financing Activities [Abstract] Schedule of Future Payments Due Under Operating Leases Lessee, Operating Lease, Liability, Maturity [Table Text Block] Measurement Input Type [Axis] Measurement Input Type [Axis] Total shareholders' equity Beginning balance Ending balance Stockholders' Equity Attributable to Parent Current year Current Year Claims and Claims Adjustment Expense Expected volatility Measurement Input, Option Volatility [Member] Industrial Industrial, Industry Group [Member] Industrial, Industry Group [Member] Common stock, issued (in shares) Common Stock, Shares, Issued Gain from change in fair value of warrant liability Gain From Change In Fair Value of Warrant Liability Gain From Change In Fair Value of Warrant Liability City Area Code City Area Code Issuance of common stock on warrant exercise Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, Settlements Accounts payable and accrued expenses Increase (Decrease) in Accounts Payable and Accrued Liabilities Ceded Ceded premiums earned Ceded Premiums Earned 2018 Revolving credit facility Secured Revolving Credit Facility 2018 [Member] Secured Revolving Credit Facility 2018 [Member] Percent of premiums earned under 2018 QSR Transaction Premiums Earned, Percent Of Risk Premiums Earned, Percent Of Risk Expected life Measurement Input, Expected Term [Member] Entity Address, City or Town Entity Address, City or Town Gross realized investment losses Debt Securities, Available-for-sale, Realized Loss Repurchases of common stock Payments for Repurchase of Common Stock Fair Value Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Fair Value [Abstract] Shareholders' equity Stockholders' Equity Attributable to Parent [Abstract] Due after one through five years Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling after One Through Five Years, Fair Value Net investment income Investment Income, Net Measurement Frequency [Domain] Measurement Frequency [Domain] Debt instrument face amount Debt Instrument, Face Amount Interest expense Interest Expense Eligible policies, pool one Eligible Policies, Pool One [Member] Eligible Policies, Pool One [Member] Schedule of net realized investment losses Realized Gain (Loss) on Investments [Table Text Block] Retained earnings Retained Earnings (Accumulated Deficit) Operating lease terms Lessee, Operating Lease, Term of Contract Fair Value Measurement Inputs and Valuation Techniques [Table] Fair Value Measurement Inputs and Valuation Techniques [Table] Commitment fee (in percent) Line of Credit Facility, Unused Capacity, Commitment Fee Percentage Statement of Stockholders' Equity [Abstract] Statement of Stockholders' Equity [Abstract] Entity Filer Category Entity Filer Category Finance lease Finance Lease, Liability Net realized investment gains Gain (Loss) on Investments Due after ten years Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling after 10 Years, Amortized Cost Income Statement [Abstract] Income Statement [Abstract] Entity Registrant Name Entity Registrant Name Statutory surplus Statutory Accounting Practices, Statutory Capital and Surplus, Balance Schedule of effects of reinsurance Effects of Reinsurance [Table Text Block] Risk to capital ratio regulatory actual Risk To Capital Ratio Regulatory Actual This concept represents an entity's ratio of net risk in force (excludes risk ceded through reinsurance contracts and risk in force on defaulted loans) to the amount of statutory capital (defined as the sum of statutory policyholders' surplus plus statutory contingency reserves). Income tax expense Income Tax Expense (Benefit) Amendment Flag Amendment Flag Insurance [Abstract] Insurance [Abstract] Equity Components [Axis] Equity Components [Axis] Entity Tax Identification Number Entity Tax Identification Number Fair Value Disclosures [Abstract] Fair Value Disclosures [Abstract] Document Fiscal Period Focus Document Fiscal Period Focus Total undiscounted lease payments Lessee, Operating Lease, Liability, to be Paid Debt Securities By Industry [Line Items] Debt Securities By Industry [Line Items] Debt Securities By Industry [Line Items] Third-party reinsurers Third-Party Reinsurers [Member] Third-Party Reinsurers [Member] Weighted average common shares outstanding Weighted Average Number of Shares Outstanding Reconciliation [Abstract] Reinsurance recoverable Increase (Decrease) in Reinsurance Recoverable Claims and claim (benefits) expenses incurred: Liability for Unpaid Claims and Claims Adjustment Expense, Incurred Claims [Abstract] Warrants exercised (in shares) Class of Warrant or Right, Number of Warrants Exercised During Period Class of Warrant or Right, Number of Warrants Exercised During Period Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] Statement of Financial Position [Abstract] Statement of Financial Position [Abstract] Total bonds Bonds [Member] Current year case reserves Current Year Claims and Claims Adjustment Expense, Case Reserves Current Year Claims and Claims Adjustment Expense, Case Reserves Equity Component [Domain] Equity Component [Domain] Amortized Cost Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Amortized Cost, Rolling Maturity [Abstract] 2023 Lessee, Operating Lease, Liability, to be Paid, Year One Statutory capital Statutory capital Statutory Accounting Practices, Statutory Capital and Surplus Including Contingency Reserve Statutory Accounting Practices, Statutory Capital and Surplus Including Contingency Reserve Debt issuance costs Debt Issuance Costs, Gross Statement [Line Items] Statement [Line Items] Corporate Headquarters and Data Facility Lease 2 Corporate Headquarters and Data Facility Lease 2 [Member] Corporate Headquarters and Data Facility Lease 2 Share Repurchases Stockholders' Equity, Policy [Policy Text Block] Other revenues Other Income Ceded claims and claim expenses Reinsurance Ceded Claims and Claims Expenses Reinsurance Ceded Claims and Claims Expenses Liabilities Liabilities [Abstract] Fixed maturities, available-for-sale, at fair value (amortized cost of $2,111,869 and $2,078,773 as of March 31, 2022 and December 31, 2021, respectively) Fair Value Fair Value Fair value of securities Debt Securities, Available-for-sale Short-term investments Short-term Investments [Member] Counterparty Name [Domain] Counterparty Name [Domain] Deferred policy acquisition costs, net Increase (Decrease) in Deferred Policy Acquisition Costs 2026 Lessee, Operating Lease, Liability, to be Paid, Year Four Earnings per Share, Basic [Abstract] Net Income (Loss) Available to Common Stockholders, Operations, Basic [Abstract] Reinsurance coverage, term of underlying mortgage amortization (in years) Reinsurance Retention Policy, Term Of Underlying Mortgage Amortization Reinsurance Retention Policy, Term Of Underlying Mortgage Amortization Debt Disclosure [Abstract] Debt Disclosure [Abstract] Warrant liability Warrant Liability Warrant Liability Income before income taxes Income (Loss) from Continuing Operations before Income Taxes, Noncontrolling Interest Significant Other Observable Inputs (Level 2) Fair Value, Inputs, Level 2 [Member] After March 1, 2025 After March 1, 2025 [Member] After March 1, 2025 Dividend yield Measurement Input, Expected Dividend Rate [Member] Fair Value Debt Securities, Available-for-sale, Unrealized Loss Position 2017 ILN transaction Two Thousand Seventeen ILN Transaction [Member] Two Thousand Seventeen ILN Transaction [Member] Percent of aggregate balance redeemable with equity offerings Debt Instrument, Redemption Price, Percentage Of Principal Amount, Redeemable Debt Instrument, Redemption Price, Percentage Of Principal Amount, Redeemable Debt securities, amortized cost Amortized Cost Debt Securities, Available-for-sale, Amortized Cost Purchase of short-term investments Payments to Acquire Short-term Investments 2018 ILN transaction Two Thousand Eighteen ILN Transaction [Member] Two Thousand Eighteen ILN Transaction [Member] Schedule of earnings per share, basic and diluted Schedule of Earnings Per Share, Basic and Diluted [Table Text Block] Other comprehensive loss, net of tax Other Comprehensive Income (Loss), Net of Tax, Portion Attributable to Parent Forecast Forecast [Member] Net premiums earned Premiums Earned, Net [Abstract] Title of 12(b) Security Title of 12(b) Security 2020-2 ILN Transaction 2020-2 ILN [Member] 2020-2 ILN Schedule of ILN transactions Schedule Of Respective Coverages And Retentions Of The ILN Transactions [Table Text Block] Schedule of respective coverages and retentions of the ILN transactions [Table Text Block] Total assets Assets Tax and loss bonds Tax And Loss Bond Tax And Loss Bond Earnings per Share, Diluted [Abstract] Net Income (Loss) Available to Common Stockholders, Operations, Diluted [Abstract] Deferred income taxes Deferred Income Taxes and Tax Credits Asset-backed securities Debt Securities, Available-for-sale, Maturity, without Single Maturity Date, Amortized Cost Common stock, authorized (in shares) Common Stock, Shares Authorized Common stock price Measurement Input, Share Price [Member] Document Type Document Type Reconciliation of liability for insurance claims and (benefits) claim expenses Schedule of Liability for Unpaid Claims and Claims Adjustment Expense [Table Text Block] Statutory Accounting Practices [Table] Statutory Accounting Practices [Table] Stated interest rate (in percent) Debt Instrument, Interest Rate, Stated Percentage Operating lease option to renew, term Lessee, Operating Lease, Renewal Term Net premiums earned Net premiums earned Premiums Earned, Net Prepaid reinsurance premiums Prepaid Reinsurance Premiums 2020-1 ILN Transaction (5) 2020-1 ILN [Member] 2020-1 ILN Revolving credit facility Revolving Credit Facility [Member] Measurement Frequency [Axis] Measurement Frequency [Axis] Net cash provided by operating activities Net Cash Provided by (Used in) Operating Activities Reclassification adjustment for realized gains included in net income, net of tax expense $86 for the quarter ended March 31, 2022 Other Comprehensive Income (Loss), Reclassification Adjustment from AOCI for Sale of Securities, Net of Tax Number of loans in pool past due 60 days or more Loans In Pool, Past Due 60 Days Or More, Number Of Loans Loans In Pool, Past Due 60 Days Or More, Number Of Loans Percentage of ceding commission received Ceded Credit Risk, Commission Earned, Percentage Ceded Credit Risk, Commission Earned, Percentage Fair Value, Recurring and Nonrecurring [Table] Fair Value, Recurring and Nonrecurring [Table] Summary of Right-of-Use Asset and Lease Liability Activity and Assumptions Lease, Cost [Table Text Block] Schedule of Long-term Debt Instruments [Table] Schedule of Long-term Debt Instruments [Table] Subsequent Event [Line Items] Subsequent Event [Line Items] Basic (in shares) Basic weighted average shares outstanding (in shares) Weighted Average Number of Shares Outstanding, Basic Diluted (in dollars per share) Diluted earnings per share (in dollars per share) Earnings Per Share, Diluted Premium Receivable Premiums Receivable Note [Text Block] Amortization of debt discount and debt issuance costs Amortization of Debt Issuance Costs and Discounts Dilutive effect of issuable shares (in shares) Weighted Average Number Diluted Shares Outstanding Adjustment Income taxes refunded Income Taxes Paid, Net Risk written policies in 2019 Eligible Policies, Pool Five [Member] Eligible Policies, Pool Five [Member] Subsequent Event Subsequent Events [Text Block] Comprehensive (loss) income Comprehensive Income (Loss), Net of Tax, Attributable to Parent Threshold for loss ratio on loans to qualify for profit commission Ceded Credit Risk, Profit Commission, Loss Ratio On Loans Threshold Ceded Credit Risk, Profit Commission, Loss Ratio On Loans Threshold Previously ceded primary RIF recaptured Previously Ceded Primary Risk-In-Force Recaptured Previously Ceded Primary Risk-In-Force Recaptured Net cash used in financing activities Net Cash Provided by (Used in) Financing Activities Treasury Stock, at cost, 235,344 and 0 common shares as of March 31, 2022 and December 31, 2021, respectively Treasury Stock, Value Deferred tax liability, net Deferred Income Tax Liabilities, Net Ceded Ceded Premiums Written QSR transactions QSR Transactions [Member] QSR Transactions [Member] Common stock: class A shares issued related to warrant exercises (in shares) Stock issued upon exercise of warrants (in shares) Stock Issued During Period, Shares, Conversion of Convertible Securities Underwriting and operating expenses Other Cost and Expense, Operating 2021 QSR Transaction 2021 QSR Transaction [Member] 2021 QSR Transaction Corporate debt securities Corporate debt securities Corporate Debt Securities [Member] Fair Value of Financial Instruments Fair Value Disclosures [Text Block] Re One Re One [Member] Re One Ceded risk-in-force Risk In Force, Ceded Risk In Force, Ceded Accumulated Other Comprehensive Income AOCI Attributable to Parent [Member] Risk written policies in 2022 Eligible Policies, Pool Eight [Member] Eligible Policies, Pool Eight Other assets Other Assets Common stock, outstanding (in shares) Common Stock, Shares, Outstanding Financial Instruments [Domain] Financial Instruments [Domain] Revenues Revenues [Abstract] Document Period End Date Document Period End Date Number of securities, less than 12 months Debt Securities, Available-for-sale, Continuous Unrealized Loss Position, Less than 12 Months, Number of Positions Percentage of population with production prior to period start date Reinsurance Coverage, Percentage Of Population With Production Prior to Period Start Date Reinsurance Coverage, Percentage Of Population With Production Prior to Period Start Date Entity Central Index Key Entity Central Index Key Change in unrealized investment gains/losses, net of tax benefit/expense OCI, Debt Securities, Available-for-Sale, Gain (Loss), after Adjustment and Tax Corporate Headquarters Corporate Headquarters [Member] Corporate Headquarters [Member] Common stock: class A shares issued under stock plans, net of shares withheld for employee taxes (in shares) Stock Issued During Period, Shares, Employee Stock Purchase Plans, Net of Shares For Tax Withholdings Stock Issued During Period, Shares, Employee Stock Purchase Plans, Net of Shares For Tax Withholdings Premium receivable, allowance for credit loss, writeoff Premium Receivable, Allowance for Credit Loss, Writeoff Accrued investment income Accrued Investment Income Receivable Debt Securities, Available-for-sale [Table] Debt Securities, Available-for-sale [Table] Net investment income Net Investment Income Number of operating leases related to corporate headquarters and data center facility Number Of Operating Leases, Corporate Office And Data Center Facility Number Of Operating Leases, Corporate Office And Data Center Facility Schedule of investments by industry group Investments Classified By Issuer Industry Group [Table Text Block] Investments Classified By Issuer Industry Group [Table Text Block] Software and equipment, net Property, Plant and Equipment, Net Default percent (in percent) Liability For Unpaid Claims And Claims Adjustment Expense, Incurred But Not Reported (IBNR) Claims, Number Of Primary Loans In Default, Percent Of Total Policies In-Force Liability For Unpaid Claims And Claims Adjustment Expense, Incurred But Not Reported (IBNR) Claims, Number Of Primary Loans In Default, Percent Of Total Policies In-Force Repurchased shares (in shares) Treasury Stock, Shares, Acquired Debt Instrument [Line Items] Debt Instrument [Line Items] Trading Symbol Trading Symbol Earnings Per Share [Abstract] Earnings Per Share [Abstract] Number of claims paid Liability for Paid Claims and Claims Adjustment Expense, Number of Paid Claims Liability for Paid Claims and Claims Adjustment Expense, Number of Paid Claims Unrealized loss position, accumulated loss Unrealized Losses Debt Securities, Available-for-sale, Unrealized Loss Position, Accumulated Loss Total revenues Revenues Exercise price of warrants (in dollars per warrant) Class of Warrant or Right, Exercise Price of Warrants or Rights Deferred Compensation Arrangement with Individual, Excluding Share-based Payments and Postretirement Benefits [Line Items] Deferred Compensation Arrangement with Individual, Excluding Share-based Payments and Postretirement Benefits [Line Items] Warrant liability Warrant [Member] Expenses Costs and Expenses [Abstract] Warrant liability, expected life Warrants contract term Warrants and Rights Outstanding, Term Number of securities, total Debt Securities, Available-for-sale, Unrealized Loss Position, Number of Positions Intangible assets and goodwill Intangible Assets, Net (Including Goodwill) Entity Current Reporting Status Entity Current Reporting Status Fair value of warrant liability reclassified to additional paid in capital upon exercise Class Of Warrant Or Right, Fair Value Of Warrant Liability Reclassified To Additional Paid In Capital Upon Exercise Class Of Warrant Or Right, Fair Value Of Warrant Liability Reclassified To Additional Paid In Capital Upon Exercise Net premiums written Premiums Written, Net Risk free interest rate Measurement Input, Risk Free Interest Rate [Member] Earnings per share Earnings Per Share, Basic and Diluted [Abstract] Effective income tax rate on pre-tax income or loss Effective Income Tax Rate Reconciliation, Percent Communications Communications, Industry Group [Member] Communications, Industry Group [Member] Net amortization of premium on investment securities Accretion (Amortization) of Discounts and Premiums, Investments Counterparty Name [Axis] Counterparty Name [Axis] Liability for Claims and Claims Adjustment Expense [Table] Liability for Claims and Claims Adjustment Expense [Table] Applicable premium Debt Instrument, Covenant Terms, Applicable Premium Debt Instrument, Covenant Terms, Applicable Premium Cash and cash equivalents (including restricted cash of $3,057 and $3,165 as of March 31, 2022 and December 31, 2021, respectively) Cash, cash equivalents and restricted cash, beginning of period Cash, cash equivalents and restricted cash, end of period Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents Common stock, par value (in dollars per share) Common Stock, Par or Stated Value Per Share Leases [Abstract] Leases [Abstract] Cash, cash equivalents and short-term investments Cash and Cash Equivalents, Fair Value Disclosure Reserve for insurance claims and claim expenses Total gross liability for unpaid claims and claim adjustment expenses Beginning balance Ending balance Liability for Claims and Claims Adjustment Expense Entity Address, Postal Zip Code Entity Address, Postal Zip Code Diluted (in shares) Dilutive weighted average shares outstanding (in shares) Weighted Average Number of Shares Outstanding, Diluted Warrant liability, at fair value Warrants and Rights Outstanding Recurring Fair Value, Recurring [Member] Aggregate dividend capacity Statutory Accounting Practices, Statutory Amount Available for Dividend Payments Income Taxes Income Tax Disclosure [Text Block] Fannie Mae Fannie Mae [Member] Fannie Mae [Member] Investment Income, Net [Abstract] Investment Income, Net [Abstract] Cash and investments held with various state insurance departments Cash, Cash Equivalents, and Short-term Investments Long-term Debt, Type [Axis] Long-term Debt, Type [Axis] Basis spread on variable rate (in percent) Debt Instrument, Basis Spread on Variable Rate Due in one year or less Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling within One Year, Amortized Cost Stockholders' Equity Stockholders' Equity Note Disclosure [Text Block] Total claims and claim (benefits) expenses incurred Liability for Unpaid Claims and Claims Adjustment Expense, Incurred Claims Ceded Credit Risk [Table] Ceded Credit Risk [Table] Investment expenses Investment Income, Investment Expense Statement of Cash Flows [Abstract] Statement of Cash Flows [Abstract] Name of Property [Axis] Name of Property [Axis] Credit Facility [Axis] Credit Facility [Axis] Entity Address, Address Line One Entity Address, Address Line One Net cash used in investing activities Net Cash Provided by (Used in) Investing Activities Remaining deferred issuance costs, net of accumulated amortization Debt Issuance Costs, Line of Credit Arrangements, Net Cash flows from operating activities Net Cash Provided by (Used in) Operating Activities [Abstract] Reserve for prior year insurance claims and claim expenses Liability for Prior Year Claims and Claims Adjustment Expense Liability for Prior Year Claims and Claims Adjustment Expense Debt Securities By Industry [Domain] Debt Securities By Industry [Domain] [Domain] for Debt Securities By Industry [Axis] Entity Shell Company Entity Shell Company Deferred policy acquisition costs, net Deferred Policy Acquisition Cost Current Reinsurance Coverage Current Reinsurance Coverage Current Reinsurance Coverage Taxes paid related to net share settlement of equity awards Payment, Tax Withholding, Share-based Payment Arrangement Credit facility borrowing capacity Line of Credit Facility, Maximum Borrowing Capacity Current Fiscal Year End Date Current Fiscal Year End Date Debt Instrument, Name [Domain] Debt Instrument, Name [Domain] Schedule of fair value measurements of financial instruments Fair Value Measurements, Recurring and Nonrecurring [Table Text Block] Number of days to be written off Premium Receivable, Number of Days to be Written Off Premium Receivable, Number of Days to be Written Off Statement [Table] Statement [Table] Total claims and claim expenses paid Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid Reinsurance balances, net Increase (Decrease) in Reinsurance Assets and Liabilities Increase (Decrease) in Reinsurance Assets and Liabilities Schedule of components of net investment income Investment Income [Table Text Block] Asset-backed securities Asset-backed securities Asset-backed Securities [Member] Recent Accounting Pronouncements New Accounting Pronouncements, Policy [Policy Text Block] Number of securities,12 months or greater Debt Securities, Available-for-sale, Continuous Unrealized Loss Position, 12 Months or Longer, Number of Positions Debt Instrument, Redemption, Period [Domain] Debt Instrument, Redemption, Period [Domain] Statistical Measurement [Axis] Statistical Measurement [Axis] Subsequent Event Subsequent Event [Member] Initial Reinsurance Coverage Initial Reinsurance Coverage Initial Reinsurance Coverage Financial Financial, Industry Group [Member] Financial, Industry Group [Member] 2018 QSR transaction Two Thousand Eighteen QSR Transaction [Member] Two Thousand Eighteen QSR Transaction [Member] Depreciation and amortization Depreciation, Amortization and Accretion, Net Profit commission Reinsurance Profit Commission Reinsurance Profit Commission Risk written policies in 2018 Eligible Policies, Pool Four [Member] Eligible Policies, Pool Four [Member] Schedule of key inputs and assumptions in option-pricing model Fair Value Measurement Inputs and Valuation Techniques [Table Text Block] Unrealized losses, less than 12 months Debt Securities, Available-for-sale, Continuous Unrealized Loss Position, Less than 12 Months, Accumulated Loss 2016 QSR transaction Two Thousand Sixteen QSR Transaction [Member] Two Thousand Sixteen QSR Transaction [Member] Risk written policies in 2021 Eligible Policies, Pool Seven [Member] Eligible Policies, Pool Seven Warrant liability, measurement input Warrants and Rights Outstanding, Measurement Input Name of Property [Domain] Name of Property [Domain] Service expenses Other Nonoperating Expense Scenario [Domain] Scenario [Domain] Adjustments to reconcile net income to net cash provided by operating activities: Adjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract] Subsequent Event Type [Axis] Subsequent Event Type [Axis] Common Stock, Value, Outstanding Common Stock, Value, Outstanding 2019 ILN Transaction 2019 ILN [Member] 2019 ILN [Member] Debt Instrument, Redemption, Period [Axis] Debt Instrument, Redemption, Period [Axis] Unrealized loss position, 12 months or greater Unrealized losses, 12 months or greater Debt Securities, Available-for-sale, Continuous Unrealized Loss Position, 12 Months or Longer, Accumulated Loss Current year Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid, Current Year Senior secured notes Senior Notes