Deferred income taxes Deferred Income Taxes and Tax Credits Variable Rate [Domain] Variable Rate [Domain] 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 Gain (Loss) on Change in Fair Value of Warrant Liability Gain (Loss) on Change in Fair Value of Warrant Liability 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 Statistical Measurement [Domain] Statistical Measurement [Domain] Credit facility borrowing capacity Line of Credit Facility, Maximum Borrowing Capacity Loan-to-value ratio (less than) Loans In Pool, Loan To Value Ratio Loans In Pool, Loan To Value Ratio 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 Debt Debt Disclosure [Text Block] Statement of Stockholders' Equity [Abstract] Statement of Stockholders' Equity [Abstract] Investments, Debt and Equity Securities [Abstract] Investments, Debt and Equity Securities [Abstract] Revolving credit facility Revolving Credit Facility [Member] Deferred tax liability, net Deferred Income Tax Liabilities, Net Asset-backed securities Debt Securities, Available-for-Sale, Maturity, without Single Maturity Date, Fair Value Corporate debt securities Corporate debt securities Corporate Debt Securities [Member] Due after ten years Debt Securities, Available-for-Sale, Maturity, Allocated and Single Maturity Date, Rolling after 10 Years, Fair Value Commitments and contingencies Commitments and Contingencies Stockholders' Equity Equity [Text Block] Number of covered claims included in number of claims paid | claim Liability for Paid Claims and Claims Adjustment Expense, Number of Covered Claims Included In Number of Paid Claims Liability for Paid Claims and Claims Adjustment Expense, Number of Covered Claims Included In Number of Paid Claims Income Taxes Income Tax Disclosure [Text Block] Organization, Basis of Presentation and Summary of Accounting Principles Business Description and Basis of Presentation [Text Block] 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 Statutory Accounting Practices [Table] Statutory Accounting Practices [Table] 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 Unearned premiums Increase (Decrease) in Unearned Premiums Subsequent Event Type [Domain] Subsequent Event Type [Domain] Fair Value, Recurring and Nonrecurring [Table] Fair Value, Recurring and Nonrecurring [Table] Diluted (in dollars per share) Diluted earnings per share (in dollars per share) Earnings Per Share, Diluted Debt Secured Debt Significant Unobservable Inputs (Level 3) Fair Value, Inputs, Level 3 [Member] Treasury stock, common shares (in shares) Treasury Stock, Common, Shares Current first layer retained loss Current First Layer Retained Loss Current First Layer Retained Loss Utilities Utilities, Industry Group [Member] Utilities, Industry Group [Member] Trading Symbol Trading Symbol 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. Investment income Investment Income, Interest and Dividend Fair value of long term debt Long-Term Debt, Fair Value Change in unrealized investment gains/losses, tax expense (benefit) OCI, Debt Securities, Available-for-Sale, Gain (Loss), after Adjustment, Tax Net income Net income Net income Net Income (Loss) Secured overnight financing rate Secured Overnight Financing Rate (SOFR) Overnight Index Swap Rate [Member] Fair Value Disclosures [Abstract] Fair Value Disclosures [Abstract] Variable rate floor (in percent) Debt Instrument, Variable Interest Rate Floor Debt Instrument, Variable Interest Rate Floor Deferred policy acquisition costs, net Deferred Policy Acquisition Cost Debt Instrument, Redemption, Period [Axis] Debt Instrument, Redemption, Period [Axis] Investments Investments in Debt and Marketable Equity Securities (and Certain Trading Assets) Disclosure [Text Block] Shareholders' equity Equity, Attributable to Parent [Abstract] Gross unrealized losses Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Loss, before Tax Reinsurance coverage amount Reinsurance Retention Policy, Ceded Aggregate Premiums Reinsurance Retention Policy, Ceded Aggregate Premiums Schedule of Earnings Per Share, Basic and Diluted Schedule of Earnings Per Share, Basic and Diluted [Table Text Block] Premiums Receivable Premiums Receivable, Basis of Accounting, Policy [Policy Text Block] Ceded Ceded Premiums Written Quoted Prices in Active Markets for Identical Assets (Level 1) Fair Value, Inputs, Level 1 [Member] Purchase of short-term investments Payments to Acquire Short-Term Investments Equity Components [Axis] Equity Components [Axis] Financial Instruments [Domain] Financial Instruments [Domain] Current year Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid, Current Year Entity Small Business Entity Small Business Prior years Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid, Prior Years Local Phone Number Local Phone Number Diluted net income Net Income (Loss) Attributable to Parent, Diluted Unrealized (losses) gains in accumulated other comprehensive (loss) income, net of tax (benefit) expense of $(4,120) and $(17,004) for the three months ended June 30, 2023 and 2022, and $4,513 and $(43,180) for the six months ended June 30, 2023 and 2022, respectively OCI, Debt Securities, Available-for-Sale, Unrealized Holding Gain (Loss), before Adjustment, after Tax Measurement Frequency [Axis] Measurement Frequency [Axis] Claims and claim expenses (benefits) incurred: Liability for Unpaid Claims and Claims Adjustment Expense, Incurred Claims [Abstract] 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 Schedule of Investments by Maturity Investments Classified by Contractual Maturity Date [Table Text Block] 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] Debt Instrument, Name [Domain] Debt Instrument, Name [Domain] Ceded Credit Risk, Reinsurer [Axis] Reinsurer, Name [Axis] Accrued investment income Accrued Investment Income Receivable Intangible assets and goodwill Intangible Assets, Net (Including Goodwill) Dilutive effect of issuable shares (in shares) Weighted Average Number of Shares Outstanding, Diluted, Adjustment Total revenues Revenues 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. Beginning balance, net of reinsurance recoverables Reserve at end of period, net of reinsurance recoverables Liability for Unpaid Claims and Claims Adjustment Expense, Net Change in unrealized investment gains/losses, net of tax benefit/expense Other Comprehensive Income (Loss), Available-for-Sale Securities Adjustment, Net of Tax, Portion Attributable to Parent Cash flows from investing activities Net Cash Provided by (Used in) Investing Activities [Abstract] Number of excess-of-loss reinsurance agreements Number of Excess-of-Loss Reinsurance Agreements Number of Excess-of-Loss Reinsurance Agreements Anti-dilutive shares (in shares) Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount Document Quarterly Report Document Quarterly Report Reinsurance Policy, Type [Axis] Reinsurance Contract [Axis] Interest expense Interest Expense 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 Total claims and claim expenses paid Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid Fair Value Hierarchy and NAV [Domain] Fair Value Hierarchy and NAV [Domain] Net premiums earned Premiums Earned, Net [Abstract] 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 NMIC and Re One combined NMic and Re one Combined [Member] NMic and Re one Combined [Member] Ceding commission earned Reinsurance Ceding Commission Earned Reinsurance Ceding Commission Earned Long-term Debt, Type [Domain] Long-Term Debt, Type [Domain] Entity File Number Entity File Number Amount reinsured Reinsurance, Excess Retention, Amount Reinsured, Per Event 2018 Term loan Senior Secured Term Loan 2018 [Member] Senior Secured Term Loan 2018 [Member] Proceeds from redemptions, maturities and sale of fixed-maturity investments, available-for-sale Proceeds from Sale and Maturity of Debt Securities, Available-for-Sale Entity Shell Company Entity Shell Company Unearned premiums Unearned Premiums Recent Accounting Pronouncements - Adopted and Not Yet Adopted New Accounting Pronouncements, Policy [Policy Text Block] 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. Shares repurchased, average price per share (in dollars per share) Shares Acquired, Average Cost Per Share 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 Counterparty Name [Domain] Counterparty Name [Domain] Cash and cash equivalents (including restricted cash of $2,222 and $2,176 as of June 30, 2023 and December 31, 2022, 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 Insurance [Abstract] Insurance [Abstract] Accounts payable and accrued expenses Accounts Payable and Accrued Liabilities Premiums receivable Increase (Decrease) in Premiums Receivable Weighted average common shares outstanding Weighted Average Number of Shares Outstanding Reconciliation [Abstract] Fair value, 12 months or greater Debt Securities, Available-for-Sale, Continuous Unrealized Loss Position, 12 Months or Longer Common stock, issued (in shares) Common Stock, Shares, Issued Treasury Stock, at cost: 4,635,267 and 2,922,863 common shares as of June 30, 2023 and December 31, 2022, respectively Treasury Stock, Common, Value Security Exchange Name Security Exchange Name Ceded Credit Risk, Reinsurer [Domain] Reinsurer, Name [Domain] Total assets Assets, Fair Value Disclosure Carried cost Long-Term Debt Unrealized loss position, accumulated loss Unrealized Losses Debt Securities, Available-for-Sale, Unrealized Loss Position, Accumulated Loss Number of securities,12 months or greater Debt Securities, Available-for-Sale, Continuous Unrealized Loss Position, 12 Months or Longer, Number of Positions Accumulated other comprehensive loss, net of tax Accumulated Other Comprehensive Income (Loss), Net of Tax Payment of ordinary dividends Payments of Ordinary Dividends Total expenses Costs and Expenses Maximum Maximum [Member] Comprehensive income (loss) Comprehensive Income (Loss), Net of Tax, Attributable to Parent Depreciation and amortization Depreciation, Amortization and Accretion, Net Document Type Document Type Service expenses Other Nonoperating Expense Entity Address, Address Line One Entity Address, Address Line One Repurchase of common stock Treasury Stock, Value, Acquired, Cost Method Subsequent Event [Table] Subsequent Event [Table] Schedule of Net Realized Investment Gains (Losses) Realized Gain (Loss) on Investments [Table Text Block] Basis of Presentation Basis of Accounting, Policy [Policy Text Block] Purchase of fixed-maturity investments, available-for-sale Payments to Acquire Debt Securities, Available-for-Sale 2020 Revolving credit facility Secured Revolving Credit Facility 2020 [Member] Secured Revolving Credit Facility 2020 Statutory Accounting Practices [Line Items] Statutory Accounting Practices [Line Items] Schedule of XOL Transactions Schedule Of Respective Coverages And Retentions Of The XOL Transactions [Table Text Block] Schedule Of Respective Coverages And Retentions Of The XOL Transactions Subsequent Event Subsequent Event [Member] Debt Securities By Industry [Axis] Debt Securities By Industry [Axis] Debt Securities By Industry [Axis] 2021 Revolving credit facility Secured Revolving Credit Facility 2021 [Member] Secured Revolving Credit Facility 2021 Variable Rate [Axis] Variable Rate [Axis] Accounts payable and accrued expenses Increase (Decrease) in Accounts Payable and Accrued Liabilities Income Statement [Abstract] Income Statement [Abstract] Expenses Costs and Expenses [Abstract] Net investment income Net Investment Income Title of 12(b) Security Title of 12(b) Security Cash, cash equivalents and short-term investments Cash and Cash Equivalents, Fair Value Disclosure Anticipated payment related to annual operating expenses Anticipated Operating Expense Payments, Annual Amount of anticipated payments related to operating expenses of counterparty. Corporate debt securities as component of total (percent) Debt Securities, Corporate, Component Of Total. Percentage Debt Securities, Corporate, Component Of Total. Percentage Income Tax Disclosure [Abstract] Income Tax Disclosure [Abstract] Schedule of Reconciliation of Liability for Insurance Claims and (benefits) Claim Expenses Schedule of Liability for Unpaid Claims and Claims Adjustment Expense [Table Text Block] Unrealized (losses) gains in accumulated other comprehensive (loss) income (loss), tax (benefit) expense OCI, Debt Securities, Available-for-Sale, Unrealized Holding Gain (Loss), before Adjustment, Tax Reinsurance Reinsurance [Text Block] Entity Tax Identification Number Entity Tax Identification Number Statistical Measurement [Axis] Statistical Measurement [Axis] Financial Instrument [Axis] Financial Instrument [Axis] Entity Interactive Data Current Entity Interactive Data Current Debt Securities, Available-for-sale [Table] Debt Securities, Available-for-Sale [Table] Repurchases of common stock Payments for Repurchase of Common Stock Entity Common Stock, Shares Outstanding (in shares) Entity Common Stock, Shares Outstanding 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 Due in one year or less Debt Securities, Available-for-Sale, Maturity, Allocated and Single Maturity Date, Rolling within One Year, Fair Value Fair Value Hierarchy and NAV [Axis] Fair Value Hierarchy and NAV [Axis] Reinsurance recoverable Reinsurance Recoverables, Gross 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 Number of reinsurance engagements terminated Number of Reinsurance Engagements Terminated Number of Reinsurance Engagements Terminated Retained earnings Retained Earnings (Accumulated Deficit) Commitments and Contingencies Disclosure [Abstract] Net premiums written Premiums Written, Net [Abstract] Regulatory Information Insurance Disclosure [Text Block] Proceeds from maturity of short-term investments Proceeds from Sale of Short-Term Investments Debt instrument face amount Debt Instrument, Face Amount Entity Incorporation, State or Country Code Entity Incorporation, State or Country Code Prior years Prior Year Claims and Claims Adjustment Expense Entity Address, State or Province Entity Address, State or Province Counterparty Name [Axis] Counterparty Name [Axis] Cash flows from operating activities Net Cash Provided by (Used in) Operating Activities [Abstract] Initial First Layer Retained Loss Initial First Layer Retained Loss Initial First Layer Retained Loss Consumer Consumer, Industry Group [Member] Consumer, Industry Group [Member] Second layer amount reinsured Reinsurance Retention Policy, Excess Retention, Second Layer Amount Reinsured Reinsurance Retention Policy, Excess Retention, Second Layer Amount Reinsured Common stock, outstanding (in shares) Common Stock, Shares, Outstanding Deductible on policy Mortgage Pool Insurance, Claim Deductible Mortgage Pool Insurance, Claim Deductible Underwriting and operating expenses Other Cost and Expense, Operating 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 Prior to March 1, 2025 Prior To March 1, 2025 [Member] Prior To March 1, 2025 Beginning balance (in shares) Ending balance (in shares) Shares, Outstanding Liability for Claims and Claims Adjustment Expense [Line Items] Liability for Claims and Claims Adjustment Expense [Line Items] Risk premiums paid Reinsurance Retention, Risk Premiums Paid Reinsurance Retention, Risk Premiums Paid Common stock, par value (in dollars per share) Common Stock, Par or Stated Value Per Share Reclassification adjustment for realized gains (losses) included in net income, tax (benefit) expense Other Comprehensive Income (Loss), Reclassification Adjustment from AOCI for Sale of Securities, Tax Net cash used in investing activities Net Cash Provided by (Used in) Investing Activities 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 Debt Instrument [Axis] Debt Instrument [Axis] Number of securities, total Debt Securities, Available-for-Sale, Unrealized Loss Position, Number of Positions Effective income tax rate on pre-tax income or loss Effective Income Tax Rate Reconciliation, Percent Credit Facility [Axis] Credit Facility [Axis] 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 Total liabilities Liabilities Other assets Increase (Decrease) in Prepaid Expense and Other Assets Accumulated Other Comprehensive Loss AOCI Attributable to Parent [Member] Fair Value Debt Securities, Available-for-Sale, Unrealized Loss Position Cash and investments held with various state insurance departments Cash, Cash Equivalents, and Short-Term Investments Accrued investment income Increase (Decrease) in Accrued Investment Income Receivable Measurement Frequency [Domain] Measurement Frequency [Domain] Due after five through ten years Debt Securities, Available-for-Sale, Maturity, Allocated and Single Maturity Date, Rolling after 5 through 10 Years, Amortized Cost Industrial Industrial, Industry Group [Member] Industrial, Industry Group [Member] Amortized Cost Debt Securities, Available-for-Sale, Maturity, Allocated and Single Maturity Date, Amortized Cost, Rolling Maturity [Abstract] Percent of premiums earned under 2018 QSR Transaction Premiums Earned, Percent Of Risk Premiums Earned, Percent Of Risk Debt Disclosure [Abstract] Debt Disclosure [Abstract] Liability for Claims and Claims Adjustment Expense [Table] Liability for Claims and Claims Adjustment Expense [Table] Earnings Per Share [Abstract] Earnings Per Share [Abstract] Subsequent Event [Line Items] Subsequent Event [Line Items] Redemption price (in percent) Debt Instrument, Redemption Price, Percentage Fair value, less than 12 months Debt Securities, Available-for-Sale, Continuous Unrealized Loss Position, Less than 12 Months Organization, Consolidation and Presentation of Financial Statements [Abstract] Organization, Consolidation and Presentation of Financial Statements [Abstract] Investment Income, Net [Abstract] Investment Income, Net [Abstract] Senior debt Senior Notes [Member] Net investment income Investment Income, Net Interest payable Interest Payable Restricted cash Restricted Cash Supplemental disclosures of cash flow information Supplemental Cash Flow Information [Abstract] Entity Filer Category Entity Filer Category Statement [Table] Statement [Table] Other liabilities Other Liabilities Ceded Credit Risk [Line Items] Ceded Credit Risk [Line Items] Current Fiscal Year End Date Current Fiscal Year End Date Earnings Per Share Earnings Per Share, Policy [Policy Text Block] Repurchase authorization Stock Repurchase Program, Authorized Amount 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] Base rate Base Rate [Member] 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] Asset-backed securities Asset-backed securities Asset-Backed Securities [Member] Risk-to-capital 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). Net cash provided by operating activities Net Cash Provided by (Used in) Operating Activities Other revenues Other Income Net premiums written Premiums Written, Net Debt Issuance costs Debt Issuance Costs, Line of Credit Arrangements, Gross 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] Stated interest rate (in percent) Debt Instrument, Interest Rate, Stated Percentage Due in one year or less Debt Securities, Available-for-Sale, Maturity, Allocated and Single Maturity Date, Rolling within One Year, Amortized Cost Statement of Financial Position [Abstract] Statement of Financial Position [Abstract] Proceeds from issuance of common stock related to warrant exercises Proceeds from Warrant Exercises Statutory surplus Statutory Accounting Practices, Statutory Capital and Surplus, Balance Total shareholders' equity Beginning balance Ending balance Equity, Attributable to Parent Gross realized investment gains Debt Securities, Available-for-Sale, Realized Gain Insurance claims and claim expenses (benefits) Policyholder Benefits and Claims Incurred, Net Net premiums earned Net premiums earned Premiums Earned, Net Current year case reserves Current Year Claims and Claims Adjustment Expense, Case Reserves Current Year Claims and Claims Adjustment Expense, Case Reserves Due after ten years Debt Securities, Available-for-Sale, Maturity, Allocated and Single Maturity Date, Rolling after 10 Years, Amortized Cost Commitment fees in interest expense Line of Credit Facility, Commitment Fee Amount Subsequent Events [Abstract] Income before income taxes Income (Loss) from Continuing Operations before Income Taxes, Noncontrolling Interest Municipal debt securities Municipal debt securities US States and Political Subdivisions Debt Securities [Member] Common stock: class A shares issued related to warrant exercises (in shares) Stock Issued During Period, Shares, Conversion of Convertible Securities Statutory capital Statutory capital Statutory Accounting Practices, Statutory Capital and Surplus Including Contingency Reserve Statutory Accounting Practices, Statutory Capital and Surplus Including Contingency Reserve Significant Other Observable Inputs (Level 2) Fair Value, Inputs, Level 2 [Member] Current year Current Year Claims and Claims Adjustment Expense 2022 Extended Share Repurchase Program 2022 Extended Share Repurchase Program [Member] 2022 Extended Share Repurchase Program Entity Emerging Growth Company Entity Emerging Growth Company Remaining deferred issuance costs, net of accumulated amortization Debt Issuance Costs, Line of Credit Arrangements, Net Ceded claims and claim expenses (benefits) Reinsurance Ceded Claims and Claims Expenses Reinsurance Ceded Claims and Claims Expenses Basic EPS Net Income (Loss) Available to Common Stockholders, Basic, Operations [Abstract] Effective interest rate (in percent) Debt Instrument, Interest Rate, Effective Percentage Increase (Decrease) in Stockholders' Equity [Roll Forward] Increase (Decrease) in Stockholders' Equity [Roll Forward] 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 Document Fiscal Period Focus Document Fiscal Period Focus July 2023 Share Repurchase Program July 2023 Share Repurchase Program [Member] July 2023 Share Repurchase Program Deferred policy acquisition costs, net Increase (Decrease) in Deferred Policy Acquisition Costs Earnings per share Earnings Per Share, Basic And Diluted EPS [Abstract] Earnings Per Share, Basic And Diluted EPS After March 1, 2025 After March 1, 2025 [Member] After March 1, 2025 Share-based compensation expense Share-Based Payment Arrangement, Noncash Expense Common Stock - Class A Common Stock [Member] Diluted EPS Net Income (Loss) Available to Common Stockholders, Diluted, Operations [Abstract] Aggregate dividend capacity Statutory Accounting Practices, Statutory Amount Available for Dividend Payments City Area Code City Area Code Entity Address, Postal Zip Code Entity Address, Postal Zip Code Earnings per Share (EPS) Earnings Per Share [Text Block] Prepaid federal income taxes Prepaid Federal Income Taxes Prepaid Federal Income Taxes Fair Value Debt Securities, Available-for-Sale, Maturity, Allocated and Single Maturity Date, Fair Value [Abstract] Reserves for Insurance Claims and Claim Expenses Liability for Future Policy Benefits and Unpaid Claims Disclosure [Text Block] Schedule of Fair Value Measurements of Financial Instruments Fair Value Measurements, Recurring and Nonrecurring [Table Text Block] Document Fiscal Year Focus Document Fiscal Year Focus 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] Minimum Minimum [Member] Software and equipment, net Property, Plant and Equipment, Net Share Repurchase Program [Domain] Share Repurchase Program [Domain] Due after five through ten years Debt Securities, Available-for-Sale, Maturity, Allocated and Single Maturity Date, Rolling after 5 through 10 Years, Fair Value Statement of Cash Flows [Abstract] Statement of Cash Flows [Abstract] Assets Assets [Abstract] Total claims and claim expenses (benefits) incurred Liability for Unpaid Claims and Claims Adjustment Expense, Incurred Claims Taxes paid related to net share settlement of equity awards Payment, Tax Withholding, Share-Based Payment Arrangement Liabilities Liabilities [Abstract] Debt issuance costs Debt Issuance Costs, Gross Income taxes paid Income Taxes Paid, Net Net cash used in financing activities Net Cash Provided by (Used in) Financing Activities Litigation Commitments and Contingencies Disclosure [Text Block] Retained Earnings Retained Earnings [Member] Number of securities, less than 12 months Debt Securities, Available-for-Sale, Continuous Unrealized Loss Position, Less than 12 Months, Number of Positions 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 Net amortization of premium on investment securities Accretion (Amortization) of Discounts and Premiums, Investments Total liabilities and shareholders' equity Liabilities and Equity Debt securities, amortized cost Amortized Cost Debt Securities, Available-for-Sale, Amortized Cost Basic (in dollars per share) Basic earnings per share (in dollars per share) Earnings Per Share, Basic Schedule of Long-term Debt Instruments [Table] Schedule of Long-Term Debt Instruments [Table] Schedule of Aging Unrealized Losses Debt Securities, Available-for-Sale, Unrealized Loss Position, Fair Value [Table Text Block] Reinsurance recoverable Increase (Decrease) in Reinsurance Recoverable Investment expenses Investment Income, Investment Expense Entity Address, City or Town Entity Address, City or Town Asset-backed securities Debt Securities, Available-for-Sale, Maturity, without Single Maturity Date, Amortized Cost 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 risk-in-force recaptured Previously Ceded Primary Risk-In-Force Recaptured Previously Ceded Primary Risk-In-Force Recaptured Primary insured portfolio, loan default rate Primary Insured Portfolio, Loan Default Rate Primary Insured Portfolio, Loan Default Rate Document Transition Report Document Transition Report Remaining authorized repurchase amount Stock Repurchase Program, Remaining Authorized Repurchase Amount Common stock, authorized (in shares) Common Stock, Shares Authorized Fixed maturities, available-for-sale, at fair value (amortized cost of $2,465,556 and $2,352,747 as of June 30, 2023 and December 31, 2022, respectively) Fair Value Fair Value Fair value of securities Debt Securities, Available-for-Sale Claims and claim expenses paid: Liability for Unpaid Claims and Claims Adjustment Expense, Claims Paid [Abstract] Favorable development on prior year defaults Prior Year Claims and Claims Adjustment Expense, Favorable Development on Prior Year Defaults Prior Year Claims and Claims Adjustment Expense, Favorable Development on Prior Year Defaults Re One Re One [Member] Re One Schedule of Net Investment Income Investment Income [Table Text Block] 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] Gross unrealized gains Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Gain, before Tax Ceded risk-in-force Risk In Force, Ceded Risk In Force, Ceded Short-term investments Short-Term Investments [Member] Premiums Receivable Premiums Receivable Note [Text Block] 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] Ceded Credit Risk [Table] Ceded Credit Risk [Table] Common stock - class A shares, $0.01 par value; 86,925,030 shares issued and 82,289,763 shares outstanding as of June 30, 2023 and 86,472,742 shares issued and 83,549,879 shares outstanding as of December 31, 2022 (250,000,000 shares authorized) Common Stock, Value, Outstanding Percent of premiums ceded under QSR Transaction Percent of pool RIF reinsured Reinsurance, Reinsured Risk, Percentage 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 Net realized investment gains (losses) Gain (Loss) on Investments 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 Additional paid-in capital Additional Paid in Capital Premium receivable, allowance for credit loss, uncollected Premium Receivable, Allowance for Credit Loss, Writeoff Other comprehensive (loss) income, net of tax: Other Comprehensive Income (Loss), Net of Tax, Portion Attributable to Parent [Abstract] Subsequent Event Type [Axis] Subsequent Event Type [Axis] Schedule of Statutory Net Income (loss), Surplus, Contingency Reserve and Risk-to-Capital Ratio Statutory Accounting Practices Disclosure [Table Text Block] Schedule of Corporate Debt Securities by Industry Group Investments Classified By Issuer Industry Group [Table Text Block] Investments Classified By Issuer Industry Group [Table Text Block] Premium receivable, write-off period Premium Receivable, Write-off Period Premium Receivable, Write-off Period Debt Instrument, Redemption, Period [Domain] Debt Instrument, Redemption, Period [Domain] Other assets Other Assets 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 Entity Registrant Name Entity Registrant Name Document Period End Date Document Period End Date Direct Direct Premiums Written Treasury Stock, At Cost Treasury Stock, Common [Member] Entity Central Index Key Entity Central Index Key Amortization of debt discount and debt issuance costs Amortization of Debt Issuance Costs and Discounts Income tax expense Income Tax Expense (Benefit) Fair Value of Financial Instruments Fair Value Disclosures [Text Block] Reserve for insurance claims and claim expenses Increase (Decrease) in Liability for Claims and Claims Adjustment Expense Reserve Communications Communications, Industry Group [Member] Communications, Industry Group [Member] Other comprehensive (loss) income, net of tax Other Comprehensive Income (Loss), Net of Tax, Portion Attributable to Parent 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 Equity [Abstract] Debt Securities, Available-for-sale [Line Items] Debt Securities, Available-for-Sale [Line Items] Reclassification adjustment for realized (gains) losses included in net income, net of tax expense (benefit) of $0 and $11 for the three months ended June 30, 2023 and 2022, and $(7) and $97 for the six months ended June 30, 2023 and 2022, respectively Other Comprehensive Income (Loss), Reclassification Adjustment from AOCI for Sale of Securities, Net of Tax Applicable premium Debt Instrument, Covenant Terms, Applicable Premium Debt Instrument, Covenant Terms, Applicable Premium Entity [Domain] Entity [Domain] Long-term Debt, Type [Axis] Long-Term Debt, Type [Axis] Amendment Flag Amendment Flag Legal Entity [Axis] Legal Entity [Axis] Unrealized losses, less than 12 months Debt Securities, Available-for-Sale, Continuous Unrealized Loss Position, Less than 12 Months, Accumulated Loss Senior secured notes Senior Notes Interest paid Interest Paid, Excluding Capitalized Interest, Operating Activities Number of quota share reinsurance treaties Number of Quota Share Reinsurance Treaties Number of Quota Share Reinsurance Treaties Credit Facility [Domain] Credit Facility [Domain] Repurchase of common stock (in shares) Stock Repurchased and Retired During Period, Shares Repurchased shares (in shares) Treasury Stock, Shares, Acquired Liability for Unpaid Claims and Claims Adjustment Expense [Roll Forward] Liability for Unpaid Claims and Claims Adjustment Expense [Roll Forward] Basis spread on variable rate (in percent) Debt Instrument, Basis Spread on Variable Rate Fannie Mae Fannie Mae [Member] Fannie Mae [Member] Diluted (in shares) Dilutive weighted average shares outstanding (in shares) Weighted Average Number of Shares Outstanding, Diluted Net realized investment loss (gains) Net realized investment gains (losses) Debt Securities, Available-for-Sale, Realized Gain (Loss) Gross realized investment losses Debt Securities, Available-for-Sale, Realized Loss Software and equipment Payments to Acquire Property, Plant, and Equipment Additional Paid-in Capital Additional Paid-in Capital [Member] 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] Total assets Assets Share Repurchase Program [Axis] Share Repurchase Program [Axis] Cover page. Cover [Abstract] Current Reinsurance Coverage Current Reinsurance Coverage Current Reinsurance Coverage Direct Direct Premiums Earned Number of states in which the entity operates Number of States in which Entity Operates Premiums receivable Premiums Receivable, Net Subsequent Events Subsequent Events [Text Block] Share-based compensation expense APIC, Share-Based Payment Arrangement, Increase for Cost Recognition Ceded Ceded premiums earned Ceded Premiums Earned Recurring Fair Value, Recurring [Member] Net income amount Statutory Accounting Practices, Statutory Net Income Amount Schedule of Effect of Reinsurance Agreements on Premiums Written and Earned Effects of Reinsurance [Table Text Block] Reinsurance recoverable on unpaid claims Less reinsurance recoverables Add reinsurance recoverables Reinsurance Recoverable for Paid and Unpaid Claims and Claims Adjustments 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 Cash flows from financing activities Net Cash Provided by (Used in) Financing Activities [Abstract] 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 Secured Debt Secured Debt [Member] Reinsurance balances, net Increase (Decrease) in Reinsurance Assets and Liabilities Increase (Decrease) in Reinsurance Assets and Liabilities Equity Component [Domain] Equity Component [Domain] Debt Instrument [Line Items] Debt Instrument [Line Items] Basic (in shares) Basic weighted average shares outstanding (in shares) Weighted Average Number of Shares Outstanding, Basic Entity Current Reporting Status Entity Current Reporting Status Total bonds Bonds [Member] Reinsurance Disclosures [Abstract] Reinsurance Disclosures [Abstract] Reinsurance funds withheld Funds Held under Reinsurance Agreements, Liability Initial Reinsurance Coverage Initial Reinsurance Coverage Initial Reinsurance Coverage Financial Financial, Industry Group [Member] Financial, Industry Group [Member] Revenues Revenues [Abstract] Profit commission Reinsurance Profit Commission Reinsurance Profit Commission Comprehensive income: Comprehensive Income (Loss), Net of Tax, Attributable to Parent [Abstract] Changes in operating assets and liabilities: Increase (Decrease) in Other Operating Assets and Liabilities, Net [Abstract] Proceeds from issuance of common stock related to employee equity plans Proceeds, Issuance of Shares, Share-Based Payment Arrangement, Including Option Exercised Commitment fee (in percent) Line of Credit Facility, Unused Capacity, Commitment Fee Percentage Statement [Line Items] Statement [Line Items] Common stock: class A shares issued related to warrant exercises Stock Issued During Period, Value, Conversion of Convertible Securities Borrowings outstanding Long-Term Line of Credit Schedule of Fair Values and Gross Unrealized Gains and Losses Debt Securities, Available-for-Sale [Table Text Block]