XML 81 R37.htm IDEA: XBRL DOCUMENT
v3.24.3

Long Term Debt - Narrative (Details) |  | 1 Months Ended |  |  |  |  |
--- | --- | --- | --- | --- | --- | --- | ---
Feb. 03, 2023 USD ($) | Sep. 30, 2023 USD ($) shares | Jun. 30, 2023 USD ($) | Feb. 28, 2023 USD ($) | May 31, 2022 USD ($) tranche | Sep. 30, 2024 USD ($) | Aug. 22, 2024 USD ($) | Mar. 31, 2024 USD ($) | Jan. 01, 2023 USD ($) | May 01, 2022 USD ($) shares
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Number of warrants issued for purchase of common shares (in shares) | shares |  |  |  |  |  |  |  |  |  | 14,899
Warrants and rights outstanding |  | $ 900,000 |  |  |  |  |  |  |  | $ 600,000
Loans payable, net of discount |  |  |  |  |  | $ 117,087,000 |  |  |  |
Hercules Warrants |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Number of warrants issued for purchase of common shares (in shares) | shares |  | 4,555 |  |  |  |  |  |  |  |
Secured Debt | Line of Credit |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Term charges on aggregate principal amount, (as a percent) |  |  |  |  | 5.35% |  |  |  |  |
Secured Debt | Loan Facility | Line of Credit |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Debt instrument, face amount |  |  |  |  | $ 250,000,000.0 |  |  |  |  |
Line of credit facility, number of withdrawals upon milestone achievements | tranche |  |  |  |  | 2 |  |  |  |  |
Long term debt floor interest rate (as a percent) |  |  |  |  | 7.45% |  |  |  |  |
Accrued interest payments, term (in months) |  |  |  |  |  |  |  |  |  | 36 months
Minimum liquidity covenant |  |  |  |  |  |  |  |  | $ 35,000,000.0 |
Loans payable, net of discount |  |  |  |  |  | $ 115,000,000.0 |  |  |  |
Line of credit facility, interest rate (as a percent) |  |  |  |  |  | 10.45% |  |  |  |
Secured Debt | Loan Facility | Line of Credit | Variable Rate Component One | Prime Rate |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Basis spread on variable rate (as a percent) |  | 2.45% |  |  |  |  |  |  |  |
Secured Debt | Loan Facility | Line of Credit | Variable Rate Component Two | Prime Rate |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Basis spread on variable rate (as a percent) |  | 8.25% |  |  |  |  |  |  |  |
Secured Debt | Loan Facility, Tranche 1 | Line of Credit |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Proceeds from issuance of debt |  |  |  |  | $ 50,000,000.0 |  |  |  |  |
Secured Debt | Loan Facility, Tranches 2 and 3 | Line of Credit |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Line of credit facility, maximum borrowing capacity |  |  |  |  | 125,000,000.0 |  |  |  |  |
Secured Debt | Loan Facility, Tranche 2 | Line of Credit |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Proceeds from issuance of debt | $ 35,000,000.0 | $ 15,000,000.0 | $ 15,000,000.0 |  |  |  |  |  |  |
Line of credit facility, maximum borrowing capacity | $ 65,000,000.0 |  |  |  |  |  |  |  |  |
Line of credit facility, increase In maximum borrowing capacity |  |  |  | $ 15,000,000.0 |  |  |  |  |  |
Secured Debt | Loan Facility, Tranche 3 | Line of Credit |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Line of credit facility, remaining borrowing capacity |  |  |  |  |  |  |  | $ 75,000,000 |  |
Secured Debt | Loan Facility, Tranche 4 | Line of Credit |  |  |  |  |  |  |  |  |  |
Debt Instrument [Line Items] |  |  |  |  |  |  |  |  |  |
Line of credit facility, maximum borrowing capacity |  | 60,000,000 |  |  | $ 75,000,000.0 |  |  |  |  |
Line of credit facility, decrease In maximum borrowing capacity |  | $ (15,000,000) |  |  |  |  |  |  |  |
Line of credit facility, current borrowing capacity |  |  |  |  |  |  | $ 135,000,000 |  |  |

X
- Definition Debt Instrument, Accrued Interest Payments, Term + References No definition available. + Details
Name: | mdgl_DebtInstrumentAccruedInterestPaymentsTerm
Namespace Prefix: | mdgl_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | instant

X
- Definition Debt Instrument, Covenant, Liquidity, Minimum + References No definition available. + Details
Name: | mdgl_DebtInstrumentCovenantLiquidityMinimum
Namespace Prefix: | mdgl_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Line Of Credit Facility, Decrease In Maximum Borrowing Capacity + References No definition available. + Details
Name: | mdgl_LineOfCreditFacilityDecreaseInMaximumBorrowingCapacity
Namespace Prefix: | mdgl_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Line Of Credit Facility, Increase In Maximum Borrowing Capacity + References No definition available. + Details
Name: | mdgl_LineOfCreditFacilityIncreaseInMaximumBorrowingCapacity
Namespace Prefix: | mdgl_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Line of Credit Facility, Number Of Withdrawals Upon Milestone Achievements + References No definition available. + Details
Name: | mdgl_LineOfCreditFacilityNumberOfWithdrawalsUponMilestoneAchievements
Namespace Prefix: | mdgl_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | instant

X
- Definition Long term debt floor interest rate percentage. + References No definition available. + Details
Name: | mdgl_LongTermDebtFloorInterestRatePercentage
Namespace Prefix: | mdgl_
Data Type: | dtr-types1:percentItemType
Balance Type: | na
Period Type: | instant

X
- Definition Number of securities into which the class of warrant or right may be converted. For example, but not limited to, 500,000 warrants may be converted into 1,000,000 shares. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 505 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 3 -Publisher FASB -URI https://asc.fasb.org//1943274/2147481112/505-10-50-3 + Details
Name: | us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Percentage points added to the reference rate to compute the variable rate on the debt instrument. + References No definition available. + Details
Name: | us-gaap_DebtInstrumentBasisSpreadOnVariableRate1
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Face (par) amount of debt instrument at time of issuance. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 835 -SubTopic 30 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482900/835-30-50-1 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1B -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1B Reference 3: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 55 -Paragraph 69B -Publisher FASB -URI https://asc.fasb.org//1943274/2147481568/470-20-55-69B Reference 4: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 55 -Paragraph 69C -Publisher FASB -URI https://asc.fasb.org//1943274/2147481568/470-20-55-69C Reference 5: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 835 -SubTopic 30 -Section 45 -Paragraph 2 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482925/835-30-45-2 Reference 6: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 835 -SubTopic 30 -Section 55 -Paragraph 8 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482949/835-30-55-8 + Details
Name: | us-gaap_DebtInstrumentFaceAmount
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 835 -SubTopic 30 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482900/835-30-50-1 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.4-08(f)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-1 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 3 -Subparagraph (SX 210.12-04(a)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-3 Reference 4: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1B -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1B Reference 5: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 55 -Paragraph 69B -Publisher FASB -URI https://asc.fasb.org//1943274/2147481568/470-20-55-69B Reference 6: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 55 -Paragraph 69C -Publisher FASB -URI https://asc.fasb.org//1943274/2147481568/470-20-55-69C Reference 7: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 55 -Paragraph 69E -Publisher FASB -URI https://asc.fasb.org//1943274/2147481568/470-20-55-69E Reference 8: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 55 -Paragraph 69F -Publisher FASB -URI https://asc.fasb.org//1943274/2147481568/470-20-55-69F Reference 9: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1B -Subparagraph (b) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1B Reference 10: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1B -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1B Reference 11: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1B -Subparagraph (d) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1B Reference 12: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1B -Subparagraph (e) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1B Reference 13: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1B -Subparagraph (f) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1B Reference 14: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1B -Subparagraph (h) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1B Reference 15: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1D -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1D Reference 16: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1D -Subparagraph (b) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1D Reference 17: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1D -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1D Reference 18: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1E -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1E Reference 19: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1E -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1E Reference 20: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1E -Subparagraph (d) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1E Reference 21: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1F -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1F Reference 22: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1F -Subparagraph (b) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1F Reference 23: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1F -Subparagraph (b)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1F Reference 24: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1F -Subparagraph (b)(2) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1F Reference 25: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1I -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1I + Details
Name: | us-gaap_DebtInstrumentLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition The fee, expressed as a percentage of the line of credit facility, for the line of credit facility regardless of whether the facility has been used. + References No definition available. + Details
Name: | us-gaap_LineOfCreditFacilityCommitmentFeePercentage
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount of current borrowing capacity under the credit facility considering any current restrictions on the amount that could be borrowed (for example, borrowings may be limited by the amount of current assets), but without considering any amounts currently outstanding under the facility. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480566/210-10-S99-1 + Details
Name: | us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition The effective interest rate at the end of the reporting period. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480566/210-10-S99-1 + Details
Name: | us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | instant

X
- Definition Maximum borrowing capacity under the credit facility without consideration of any current restrictions on the amount that could be borrowed or the amounts currently outstanding under the facility. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480566/210-10-S99-1 + Details
Name: | us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Amount of borrowing capacity currently available under the credit facility (current borrowing capacity less the amount of borrowings outstanding). + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480566/210-10-S99-1 + Details
Name: | us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Amount, after deduction of unamortized premium (discount) and debt issuance cost, of long-term debt. Excludes lease obligation. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(22)) -SubTopic 10 -Topic 210 -Publisher FASB -URI https://asc.fasb.org//1943274/2147480566/210-10-S99-1 Reference 2: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 55 -Paragraph 69B -Publisher FASB -URI https://asc.fasb.org//1943274/2147481568/470-20-55-69B Reference 3: http://www.xbrl.org/2003/role/exampleRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 55 -Paragraph 69C -Publisher FASB -URI https://asc.fasb.org//1943274/2147481568/470-20-55-69C Reference 4: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1D -Subparagraph (b) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-1D Reference 5: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 944 -SubTopic 210 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.7-03(a)(16)(a)(2)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479440/944-210-S99-1 Reference 6: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 942 -SubTopic 210 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-03(16)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479853/942-210-S99-1 Reference 7: http://www.xbrl.org/2003/role/disclosureRef -Topic 470 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 4 -Subparagraph (b)(3) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481139/470-20-50-4 + Details
Name: | us-gaap_LongTermDebt
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition The cash inflow during the period from additional borrowings in aggregate debt. Includes proceeds from short-term and long-term debt. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 230 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 14 -Subparagraph (b) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482740/230-10-45-14 + Details
Name: | us-gaap_ProceedsFromIssuanceOfDebt
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Value of outstanding derivative securities that permit the holder the right to purchase securities (usually equity) from the issuer at a specified price. + References No definition available. + Details
Name: | us-gaap_WarrantsAndRightsOutstanding
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Details
Name: | us-gaap_ClassOfWarrantOrRightAxis=mdgl_HerculesWarrantsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_CreditFacilityAxis=us-gaap_SecuredDebtMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_LongtermDebtTypeAxis=us-gaap_LineOfCreditMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=mdgl_LoanFacilityMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | mdgl_VariableRateComponentAxis=mdgl_VariableRateComponentOneMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VariableRateAxis=us-gaap_PrimeRateMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | mdgl_VariableRateComponentAxis=mdgl_VariableRateComponentTwoMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=mdgl_LoanFacilityTrancheOneMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=mdgl_LoanFacilityTranchesTwoAndThreeMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=mdgl_LoanFacilityTrancheTwoMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=mdgl_LoanFacilityTrancheThreeMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=mdgl_LoanFacilityTrancheFourMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |