<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2023"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:mdgl="http://www.madrigalpharma.com/20230930"
  xmlns:srt="http://fasb.org/srt/2023"
  xmlns:us-gaap="http://fasb.org/us-gaap/2023"
  xmlns:utr="http://www.xbrl.org/2009/utr"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <link:schemaRef xlink:href="mdgl-20230930.xsd" xlink:type="simple"/>
    <context id="PAsOn09_30_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P04_01_2023To06_30_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2023-04-01</startDate>
            <endDate>2023-06-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To03_31_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-03-31</endDate>
        </period>
    </context>
    <context id="P01_01_2022To03_31_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-03-31</endDate>
        </period>
    </context>
    <context id="P04_01_2022To06_30_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2022-04-01</startDate>
            <endDate>2022-06-30</endDate>
        </period>
    </context>
    <context id="PAsOn11_01_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2023-11-01</instant>
        </period>
    </context>
    <context id="P05_01_2022To05_31_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2022-05-01</startDate>
            <endDate>2022-05-31</endDate>
        </period>
    </context>
    <context id="P05_01_2022To05_01_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2022-05-01</startDate>
            <endDate>2022-05-01</endDate>
        </period>
    </context>
    <context id="P05_09_2022To05_09_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2022-05-09</startDate>
            <endDate>2022-05-09</endDate>
        </period>
    </context>
    <context id="P08_01_2023To08_31_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <startDate>2023-08-01</startDate>
            <endDate>2023-08-31</endDate>
        </period>
    </context>
    <context id="PAsOn12_31_2021">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2021-12-31</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2022-09-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2022-06-30</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2022">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2022-03-31</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2023-06-30</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2023">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
        </entity>
        <period>
            <instant>2023-03-31</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CorporateDebtSecurities2MemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">mdgl:CorporateDebtSecurities2Member</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CorporateDebtSecurities2MemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">mdgl:CorporateDebtSecurities2Member</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CashMemberusgaapCashAndCashEquivalentsAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CashAndCashEquivalentsAxis">us-gaap:CashMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel1Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CashMemberusgaapCashAndCashEquivalentsAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CashAndCashEquivalentsAxis">us-gaap:CashMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel1Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis_MoneyMarketFundsMemberusgaapCashAndCashEquivalentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CashAndCashEquivalentsAxis">us-gaap:MoneyMarketFundsMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel1Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis_MoneyMarketFundsMemberusgaapCashAndCashEquivalentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CashAndCashEquivalentsAxis">us-gaap:MoneyMarketFundsMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel1Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_HoffmanLaRocheMembersrtCounterpartyNameAxis_ResearchDevelopmentAndCommercializationAgreementMemberusgaapTypeOfArrangementAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="srt:CounterpartyNameAxis">mdgl:HoffmanLaRocheMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:ResearchDevelopmentAndCommercializationAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_TwoThousandAndTwentyThreeStockInducementPlanMemberusgaapPlanNameAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:PlanNameAxis">mdgl:TwoThousandAndTwentyThreeStockInducementPlanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">mdgl:AgencySecuritiesOneMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:CorporateDebtSecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AgencySecuritiesMemberusgaapFinancialInstrumentAxis_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:AgencySecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:CorporateDebtSecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis_TwoThousandAndFifteenStockPlanMemberusgaapPlanNameAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:PlanNameAxis">mdgl:TwoThousandAndFifteenStockPlanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:TwoThousandAndTwentyOneSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:TwoThousandAndTwentyThreeSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AgencySecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:AgencySecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">mdgl:AgencySecuritiesOneMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">mdgl:AgencySecuritiesOneMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:CorporateDebtSecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AgencySecuritiesMemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:AgencySecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheTwoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis_TwoThousandAndFifteenStockPlanMemberusgaapPlanNameAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:RestrictedStockUnitsRSUMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:PlanNameAxis">mdgl:TwoThousandAndFifteenStockPlanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_TrancheTwoMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheTwoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_PerformanceStockUnitsMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">mdgl:PerformanceStockUnitsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CashMemberusgaapCashAndCashEquivalentsAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CashAndCashEquivalentsAxis">us-gaap:CashMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel1Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_CashMemberusgaapCashAndCashEquivalentsAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CashAndCashEquivalentsAxis">us-gaap:CashMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel1Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis_MoneyMarketFundsMemberusgaapCashAndCashEquivalentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CashAndCashEquivalentsAxis">us-gaap:MoneyMarketFundsMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel1Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis_MoneyMarketFundsMemberusgaapCashAndCashEquivalentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CashAndCashEquivalentsAxis">us-gaap:MoneyMarketFundsMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel1Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:CarryingReportedAmountFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:CorporateDebtSecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:CorporateDebtSecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByFairValueHierarchyLevelAxis">us-gaap:FairValueInputsLevel2Member</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FairValueByMeasurementBasisAxis">us-gaap:EstimateOfFairValueFairValueDisclosureMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:CorporateDebtSecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_SeptemberTwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:SeptemberTwoThousandAndTwentyThreeSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:RestrictedStockUnitsRSUMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_ResearchAndDevelopmentExpenseMemberusgaapIncomeStatementLocationAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:IncomeStatementLocationAxis">us-gaap:ResearchAndDevelopmentExpenseMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_GeneralAndAdministrativeExpenseMemberusgaapIncomeStatementLocationAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:IncomeStatementLocationAxis">us-gaap:GeneralAndAdministrativeExpenseMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_OtherStockBasedCompensationMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">mdgl:OtherStockBasedCompensationMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2023To09_30_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-07-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:RestrictedStockUnitsRSUMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022_ResearchAndDevelopmentExpenseMemberusgaapIncomeStatementLocationAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:IncomeStatementLocationAxis">us-gaap:ResearchAndDevelopmentExpenseMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022_GeneralAndAdministrativeExpenseMemberusgaapIncomeStatementLocationAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:IncomeStatementLocationAxis">us-gaap:GeneralAndAdministrativeExpenseMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022_OtherStockBasedCompensationMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">mdgl:OtherStockBasedCompensationMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P07_01_2022To09_30_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-07-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_OtherStockBasedCompensationMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">mdgl:OtherStockBasedCompensationMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_RestrictedStockUnitsRSUMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">us-gaap:RestrictedStockUnitsRSUMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_PreferredStockMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_WarrantMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">us-gaap:WarrantMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:RestrictedStockUnitsRSUMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_ResearchAndDevelopmentExpenseMemberusgaapIncomeStatementLocationAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:IncomeStatementLocationAxis">us-gaap:ResearchAndDevelopmentExpenseMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_GeneralAndAdministrativeExpenseMemberusgaapIncomeStatementLocationAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:IncomeStatementLocationAxis">us-gaap:GeneralAndAdministrativeExpenseMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To09_30_2022_OtherStockBasedCompensationMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">mdgl:OtherStockBasedCompensationMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_OtherStockBasedCompensationMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">mdgl:OtherStockBasedCompensationMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_RestrictedStockUnitsRSUMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">us-gaap:RestrictedStockUnitsRSUMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_PreferredStockMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_WarrantMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis">us-gaap:WarrantMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:TwoThousandAndTwentyThreeSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_MaximumMembersrtRangeAxis_TwoThousandAndFifteenStockPlanMemberusgaapPlanNameAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="srt:RangeAxis">srt:MaximumMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:PlanNameAxis">mdgl:TwoThousandAndFifteenStockPlanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_MaximumMembersrtRangeAxis_TwoThousandAndTwentyThreeStockInducementPlanMemberusgaapPlanNameAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="srt:RangeAxis">srt:MaximumMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:PlanNameAxis">mdgl:TwoThousandAndTwentyThreeStockInducementPlanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:RestrictedStockUnitsRSUMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_ResearchAndDevelopmentExpenseMemberusgaapIncomeStatementLocationAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:IncomeStatementLocationAxis">us-gaap:ResearchAndDevelopmentExpenseMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_GeneralAndAdministrativeExpenseMemberusgaapIncomeStatementLocationAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:IncomeStatementLocationAxis">us-gaap:GeneralAndAdministrativeExpenseMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_OtherStockBasedCompensationMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">mdgl:OtherStockBasedCompensationMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_CorporateDebtSecurities2MemberusgaapFinancialInstrumentAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">mdgl:CorporateDebtSecurities2Member</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:CorporateDebtSecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_AgencySecuritiesMemberusgaapFinancialInstrumentAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:AgencySecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_MinimumMembersrtRangeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="srt:RangeAxis">srt:MinimumMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">mdgl:AgencySecuritiesOneMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_MaximumMembersrtRangeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="srt:RangeAxis">srt:MaximumMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">mdgl:AgencySecuritiesOneMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To09_30_2023_TwoThousandAndFifteenStockAndInducementPlanMemberusgaapPlanNameAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:PlanNameAxis">mdgl:TwoThousandAndFifteenStockAndInducementPlanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-09-30</endDate>
        </period>
    </context>
    <context id="P01_01_2023To03_31_2023_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-03-31</endDate>
        </period>
    </context>
    <context id="P01_01_2023To03_31_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-03-31</endDate>
        </period>
    </context>
    <context id="P01_01_2023To03_31_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-03-31</endDate>
        </period>
    </context>
    <context id="P01_01_2023To03_31_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-03-31</endDate>
        </period>
    </context>
    <context id="P04_01_2023To06_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-04-01</startDate>
            <endDate>2023-06-30</endDate>
        </period>
    </context>
    <context id="P04_01_2023To06_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-04-01</startDate>
            <endDate>2023-06-30</endDate>
        </period>
    </context>
    <context id="P04_01_2023To06_30_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-04-01</startDate>
            <endDate>2023-06-30</endDate>
        </period>
    </context>
    <context id="P04_01_2023To06_30_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-04-01</startDate>
            <endDate>2023-06-30</endDate>
        </period>
    </context>
    <context id="P01_01_2022To03_31_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-03-31</endDate>
        </period>
    </context>
    <context id="P01_01_2022To03_31_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-03-31</endDate>
        </period>
    </context>
    <context id="P01_01_2022To03_31_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-03-31</endDate>
        </period>
    </context>
    <context id="P04_01_2022To06_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-04-01</startDate>
            <endDate>2022-06-30</endDate>
        </period>
    </context>
    <context id="P04_01_2022To06_30_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-04-01</startDate>
            <endDate>2022-06-30</endDate>
        </period>
    </context>
    <context id="P04_01_2022To06_30_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-04-01</startDate>
            <endDate>2022-06-30</endDate>
        </period>
    </context>
    <context id="P05_01_2022To05_31_2022_TermLoanMemberusgaapDebtInstrumentAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:DebtInstrumentAxis">mdgl:TermLoanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-05-01</startDate>
            <endDate>2022-05-31</endDate>
        </period>
    </context>
    <context id="PAsOn05_31_2022_TermLoanMemberusgaapDebtInstrumentAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:DebtInstrumentAxis">mdgl:TermLoanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-05-31</instant>
        </period>
    </context>
    <context id="PAsOn05_31_2022_DrawnInTwoSeparateTranchesUponAchievementOfResmetiromClinicalAndRegulatoryMilestoneMemberMDGLDebtDescriptionAxis_TermLoanMemberusgaapDebtInstrumentAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:DebtInstrumentAxis">mdgl:TermLoanMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:DebtDescriptionAxis">mdgl:DrawnInTwoSeparateTranchesUponAchievementOfResmetiromClinicalAndRegulatoryMilestoneMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-05-31</instant>
        </period>
    </context>
    <context id="PAsOn05_31_2022_DrawnInTwoSeparateTranchesUponAchievementOfResmetiromClinicalAndRegulatoryMilestoneMemberMDGLDebtDescriptionAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="mdgl:DebtDescriptionAxis">mdgl:DrawnInTwoSeparateTranchesUponAchievementOfResmetiromClinicalAndRegulatoryMilestoneMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-05-31</instant>
        </period>
    </context>
    <context id="P02_03_2023To02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TermLoanMemberusgaapDebtInstrumentAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:DebtInstrumentAxis">mdgl:TermLoanMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-02-03</startDate>
            <endDate>2023-02-03</endDate>
        </period>
    </context>
    <context id="P02_03_2023To02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheTwoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-02-03</startDate>
            <endDate>2023-02-03</endDate>
        </period>
    </context>
    <context id="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_PrimeRateMemberusgaapVariableRateAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:VariableRateAxis">us-gaap:PrimeRateMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-02-03</instant>
        </period>
    </context>
    <context id="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-02-03</instant>
        </period>
    </context>
    <context id="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheTwoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-02-03</instant>
        </period>
    </context>
    <context id="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheThreeMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheThreeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-02-03</instant>
        </period>
    </context>
    <context id="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheFouthMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheFouthMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-02-03</instant>
        </period>
    </context>
    <context id="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityOneMemberusgaapCreditFacilityAxis_TrancheFouthMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityOneMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheFouthMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-02-03</instant>
        </period>
    </context>
    <context id="PAsOn06_19_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheTwoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-06-19</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityAndAmendedLoanFacilityMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:TrancheAxis">mdgl:TrancheTwoMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-06-30</instant>
        </period>
    </context>
    <context id="PAsOn01_01_2023_LoanFacilityMemberusgaapCreditFacilityAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-01-01</instant>
        </period>
    </context>
    <context id="P01_01_2023To01_02_2023_LoanFacilityMemberusgaapCreditFacilityAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:CreditFacilityAxis">mdgl:LoanFacilityMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-01-01</startDate>
            <endDate>2023-01-02</endDate>
        </period>
    </context>
    <context id="PAsOn06_30_2017_ConvertibleSeriesAAndBPreferredStockMemberusgaapStatementClassOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">mdgl:ConvertibleSeriesAAndBPreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2017-06-30</instant>
        </period>
    </context>
    <context id="P12_01_2022To12_23_2022_CommonStockMemberusgaapStatementClassOfStockAxis_PurchaseAgreementMemberMDGLAgreementAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:TwoThousandAndTwentyTwoRegisteredDirectOfferingMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:PurchaseAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-12-01</startDate>
            <endDate>2022-12-23</endDate>
        </period>
    </context>
    <context id="P12_01_2022To12_23_2022_PurchaseAgreementMemberMDGLAgreementAxis_SeriesBPreferredStockMemberusgaapStatementClassOfStockAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:SeriesBPreferredStockMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:TwoThousandAndTwentyTwoRegisteredDirectOfferingMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:PurchaseAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-12-01</startDate>
            <endDate>2022-12-23</endDate>
        </period>
    </context>
    <context id="P12_01_2022To12_23_2022_PurchaseAgreementMemberMDGLAgreementAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:TwoThousandAndTwentyTwoRegisteredDirectOfferingMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:PurchaseAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-12-01</startDate>
            <endDate>2022-12-23</endDate>
        </period>
    </context>
    <context id="PAsOn12_23_2022_PurchaseAgreementMemberMDGLAgreementAxis_SeriesBPreferredStockMemberusgaapStatementClassOfStockAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:SeriesBPreferredStockMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:TwoThousandAndTwentyTwoRegisteredDirectOfferingMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:PurchaseAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-23</instant>
        </period>
    </context>
    <context id="PAsOn12_23_2022_CommonStockMemberusgaapStatementClassOfStockAxis_PurchaseAgreementMemberMDGLAgreementAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:TwoThousandAndTwentyTwoRegisteredDirectOfferingMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:PurchaseAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-23</instant>
        </period>
    </context>
    <context id="P06_01_2021To06_30_2021_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_CowenCoLlcMembersrtCounterpartyNameAxis_MaximumMembersrtRangeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="srt:CounterpartyNameAxis">mdgl:CowenCo.LlcMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="srt:RangeAxis">srt:MaximumMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-06-01</startDate>
            <endDate>2021-06-30</endDate>
        </period>
    </context>
    <context id="P01_01_2021To12_31_2021_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:TwoThousandAndTwentyOneSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="P01_01_2021To12_31_2022_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:TwoThousandAndTwentyOneSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="P01_01_2022To12_31_2022_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="mdgl:AgreementAxis">mdgl:TwoThousandAndTwentyOneSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="P01_01_2022To12_31_2022_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:FinancialInstrumentAxis">us-gaap:CorporateDebtSecuritiesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2022-01-01</startDate>
            <endDate>2022-12-31</endDate>
        </period>
    </context>
    <context id="P05_01_2023To05_31_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_CowenCoLlcMembersrtCounterpartyNameAxis_MaximumMembersrtRangeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="srt:CounterpartyNameAxis">mdgl:CowenCo.LlcMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="srt:RangeAxis">srt:MaximumMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:TypeOfArrangementAxis">mdgl:AtTheMarketIssuanceSalesAgreementMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-05-01</startDate>
            <endDate>2023-05-31</endDate>
        </period>
    </context>
    <context id="P06_01_2017To06_30_2017_ConvertibleSeriesAAndBPreferredStockMemberusgaapStatementClassOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">mdgl:ConvertibleSeriesAAndBPreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2017-06-01</startDate>
            <endDate>2017-06-30</endDate>
        </period>
    </context>
    <context id="PAsOn10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:SubsequentEventTypeAxis">us-gaap:SubsequentEventMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:OfferingMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-10-03</instant>
        </period>
    </context>
    <context id="PAsOn10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_PreFundedWarrantsMemberusgaapClassOfWarrantOrRightAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:ClassOfWarrantOrRightAxis">mdgl:PreFundedWarrantsMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsequentEventTypeAxis">us-gaap:SubsequentEventMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:OfferingMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-10-03</instant>
        </period>
    </context>
    <context id="PAsOn10_03_2023_PreFundedWarrantsMemberusgaapClassOfWarrantOrRightAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:ClassOfWarrantOrRightAxis">mdgl:PreFundedWarrantsMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsequentEventTypeAxis">us-gaap:SubsequentEventMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-10-03</instant>
        </period>
    </context>
    <context id="P10_03_2023To10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:SubsequentEventTypeAxis">us-gaap:SubsequentEventMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:OfferingMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-10-03</startDate>
            <endDate>2023-10-03</endDate>
        </period>
    </context>
    <context id="P10_03_2023To10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_PreFundedWarrantsAndCommonStockMemberusgaapStatementEquityComponentsAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">mdgl:PreFundedWarrantsAndCommonStockMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsequentEventTypeAxis">us-gaap:SubsequentEventMember</xbrldi:explicitMember>
                <xbrldi:explicitMember dimension="us-gaap:SubsidiarySaleOfStockAxis">mdgl:OfferingMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-10-03</startDate>
            <endDate>2023-10-03</endDate>
        </period>
    </context>
    <context id="P10_01_2023To10_31_2023_SubsequentEventMemberusgaapSubsequentEventTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:SubsequentEventTypeAxis">us-gaap:SubsequentEventMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-10-01</startDate>
            <endDate>2023-10-31</endDate>
        </period>
    </context>
    <context id="PAsOn09_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2023_PreferredStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2022_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-09-30</instant>
        </period>
    </context>
    <context id="PAsOn09_30_2022_PreferredStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-09-30</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:AwardTypeAxis">us-gaap:EmployeeStockOptionMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2022_PreferredStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-12-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2023_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-03-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-03-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-03-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-03-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2023_PreferredStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-03-31</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-06-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-06-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-06-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-06-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2023_PreferredStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2023-06-30</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2021_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2021-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2021_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2021-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2021_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2021-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2021_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2021-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2021_PreferredStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2021-12-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2022_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-03-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-03-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-03-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-03-31</instant>
        </period>
    </context>
    <context id="PAsOn03_31_2022_PreferredStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-03-31</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2022_CommonStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-06-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AdditionalPaidInCapitalMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-06-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-06-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:RetainedEarningsMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-06-30</instant>
        </period>
    </context>
    <context id="PAsOn06_30_2022_PreferredStockMemberusgaapStatementEquityComponentsAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001157601</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:PreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2022-06-30</instant>
        </period>
    </context>
    <unit id="Unit_USD">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="Unit_shares">
        <measure>shares</measure>
    </unit>
    <unit id="Unit_pure">
        <measure>pure</measure>
    </unit>
    <unit id="Unit_Year">
        <measure>utr:Year</measure>
    </unit>
    <unit id="Unit_Month">
        <measure>utr:Month</measure>
    </unit>
    <unit id="Unit_USD_per_Share">
        <divide>
            <unitNumerator>
                <measure>iso4217:USD</measure>
            </unitNumerator>
            <unitDenominator>
                <measure>shares</measure>
            </unitDenominator>
        </divide>
    </unit>
    <unit id="Unit_Vote">
        <measure>mdgl:Vote</measure>
    </unit>
    <dei:AmendmentFlag contextRef="P01_01_2023To09_30_2023">false</dei:AmendmentFlag>
    <dei:DocumentFiscalPeriodFocus contextRef="P01_01_2023To09_30_2023">Q3</dei:DocumentFiscalPeriodFocus>
    <dei:EntityCentralIndexKey contextRef="P01_01_2023To09_30_2023">0001157601</dei:EntityCentralIndexKey>
    <dei:CurrentFiscalYearEndDate contextRef="P01_01_2023To09_30_2023">--12-31</dei:CurrentFiscalYearEndDate>
    <dei:DocumentType contextRef="P01_01_2023To09_30_2023">10-Q</dei:DocumentType>
    <dei:DocumentQuarterlyReport contextRef="P01_01_2023To09_30_2023">true</dei:DocumentQuarterlyReport>
    <dei:DocumentPeriodEndDate contextRef="P01_01_2023To09_30_2023">2023-09-30</dei:DocumentPeriodEndDate>
    <dei:DocumentFiscalYearFocus contextRef="P01_01_2023To09_30_2023">2023</dei:DocumentFiscalYearFocus>
    <dei:DocumentTransitionReport contextRef="P01_01_2023To09_30_2023">false</dei:DocumentTransitionReport>
    <dei:EntityFileNumber contextRef="P01_01_2023To09_30_2023">001-33277</dei:EntityFileNumber>
    <dei:EntityRegistrantName contextRef="P01_01_2023To09_30_2023">MADRIGAL PHARMACEUTICALS, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="P01_01_2023To09_30_2023">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityTaxIdentificationNumber contextRef="P01_01_2023To09_30_2023">04-3508648</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="P01_01_2023To09_30_2023">Four Tower Bridge</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="P01_01_2023To09_30_2023">200 Barr Harbor Drive, Suite 200</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown contextRef="P01_01_2023To09_30_2023">West Conshohocken</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="P01_01_2023To09_30_2023">PA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="P01_01_2023To09_30_2023">19428</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="P01_01_2023To09_30_2023">267</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="P01_01_2023To09_30_2023">824-2827</dei:LocalPhoneNumber>
    <dei:Security12bTitle contextRef="P01_01_2023To09_30_2023">Common Stock, $0.0001 Par Value Per Share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="P01_01_2023To09_30_2023">MDGL</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="P01_01_2023To09_30_2023">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityCurrentReportingStatus contextRef="P01_01_2023To09_30_2023">Yes</dei:EntityCurrentReportingStatus>
    <dei:EntityInteractiveDataCurrent contextRef="P01_01_2023To09_30_2023">Yes</dei:EntityInteractiveDataCurrent>
    <dei:EntityFilerCategory contextRef="P01_01_2023To09_30_2023">Large Accelerated Filer</dei:EntityFilerCategory>
    <dei:EntitySmallBusiness contextRef="P01_01_2023To09_30_2023">false</dei:EntitySmallBusiness>
    <dei:EntityEmergingGrowthCompany contextRef="P01_01_2023To09_30_2023">false</dei:EntityEmergingGrowthCompany>
    <dei:EntityShellCompany contextRef="P01_01_2023To09_30_2023">false</dei:EntityShellCompany>
    <dei:EntityCommonStockSharesOutstanding
      contextRef="PAsOn11_01_2023"
      decimals="INF"
      unitRef="Unit_shares">19742646</dei:EntityCommonStockSharesOutstanding>
    <us-gaap:CashAndCashEquivalentsAtCarryingValue
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">62055000</us-gaap:CashAndCashEquivalentsAtCarryingValue>
    <us-gaap:CashAndCashEquivalentsAtCarryingValue
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">331549000</us-gaap:CashAndCashEquivalentsAtCarryingValue>
    <us-gaap:AvailableForSaleSecuritiesDebtSecuritiesCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">170296000</us-gaap:AvailableForSaleSecuritiesDebtSecuritiesCurrent>
    <us-gaap:AvailableForSaleSecuritiesDebtSecuritiesCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">27225000</us-gaap:AvailableForSaleSecuritiesDebtSecuritiesCurrent>
    <us-gaap:PrepaidExpenseAndOtherAssetsCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">3118000</us-gaap:PrepaidExpenseAndOtherAssetsCurrent>
    <us-gaap:PrepaidExpenseAndOtherAssetsCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">2595000</us-gaap:PrepaidExpenseAndOtherAssetsCurrent>
    <us-gaap:AssetsCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">235469000</us-gaap:AssetsCurrent>
    <us-gaap:AssetsCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">361369000</us-gaap:AssetsCurrent>
    <us-gaap:PropertyPlantAndEquipmentNet
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">659000</us-gaap:PropertyPlantAndEquipmentNet>
    <us-gaap:PropertyPlantAndEquipmentNet
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">601000</us-gaap:PropertyPlantAndEquipmentNet>
    <us-gaap:OperatingLeaseRightOfUseAsset
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">1836000</us-gaap:OperatingLeaseRightOfUseAsset>
    <us-gaap:OperatingLeaseRightOfUseAsset
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">602000</us-gaap:OperatingLeaseRightOfUseAsset>
    <us-gaap:Assets
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">237964000</us-gaap:Assets>
    <us-gaap:Assets
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">362572000</us-gaap:Assets>
    <us-gaap:AccountsPayableCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">16542000</us-gaap:AccountsPayableCurrent>
    <us-gaap:AccountsPayableCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">23831000</us-gaap:AccountsPayableCurrent>
    <us-gaap:AccruedLiabilitiesCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">82610000</us-gaap:AccruedLiabilitiesCurrent>
    <us-gaap:AccruedLiabilitiesCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">91461000</us-gaap:AccruedLiabilitiesCurrent>
    <us-gaap:OperatingLeaseLiabilityCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">513000</us-gaap:OperatingLeaseLiabilityCurrent>
    <us-gaap:OperatingLeaseLiabilityCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">602000</us-gaap:OperatingLeaseLiabilityCurrent>
    <us-gaap:LiabilitiesCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">99665000</us-gaap:LiabilitiesCurrent>
    <us-gaap:LiabilitiesCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">115894000</us-gaap:LiabilitiesCurrent>
    <us-gaap:LongTermDebtNoncurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">114727000</us-gaap:LongTermDebtNoncurrent>
    <us-gaap:LongTermDebtNoncurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">49289000</us-gaap:LongTermDebtNoncurrent>
    <us-gaap:OperatingLeaseLiabilityNoncurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">1323000</us-gaap:OperatingLeaseLiabilityNoncurrent>
    <us-gaap:OperatingLeaseLiabilityNoncurrent
      contextRef="PAsOn12_31_2022"
      unitRef="Unit_USD"
      xsi:nil="true"/>
    <us-gaap:LiabilitiesNoncurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">116050000</us-gaap:LiabilitiesNoncurrent>
    <us-gaap:LiabilitiesNoncurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">49289000</us-gaap:LiabilitiesNoncurrent>
    <us-gaap:Liabilities
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">215715000</us-gaap:Liabilities>
    <us-gaap:Liabilities
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">165183000</us-gaap:Liabilities>
    <us-gaap:PreferredStockParOrStatedValuePerShare
      contextRef="PAsOn09_30_2023"
      decimals="INF"
      unitRef="Unit_USD_per_Share">0.0001</us-gaap:PreferredStockParOrStatedValuePerShare>
    <us-gaap:PreferredStockParOrStatedValuePerShare
      contextRef="PAsOn12_31_2022"
      decimals="INF"
      unitRef="Unit_USD_per_Share">0.0001</us-gaap:PreferredStockParOrStatedValuePerShare>
    <us-gaap:PreferredStockSharesAuthorized
      contextRef="PAsOn09_30_2023"
      decimals="INF"
      unitRef="Unit_shares">5000000</us-gaap:PreferredStockSharesAuthorized>
    <us-gaap:PreferredStockSharesAuthorized
      contextRef="PAsOn12_31_2022"
      decimals="INF"
      unitRef="Unit_shares">5000000</us-gaap:PreferredStockSharesAuthorized>
    <us-gaap:PreferredStockSharesIssued
      contextRef="PAsOn09_30_2023"
      decimals="INF"
      unitRef="Unit_shares">2369797</us-gaap:PreferredStockSharesIssued>
    <us-gaap:PreferredStockSharesOutstanding
      contextRef="PAsOn09_30_2023"
      decimals="INF"
      unitRef="Unit_shares">2369797</us-gaap:PreferredStockSharesOutstanding>
    <us-gaap:PreferredStockSharesIssued
      contextRef="PAsOn12_31_2022"
      decimals="INF"
      unitRef="Unit_shares">2369797</us-gaap:PreferredStockSharesIssued>
    <us-gaap:PreferredStockSharesOutstanding
      contextRef="PAsOn12_31_2022"
      decimals="INF"
      unitRef="Unit_shares">2369797</us-gaap:PreferredStockSharesOutstanding>
    <us-gaap:PreferredStockValue
      contextRef="PAsOn09_30_2023"
      unitRef="Unit_USD"
      xsi:nil="true"/>
    <us-gaap:PreferredStockValue
      contextRef="PAsOn12_31_2022"
      unitRef="Unit_USD"
      xsi:nil="true"/>
    <us-gaap:CommonStockParOrStatedValuePerShare
      contextRef="PAsOn09_30_2023"
      decimals="INF"
      unitRef="Unit_USD_per_Share">0.0001</us-gaap:CommonStockParOrStatedValuePerShare>
    <us-gaap:CommonStockParOrStatedValuePerShare
      contextRef="PAsOn12_31_2022"
      decimals="INF"
      unitRef="Unit_USD_per_Share">0.0001</us-gaap:CommonStockParOrStatedValuePerShare>
    <us-gaap:CommonStockSharesAuthorized
      contextRef="PAsOn09_30_2023"
      decimals="INF"
      unitRef="Unit_shares">200000000</us-gaap:CommonStockSharesAuthorized>
    <us-gaap:CommonStockSharesAuthorized
      contextRef="PAsOn12_31_2022"
      decimals="INF"
      unitRef="Unit_shares">200000000</us-gaap:CommonStockSharesAuthorized>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn09_30_2023"
      decimals="INF"
      unitRef="Unit_shares">18494192</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesOutstanding
      contextRef="PAsOn09_30_2023"
      decimals="INF"
      unitRef="Unit_shares">18494192</us-gaap:CommonStockSharesOutstanding>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn12_31_2022"
      decimals="INF"
      unitRef="Unit_shares">18102523</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesOutstanding
      contextRef="PAsOn12_31_2022"
      decimals="INF"
      unitRef="Unit_shares">18102523</us-gaap:CommonStockSharesOutstanding>
    <us-gaap:CommonStockValue
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:CommonStockValue>
    <us-gaap:CommonStockValue
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:CommonStockValue>
    <us-gaap:AdditionalPaidInCapitalCommonStock
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">1246385000</us-gaap:AdditionalPaidInCapitalCommonStock>
    <us-gaap:AdditionalPaidInCapitalCommonStock
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">1160079000</us-gaap:AdditionalPaidInCapitalCommonStock>
    <us-gaap:AccumulatedOtherComprehensiveIncomeLossNetOfTax
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-42000</us-gaap:AccumulatedOtherComprehensiveIncomeLossNetOfTax>
    <us-gaap:AccumulatedOtherComprehensiveIncomeLossNetOfTax
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">-32000</us-gaap:AccumulatedOtherComprehensiveIncomeLossNetOfTax>
    <us-gaap:RetainedEarningsAccumulatedDeficit
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-1224096000</us-gaap:RetainedEarningsAccumulatedDeficit>
    <us-gaap:RetainedEarningsAccumulatedDeficit
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">-962660000</us-gaap:RetainedEarningsAccumulatedDeficit>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">22249000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">197389000</us-gaap:StockholdersEquity>
    <us-gaap:LiabilitiesAndStockholdersEquity
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">237964000</us-gaap:LiabilitiesAndStockholdersEquity>
    <us-gaap:LiabilitiesAndStockholdersEquity
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">362572000</us-gaap:LiabilitiesAndStockholdersEquity>
    <us-gaap:Revenues
      contextRef="P07_01_2023To09_30_2023"
      unitRef="Unit_USD"
      xsi:nil="true"/>
    <us-gaap:Revenues
      contextRef="P07_01_2022To09_30_2022"
      unitRef="Unit_USD"
      xsi:nil="true"/>
    <us-gaap:Revenues
      contextRef="P01_01_2023To09_30_2023"
      unitRef="Unit_USD"
      xsi:nil="true"/>
    <us-gaap:Revenues
      contextRef="P01_01_2022To09_30_2022"
      unitRef="Unit_USD"
      xsi:nil="true"/>
    <us-gaap:ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">70951000</us-gaap:ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost>
    <us-gaap:ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">68271000</us-gaap:ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost>
    <us-gaap:ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">201710000</us-gaap:ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost>
    <us-gaap:ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">174699000</us-gaap:ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost>
    <us-gaap:GeneralAndAdministrativeExpense
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">27583000</us-gaap:GeneralAndAdministrativeExpense>
    <us-gaap:GeneralAndAdministrativeExpense
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">12141000</us-gaap:GeneralAndAdministrativeExpense>
    <us-gaap:GeneralAndAdministrativeExpense
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">61610000</us-gaap:GeneralAndAdministrativeExpense>
    <us-gaap:GeneralAndAdministrativeExpense
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">33573000</us-gaap:GeneralAndAdministrativeExpense>
    <us-gaap:OperatingExpenses
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">98534000</us-gaap:OperatingExpenses>
    <us-gaap:OperatingExpenses
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">80412000</us-gaap:OperatingExpenses>
    <us-gaap:OperatingExpenses
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">263320000</us-gaap:OperatingExpenses>
    <us-gaap:OperatingExpenses
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">208272000</us-gaap:OperatingExpenses>
    <us-gaap:OperatingIncomeLoss
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-98534000</us-gaap:OperatingIncomeLoss>
    <us-gaap:OperatingIncomeLoss
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-80412000</us-gaap:OperatingIncomeLoss>
    <us-gaap:OperatingIncomeLoss
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-263320000</us-gaap:OperatingIncomeLoss>
    <us-gaap:OperatingIncomeLoss
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-208272000</us-gaap:OperatingIncomeLoss>
    <us-gaap:InterestIncomeOther
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">3298000</us-gaap:InterestIncomeOther>
    <us-gaap:InterestIncomeOther
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">717000</us-gaap:InterestIncomeOther>
    <us-gaap:InterestIncomeOther
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">10625000</us-gaap:InterestIncomeOther>
    <us-gaap:InterestIncomeOther
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">1109000</us-gaap:InterestIncomeOther>
    <us-gaap:InterestExpense
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">3504000</us-gaap:InterestExpense>
    <us-gaap:InterestExpense
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">1502000</us-gaap:InterestExpense>
    <us-gaap:InterestExpense
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">8741000</us-gaap:InterestExpense>
    <us-gaap:InterestExpense
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">2282000</us-gaap:InterestExpense>
    <us-gaap:NetIncomeLoss
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-98740000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-81197000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-261436000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-209445000</us-gaap:NetIncomeLoss>
    <us-gaap:EarningsPerShareBasic
      contextRef="P07_01_2023To09_30_2023"
      decimals="2"
      unitRef="Unit_USD_per_Share">-5.34</us-gaap:EarningsPerShareBasic>
    <us-gaap:EarningsPerShareDiluted
      contextRef="P07_01_2023To09_30_2023"
      decimals="2"
      unitRef="Unit_USD_per_Share">-5.34</us-gaap:EarningsPerShareDiluted>
    <us-gaap:EarningsPerShareBasic
      contextRef="P07_01_2022To09_30_2022"
      decimals="2"
      unitRef="Unit_USD_per_Share">-4.75</us-gaap:EarningsPerShareBasic>
    <us-gaap:EarningsPerShareDiluted
      contextRef="P07_01_2022To09_30_2022"
      decimals="2"
      unitRef="Unit_USD_per_Share">-4.75</us-gaap:EarningsPerShareDiluted>
    <us-gaap:EarningsPerShareBasic
      contextRef="P01_01_2023To09_30_2023"
      decimals="2"
      unitRef="Unit_USD_per_Share">-14.27</us-gaap:EarningsPerShareBasic>
    <us-gaap:EarningsPerShareDiluted
      contextRef="P01_01_2023To09_30_2023"
      decimals="2"
      unitRef="Unit_USD_per_Share">-14.27</us-gaap:EarningsPerShareDiluted>
    <us-gaap:EarningsPerShareBasic
      contextRef="P01_01_2022To09_30_2022"
      decimals="2"
      unitRef="Unit_USD_per_Share">-12.25</us-gaap:EarningsPerShareBasic>
    <us-gaap:EarningsPerShareDiluted
      contextRef="P01_01_2022To09_30_2022"
      decimals="2"
      unitRef="Unit_USD_per_Share">-12.25</us-gaap:EarningsPerShareDiluted>
    <us-gaap:WeightedAverageNumberOfSharesOutstandingBasic
      contextRef="P07_01_2023To09_30_2023"
      decimals="0"
      unitRef="Unit_shares">18476414</us-gaap:WeightedAverageNumberOfSharesOutstandingBasic>
    <us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding
      contextRef="P07_01_2023To09_30_2023"
      decimals="0"
      unitRef="Unit_shares">18476414</us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding>
    <us-gaap:WeightedAverageNumberOfSharesOutstandingBasic
      contextRef="P07_01_2022To09_30_2022"
      decimals="0"
      unitRef="Unit_shares">17103395</us-gaap:WeightedAverageNumberOfSharesOutstandingBasic>
    <us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding
      contextRef="P07_01_2022To09_30_2022"
      decimals="0"
      unitRef="Unit_shares">17103395</us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding>
    <us-gaap:WeightedAverageNumberOfSharesOutstandingBasic
      contextRef="P01_01_2023To09_30_2023"
      decimals="0"
      unitRef="Unit_shares">18326154</us-gaap:WeightedAverageNumberOfSharesOutstandingBasic>
    <us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding
      contextRef="P01_01_2023To09_30_2023"
      decimals="0"
      unitRef="Unit_shares">18326154</us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding>
    <us-gaap:WeightedAverageNumberOfSharesOutstandingBasic
      contextRef="P01_01_2022To09_30_2022"
      decimals="0"
      unitRef="Unit_shares">17103395</us-gaap:WeightedAverageNumberOfSharesOutstandingBasic>
    <us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding
      contextRef="P01_01_2022To09_30_2022"
      decimals="0"
      unitRef="Unit_shares">17103395</us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding>
    <us-gaap:NetIncomeLoss
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-98740000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-81197000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-261436000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-209445000</us-gaap:NetIncomeLoss>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">47000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">210000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-10000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-157000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:ComprehensiveIncomeNetOfTax
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-98693000</us-gaap:ComprehensiveIncomeNetOfTax>
    <us-gaap:ComprehensiveIncomeNetOfTax
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-80987000</us-gaap:ComprehensiveIncomeNetOfTax>
    <us-gaap:ComprehensiveIncomeNetOfTax
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-261446000</us-gaap:ComprehensiveIncomeNetOfTax>
    <us-gaap:ComprehensiveIncomeNetOfTax
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-209602000</us-gaap:ComprehensiveIncomeNetOfTax>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn12_31_2022_PreferredStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">2369797</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn12_31_2022_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">18102523</us-gaap:CommonStockSharesIssued>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2022_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">1160079000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-32000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-962660000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">197389000</us-gaap:StockholdersEquity>
    <mdgl:StockIssuedDuringPeriodSharesRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P01_01_2023To03_31_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">180551</mdgl:StockIssuedDuringPeriodSharesRelatedPartiesAndExerciseOfCommonStockOptions>
    <mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P01_01_2023To03_31_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">17903000</mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions>
    <mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P01_01_2023To03_31_2023"
      decimals="-3"
      unitRef="Unit_USD">17903000</mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P01_01_2023To03_31_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">11250000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P01_01_2023To03_31_2023"
      decimals="-3"
      unitRef="Unit_USD">11250000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P01_01_2023To03_31_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-54000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P01_01_2023To03_31_2023"
      decimals="-3"
      unitRef="Unit_USD">-54000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued
      contextRef="P01_01_2023To03_31_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">544000</us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued
      contextRef="P01_01_2023To03_31_2023"
      decimals="-3"
      unitRef="Unit_USD">544000</us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2023To03_31_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-76896000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2023To03_31_2023"
      decimals="-3"
      unitRef="Unit_USD">-76896000</us-gaap:NetIncomeLoss>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn03_31_2023_PreferredStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">2369797</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn03_31_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">18283074</us-gaap:CommonStockSharesIssued>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">1189776000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-86000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-1039556000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2023"
      decimals="-3"
      unitRef="Unit_USD">150136000</us-gaap:StockholdersEquity>
    <mdgl:StockIssuedDuringPeriodSharesNewIssuesExcludingSalesToRelatedParties
      contextRef="P04_01_2023To06_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">85901</mdgl:StockIssuedDuringPeriodSharesNewIssuesExcludingSalesToRelatedParties>
    <mdgl:StockIssuedDuringPeriodValueNewIssuesExcludingSalesToRelatedParties
      contextRef="P04_01_2023To06_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">21754000</mdgl:StockIssuedDuringPeriodValueNewIssuesExcludingSalesToRelatedParties>
    <mdgl:StockIssuedDuringPeriodValueNewIssuesExcludingSalesToRelatedParties
      contextRef="P04_01_2023To06_30_2023"
      decimals="-3"
      unitRef="Unit_USD">21754000</mdgl:StockIssuedDuringPeriodValueNewIssuesExcludingSalesToRelatedParties>
    <mdgl:StockIssuedDuringPeriodSharesRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P04_01_2023To06_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">90058</mdgl:StockIssuedDuringPeriodSharesRelatedPartiesAndExerciseOfCommonStockOptions>
    <mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P04_01_2023To06_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">6251000</mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions>
    <mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P04_01_2023To06_30_2023"
      decimals="-3"
      unitRef="Unit_USD">6251000</mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P04_01_2023To06_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">10973000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P04_01_2023To06_30_2023"
      decimals="-3"
      unitRef="Unit_USD">10973000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P04_01_2023To06_30_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-3000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P04_01_2023To06_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-3000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued
      contextRef="P04_01_2023To06_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">195000</us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued
      contextRef="P04_01_2023To06_30_2023"
      decimals="-3"
      unitRef="Unit_USD">195000</us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued>
    <us-gaap:NetIncomeLoss
      contextRef="P04_01_2023To06_30_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-85800000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P04_01_2023To06_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-85800000</us-gaap:NetIncomeLoss>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn06_30_2023_PreferredStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">2369797</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn06_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">18459033</us-gaap:CommonStockSharesIssued>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">1228949000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-89000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-1125356000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2023"
      decimals="-3"
      unitRef="Unit_USD">103506000</us-gaap:StockholdersEquity>
    <mdgl:StockIssuedDuringPeriodSharesNewIssuesExcludingSalesToRelatedParties
      contextRef="P07_01_2023To09_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">12200</mdgl:StockIssuedDuringPeriodSharesNewIssuesExcludingSalesToRelatedParties>
    <mdgl:StockIssuedDuringPeriodValueNewIssuesExcludingSalesToRelatedParties
      contextRef="P07_01_2023To09_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2731000</mdgl:StockIssuedDuringPeriodValueNewIssuesExcludingSalesToRelatedParties>
    <mdgl:StockIssuedDuringPeriodValueNewIssuesExcludingSalesToRelatedParties
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">2731000</mdgl:StockIssuedDuringPeriodValueNewIssuesExcludingSalesToRelatedParties>
    <mdgl:StockIssuedDuringPeriodSharesRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P07_01_2023To09_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">22959</mdgl:StockIssuedDuringPeriodSharesRelatedPartiesAndExerciseOfCommonStockOptions>
    <mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P07_01_2023To09_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">1924000</mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions>
    <mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">1924000</mdgl:StockIssuedDuringPeriodValueRelatedPartiesAndExerciseOfCommonStockOptions>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P07_01_2023To09_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">12660000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">12660000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P07_01_2023To09_30_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">47000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">47000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued
      contextRef="P07_01_2023To09_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">121000</us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">121000</us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued>
    <us-gaap:NetIncomeLoss
      contextRef="P07_01_2023To09_30_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-98740000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-98740000</us-gaap:NetIncomeLoss>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn09_30_2023_PreferredStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">2369797</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn09_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">18494192</us-gaap:CommonStockSharesIssued>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2023_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2023_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">1246385000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2023_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-42000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2023_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-1224096000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">22249000</us-gaap:StockholdersEquity>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn12_31_2021_PreferredStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">1969797</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn12_31_2021_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">17103395</us-gaap:CommonStockSharesIssued>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2021_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2021_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">863495000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2021_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-80000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2021_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-667310000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn12_31_2021"
      decimals="-3"
      unitRef="Unit_USD">196107000</us-gaap:StockholdersEquity>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P01_01_2022To03_31_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">7477000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P01_01_2022To03_31_2022"
      decimals="-3"
      unitRef="Unit_USD">7477000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P01_01_2022To03_31_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-322000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P01_01_2022To03_31_2022"
      decimals="-3"
      unitRef="Unit_USD">-322000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2022To03_31_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-57518000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2022To03_31_2022"
      decimals="-3"
      unitRef="Unit_USD">-57518000</us-gaap:NetIncomeLoss>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn03_31_2022_PreferredStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">1969797</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn03_31_2022_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">17103395</us-gaap:CommonStockSharesIssued>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2022_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">870972000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-402000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-724828000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn03_31_2022"
      decimals="-3"
      unitRef="Unit_USD">145744000</us-gaap:StockholdersEquity>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P04_01_2022To06_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">7944000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P04_01_2022To06_30_2022"
      decimals="-3"
      unitRef="Unit_USD">7944000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P04_01_2022To06_30_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-45000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P04_01_2022To06_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-45000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued
      contextRef="P04_01_2022To06_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">622000</us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued
      contextRef="P04_01_2022To06_30_2022"
      decimals="-3"
      unitRef="Unit_USD">622000</us-gaap:AdjustmentsToAdditionalPaidInCapitalWarrantIssued>
    <us-gaap:NetIncomeLoss
      contextRef="P04_01_2022To06_30_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-70730000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P04_01_2022To06_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-70730000</us-gaap:NetIncomeLoss>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn06_30_2022_PreferredStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">1969797</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn06_30_2022_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">17103395</us-gaap:CommonStockSharesIssued>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2022_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">879538000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-447000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-795558000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn06_30_2022"
      decimals="-3"
      unitRef="Unit_USD">83535000</us-gaap:StockholdersEquity>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P07_01_2022To09_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">8122000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">8122000</us-gaap:AdjustmentsToAdditionalPaidInCapitalShareBasedCompensationStockOptionsRequisiteServicePeriodRecognition>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P07_01_2022To09_30_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">210000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">210000</us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentNetOfTaxPortionAttributableToParent>
    <us-gaap:NetIncomeLoss
      contextRef="P07_01_2022To09_30_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-81197000</us-gaap:NetIncomeLoss>
    <us-gaap:NetIncomeLoss
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-81197000</us-gaap:NetIncomeLoss>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn09_30_2022_PreferredStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">1969797</us-gaap:CommonStockSharesIssued>
    <us-gaap:CommonStockSharesIssued
      contextRef="PAsOn09_30_2022_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="INF"
      unitRef="Unit_shares">17103395</us-gaap:CommonStockSharesIssued>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2022_CommonStockMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">2000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2022_AdditionalPaidInCapitalMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">887660000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2022_AccumulatedOtherComprehensiveIncomeMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-237000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2022_RetainedEarningsMemberusgaapStatementEquityComponentsAxis"
      decimals="-3"
      unitRef="Unit_USD">-876755000</us-gaap:StockholdersEquity>
    <us-gaap:StockholdersEquity
      contextRef="PAsOn09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">10670000</us-gaap:StockholdersEquity>
    <us-gaap:ProfitLoss
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-261436000</us-gaap:ProfitLoss>
    <us-gaap:ProfitLoss
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-209445000</us-gaap:ProfitLoss>
    <us-gaap:ShareBasedCompensation
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">34883000</us-gaap:ShareBasedCompensation>
    <us-gaap:ShareBasedCompensation
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">23543000</us-gaap:ShareBasedCompensation>
    <us-gaap:DepreciationDepletionAndAmortization
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">385000</us-gaap:DepreciationDepletionAndAmortization>
    <us-gaap:DepreciationDepletionAndAmortization
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">338000</us-gaap:DepreciationDepletionAndAmortization>
    <us-gaap:AmortizationOfFinancingCostsAndDiscounts
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">1661000</us-gaap:AmortizationOfFinancingCostsAndDiscounts>
    <us-gaap:AmortizationOfFinancingCostsAndDiscounts
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">491000</us-gaap:AmortizationOfFinancingCostsAndDiscounts>
    <us-gaap:IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">523000</us-gaap:IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets>
    <us-gaap:IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">2582000</us-gaap:IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets>
    <us-gaap:IncreaseDecreaseInAccountsPayableTrade
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-7289000</us-gaap:IncreaseDecreaseInAccountsPayableTrade>
    <us-gaap:IncreaseDecreaseInAccountsPayableTrade
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-2818000</us-gaap:IncreaseDecreaseInAccountsPayableTrade>
    <us-gaap:IncreaseDecreaseInAccruedLiabilities
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-8851000</us-gaap:IncreaseDecreaseInAccruedLiabilities>
    <us-gaap:IncreaseDecreaseInAccruedLiabilities
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">24550000</us-gaap:IncreaseDecreaseInAccruedLiabilities>
    <mdgl:IncreaseDecreaseInAccruedInterestNetOfInterestReceived
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-3127000</mdgl:IncreaseDecreaseInAccruedInterestNetOfInterestReceived>
    <mdgl:IncreaseDecreaseInAccruedInterestNetOfInterestReceived
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-419000</mdgl:IncreaseDecreaseInAccruedInterestNetOfInterestReceived>
    <us-gaap:NetCashProvidedByUsedInOperatingActivities
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-244297000</us-gaap:NetCashProvidedByUsedInOperatingActivities>
    <us-gaap:NetCashProvidedByUsedInOperatingActivities
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">-166342000</us-gaap:NetCashProvidedByUsedInOperatingActivities>
    <us-gaap:PaymentsToAcquireMarketableSecurities
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">359549000</us-gaap:PaymentsToAcquireMarketableSecurities>
    <us-gaap:PaymentsToAcquireMarketableSecurities
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">130693000</us-gaap:PaymentsToAcquireMarketableSecurities>
    <us-gaap:ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">219595000</us-gaap:ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities>
    <us-gaap:ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">271180000</us-gaap:ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities>
    <us-gaap:PaymentsToAcquirePropertyPlantAndEquipment
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">443000</us-gaap:PaymentsToAcquirePropertyPlantAndEquipment>
    <us-gaap:PaymentsToAcquirePropertyPlantAndEquipment
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">188000</us-gaap:PaymentsToAcquirePropertyPlantAndEquipment>
    <us-gaap:NetCashProvidedByUsedInInvestingActivities
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-140397000</us-gaap:NetCashProvidedByUsedInInvestingActivities>
    <us-gaap:NetCashProvidedByUsedInInvestingActivities
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">140299000</us-gaap:NetCashProvidedByUsedInInvestingActivities>
    <mdgl:ProceedsFromIssuanceOrSaleOfEquityNet
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">24484000</mdgl:ProceedsFromIssuanceOrSaleOfEquityNet>
    <mdgl:ProceedsFromIssuanceOrSaleOfEquityNet
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">0</mdgl:ProceedsFromIssuanceOrSaleOfEquityNet>
    <mdgl:ProceedsFromTheSaleOfRelatedPartyStockAndExerciseOfCommonStockOptionsNetOfTransactionCosts
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">26079000</mdgl:ProceedsFromTheSaleOfRelatedPartyStockAndExerciseOfCommonStockOptionsNetOfTransactionCosts>
    <mdgl:ProceedsFromTheSaleOfRelatedPartyStockAndExerciseOfCommonStockOptionsNetOfTransactionCosts
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">0</mdgl:ProceedsFromTheSaleOfRelatedPartyStockAndExerciseOfCommonStockOptionsNetOfTransactionCosts>
    <us-gaap:ProceedsFromBankDebt
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">65000000</us-gaap:ProceedsFromBankDebt>
    <us-gaap:ProceedsFromBankDebt
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">50000000</us-gaap:ProceedsFromBankDebt>
    <us-gaap:PaymentsOfDebtIssuanceCosts
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">363000</us-gaap:PaymentsOfDebtIssuanceCosts>
    <us-gaap:PaymentsOfDebtIssuanceCosts
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">886000</us-gaap:PaymentsOfDebtIssuanceCosts>
    <us-gaap:NetCashProvidedByUsedInFinancingActivities
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">115200000</us-gaap:NetCashProvidedByUsedInFinancingActivities>
    <us-gaap:NetCashProvidedByUsedInFinancingActivities
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">49114000</us-gaap:NetCashProvidedByUsedInFinancingActivities>
    <us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">-269494000</us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect>
    <us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">23071000</us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect>
    <us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">331549000</us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents>
    <us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents
      contextRef="PAsOn12_31_2021"
      decimals="-3"
      unitRef="Unit_USD">36269000</us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents>
    <us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">62055000</us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents>
    <us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents
      contextRef="PAsOn09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">59340000</us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents>
    <us-gaap:RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">1628000</us-gaap:RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability>
    <us-gaap:RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">583000</us-gaap:RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability>
    <us-gaap:OrganizationConsolidationAndPresentationOfFinancialStatementsDisclosureTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 12pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;1. Organization, Business, and Basis of Presentation &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 6pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Organization and Business &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Madrigal Pharmaceuticals, Inc. (the &#x201c;Company&#x201d; or &#x201c;Madrigal&#x201d;) is a clinical-stage pharmaceutical company developing novel, high-quality, small-molecule drugs addressing major unmet needs in cardiovascular, metabolic, and liver diseases. The Company&#x2019;s lead compound, resmetirom, is being advanced for &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;non-alcoholic&lt;/div&gt; steatohepatitis (&#x201c;NASH&#x201d;), a liver disease that commonly affects people with metabolic diseases such as obesity and diabetes, and &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;non-alcoholic&lt;/div&gt; fatty liver disease (&#x201c;NAFLD&#x201d;). The Company initiated two Phase 3 studies of resmetirom in NASH in 2019 that are ongoing. The Company announced certain topline results from the &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;MAESTRO-NAFLD-1&lt;/div&gt; safety study of resmetirom in January 2022 and the MAESTRO-NASH study in December 2022. In August 2022, Madrigal initiated a third study, MAESTRO-NASH-OUTCOMES. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Basis of Presentation &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Certain information and footnote disclosures normally included in financial statements prepared in accordance with accounting principles generally accepted in the United States (&#x201c;GAAP&#x201d;) have been condensed or omitted. Accordingly, the unaudited condensed consolidated financial statements do not include all information and footnotes required by GAAP for complete annual financial statements. However, the Company believes that the disclosures included in these financial statements are adequate to make the information presented not misleading. The unaudited condensed consolidated financial statements, in the opinion of management, reflect all adjustments, which include normal recurring adjustments, necessary for a fair statement of such interim results. The interim results are not necessarily indicative of the results that the Company will have for the full year ending December&#160;31, 2023 or any subsequent period. These unaudited condensed consolidated financial statements should be read in conjunction with the audited consolidated financial statements and the notes to those statements for the year ended December&#160;31, 2022. &lt;/div&gt;</us-gaap:OrganizationConsolidationAndPresentationOfFinancialStatementsDisclosureTextBlock>
    <us-gaap:OrganizationConsolidationBasisOfPresentationBusinessDescriptionAndAccountingPoliciesTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2. Summary of Significant Accounting Policies &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 6pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Principle of Consolidation &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The consolidated financial statements include the financial statements of the Company and its wholly owned subsidiaries. All significant intercompany balances have been eliminated in consolidation. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Use of Estimates &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The preparation of financial statements in conformity with GAAP requires management to make estimates and assumptions that affect certain reported amounts of assets and liabilities, and the reported amounts of revenues and expenses during the reporting periods. The Company bases its estimates on historical experience and various other assumptions that management believes to be reasonable under the circumstances. Changes in estimates are recorded in the period in which they become known. Actual results could differ from those estimates. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Cash and Cash Equivalents &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company considers all highly liquid investments with original maturities of three months or less at the date of purchase to be cash equivalents. The Company maintains its cash in bank accounts, the balance of which, at times, exceeds Federal Deposit Insurance Corporation insured limits. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The primary objective of the Company&#x2019;s investment activities is to preserve its capital for the purpose of funding operations and the Company does not enter into investments for trading or speculative purposes. The Company&#x2019;s cash is deposited in highly rated financial institutions in the United States. The Company invests in money market funds and high-grade, commercial paper and corporate bonds, which management believes are subject to minimal credit and market risk. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Marketable Securities &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Marketable securities consist of investments in high-grade corporate obligations and government and government agency obligations that are classified as &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;available-for-sale.&lt;/div&gt;&lt;/div&gt; Since these securities are available to fund current operations, they are classified as current assets on the consolidated balance sheets. &lt;/div&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company adjusts the cost of &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;available-for-sale&lt;/div&gt;&lt;/div&gt; debt securities for amortization of premiums and accretion of discounts to maturity. The Company includes such amortization and accretion as a component of interest income, net. Realized gains and losses and declines in value, if any, that the Company judges to be the result of impairment or as a result of recognizing an allowance for credit losses on &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;available-for-sale&lt;/div&gt;&lt;/div&gt; securities are reported as a component of interest income. To determine whether an impairment exists, the Company considers whether it intends to sell the debt security and, if the Company does not intend to sell the debt security, it considers available evidence to assess whether it is more likely than not that it will be required to sell the security before the recovery of its amortized cost basis. During the nine months ended September&#160;30, 2023 and 2022, the Company determined it did &lt;div style="display:inline;"&gt;no&lt;/div&gt;t have any securities that were other-than-temporarily impaired. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Marketable securities are stated at fair value, including accrued interest, with their unrealized gains and losses included as a component of accumulated other comprehensive income or loss, which is a separate component of stockholders&#x2019; equity. The fair value of these securities is based on quoted prices and observable inputs on a recurring basis. Realized gains and losses are determined on the specific identification method. During the nine months ended September&#160;30, 2023 and 2022, the Company did not have any realized gains or losses on marketable securities. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Fair Value of Financial Instruments &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The carrying amounts of the Company&#x2019;s financial instruments, which include cash equivalents and marketable securities, approximate their fair values. The fair value of the Company&#x2019;s financial instruments reflects the amounts that would be received upon sale of an asset or paid to transfer a liability in an orderly transaction between market participants at the measurement date. The fair value hierarchy has the following three levels: &lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; margin-left:4%; font-size:10pt; font-family:Times New Roman"&gt;Level 1&#x2014;quoted prices in active markets for identical assets and liabilities. &lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; margin-left:4%; font-size:10pt; font-family:Times New Roman"&gt;Level 2&#x2014;observable inputs other than Level&#160;1 inputs. Examples of Level&#160;2 inputs include quoted prices in active markets for similar assets or liabilities and quoted prices for identical assets or liabilities in markets that are not active. &lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; margin-left:4%; font-size:10pt; font-family:Times New Roman"&gt;Level 3&#x2014;unobservable inputs that reflect the Company&#x2019;s own assumptions about the assumptions market participants would use in pricing the asset or liability. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Financial assets and liabilities are classified in their entirety within the fair value hierarchy based on the lowest level of input that is significant to the fair value measurement. The Company measures the fair value of its marketable securities by taking into consideration valuations obtained from third- party pricing sources. The pricing services utilize industry standard valuation models, including both income and market based approaches, for which all significant inputs are observable, either directly or indirectly, to estimate fair value. These inputs include reported trades of and broker-dealer quotes on the same or similar securities, issuer credit spreads, benchmark securities and other observable inputs. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;As of September&#160;30, 2023, the Company&#x2019;s financial assets valued based on Level&#160;1 inputs consisted of cash and cash equivalents in a money market fund, its financial assets valued based on Level&#160;2 inputs consisted of high-grade corporate and government agency bonds and commercial paper, and it had no financial assets valued based on Level&#160;3 inputs. During the nine months ended September&#160;30, 2023 and 2022, the Company did not have any transfers of financial assets between Levels 1 and 2. As of September&#160;30, 2023 and December&#160;31, 2022, the Company did not have any financial liabilities that were recorded at fair value on a recurring basis on the balance sheet. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Research and Development Costs &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Research and development costs are expensed as incurred. Research and development costs are comprised of costs incurred in performing research and development activities, including internal costs (including stock-based compensation), costs for consultants, milestone payments under licensing agreements, and other costs associated with the Company&#x2019;s preclinical and clinical programs. In particular, the Company has conducted safety studies in animals, optimized and implemented the manufacturing of its drug, and conducted clinical trials, all of which are considered research and development expenditures. Management uses significant judgment in estimating the amount of research and development costs recognized in each reporting period. Management analyzes and estimates the progress of its clinical trials, completion of milestone events per underlying agreements, invoices received and contracted costs when estimating the research and development costs to accrue in each reporting period. Actual results could differ from the Company&#x2019;s estimates. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Patents &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Costs to secure and defend patents are expensed as incurred and are classified as general and administrative expense in the Company&#x2019;s consolidated statements of operations. &lt;/div&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Stock-Based Compensation &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company recognizes stock-based compensation expense based on the grant date fair value of stock options, restricted stock units, and other stock-based compensation awards granted to employees, officers, directors, and consultants. Awards that vest as the recipient provides service are expensed on a straight-line basis over the requisite service period. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company uses the Black-Scholes option pricing model to determine the grant date fair value of stock options as management believes it is the most appropriate valuation method for its option grants. The Black-Scholes model requires inputs for risk-free interest rate, dividend yield, volatility and expected lives of the options. The expected lives for options granted represent the period of time that options granted are expected to be outstanding. The Company uses the simplified method for determining the expected lives of options. Expected volatility is based upon an industry estimate or blended rate including the Company&#x2019;s historical trading activity. The risk-free rate for periods within the expected life of the option is based on the U.S. Treasury yield curve in effect at the time of the grant. The Company estimates the forfeiture rate based on historical data. This analysis is &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;re-evaluated&lt;/div&gt; at least annually and the forfeiture rate is adjusted as necessary. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;For other stock-based compensation awards granted to employees and directors that vest based on market conditions, such as the trading price of the Company&#x2019;s common stock achieving or exceeding certain price targets, the Company uses a Monte Carlo simulation model to estimate the grant date fair value and recognize stock compensation expense over the derived service period. The Monte Carlo simulation model requires key inputs for risk-free interest rate, dividend yield, volatility, and expected life. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The assumptions used in computing the fair value of equity awards reflect the Company&#x2019;s best estimates but involve uncertainties related to market and other conditions. Changes in any of these assumptions may materially affect the fair value of awards granted and the amount of stock-based compensation recognized. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Income Taxes &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company uses the asset and liability method to account for income taxes. Deferred tax assets and liabilities are determined based on the expected future tax consequences of temporary differences between the Company&#x2019;s financial statement carrying amounts and the tax basis of assets and liabilities using enacted tax rates expected to be in effect in the years in which the differences are expected to reverse. The Company currently maintains a 100% valuation allowance on its deferred tax assets. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Comprehensive Loss &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Comprehensive loss is defined as the change in equity of a business enterprise during a period from transactions and other events and circumstances from &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;non-owner&lt;/div&gt; sources. Changes in unrealized gains and losses on marketable securities represent the only difference between the Company&#x2019;s net loss and comprehensive loss. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Basic and Diluted Loss Per Common Share &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Basic net loss per share is computed using the weighted average number of common shares outstanding during the period. Diluted net loss per common share is computed using the weighted average number of common shares outstanding and the weighted average dilutive potential common shares outstanding using the treasury stock method. However, for the nine months ended September&#160;30, 2023 and 2022, diluted net loss per share is the same as basic net loss per share because the inclusion of weighted average shares of common stock issuable upon the exercise of stock options and warrants or vesting of restricted stock units, and common stock issuable upon the conversion of preferred stock would be anti-dilutive. The following table summarizes outstanding securities not included in the computation of diluted net loss per common share, as their inclusion would be anti-dilutive: &lt;/div&gt;&lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:76%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:76%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:2%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:2%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="6" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Outstanding&#160;at&#160;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Common stock options&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,518,612&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,026,163&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Restricted stock units&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;311,767&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other stock-based awards&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;150,000&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Preferred stock&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,369,797&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;1,969,797&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Warrants&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;19,454&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;14,899&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Recent Accounting Pronouncements &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;None &lt;/div&gt;</us-gaap:OrganizationConsolidationBasisOfPresentationBusinessDescriptionAndAccountingPoliciesTextBlock>
    <us-gaap:ConsolidationPolicyTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 6pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Principle of Consolidation &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The consolidated financial statements include the financial statements of the Company and its wholly owned subsidiaries. All significant intercompany balances have been eliminated in consolidation. &lt;/div&gt;</us-gaap:ConsolidationPolicyTextBlock>
    <us-gaap:UseOfEstimates contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Use of Estimates &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The preparation of financial statements in conformity with GAAP requires management to make estimates and assumptions that affect certain reported amounts of assets and liabilities, and the reported amounts of revenues and expenses during the reporting periods. The Company bases its estimates on historical experience and various other assumptions that management believes to be reasonable under the circumstances. Changes in estimates are recorded in the period in which they become known. Actual results could differ from those estimates. &lt;/div&gt;</us-gaap:UseOfEstimates>
    <us-gaap:CashAndCashEquivalentsPolicyTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Cash and Cash Equivalents &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company considers all highly liquid investments with original maturities of three months or less at the date of purchase to be cash equivalents. The Company maintains its cash in bank accounts, the balance of which, at times, exceeds Federal Deposit Insurance Corporation insured limits. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The primary objective of the Company&#x2019;s investment activities is to preserve its capital for the purpose of funding operations and the Company does not enter into investments for trading or speculative purposes. The Company&#x2019;s cash is deposited in highly rated financial institutions in the United States. The Company invests in money market funds and high-grade, commercial paper and corporate bonds, which management believes are subject to minimal credit and market risk. &lt;/div&gt;</us-gaap:CashAndCashEquivalentsPolicyTextBlock>
    <us-gaap:MarketableSecuritiesPolicy contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Marketable Securities &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Marketable securities consist of investments in high-grade corporate obligations and government and government agency obligations that are classified as &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;available-for-sale.&lt;/div&gt;&lt;/div&gt; Since these securities are available to fund current operations, they are classified as current assets on the consolidated balance sheets. &lt;/div&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company adjusts the cost of &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;available-for-sale&lt;/div&gt;&lt;/div&gt; debt securities for amortization of premiums and accretion of discounts to maturity. The Company includes such amortization and accretion as a component of interest income, net. Realized gains and losses and declines in value, if any, that the Company judges to be the result of impairment or as a result of recognizing an allowance for credit losses on &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;available-for-sale&lt;/div&gt;&lt;/div&gt; securities are reported as a component of interest income. To determine whether an impairment exists, the Company considers whether it intends to sell the debt security and, if the Company does not intend to sell the debt security, it considers available evidence to assess whether it is more likely than not that it will be required to sell the security before the recovery of its amortized cost basis. During the nine months ended September&#160;30, 2023 and 2022, the Company determined it did &lt;div style="display:inline;"&gt;no&lt;/div&gt;t have any securities that were other-than-temporarily impaired. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Marketable securities are stated at fair value, including accrued interest, with their unrealized gains and losses included as a component of accumulated other comprehensive income or loss, which is a separate component of stockholders&#x2019; equity. The fair value of these securities is based on quoted prices and observable inputs on a recurring basis. Realized gains and losses are determined on the specific identification method. During the nine months ended September&#160;30, 2023 and 2022, the Company did not have any realized gains or losses on marketable securities. &lt;/div&gt;</us-gaap:MarketableSecuritiesPolicy>
    <us-gaap:FairValueOfFinancialInstrumentsPolicy contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Fair Value of Financial Instruments &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The carrying amounts of the Company&#x2019;s financial instruments, which include cash equivalents and marketable securities, approximate their fair values. The fair value of the Company&#x2019;s financial instruments reflects the amounts that would be received upon sale of an asset or paid to transfer a liability in an orderly transaction between market participants at the measurement date. The fair value hierarchy has the following three levels: &lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; margin-left:4%; font-size:10pt; font-family:Times New Roman"&gt;Level 1&#x2014;quoted prices in active markets for identical assets and liabilities. &lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; margin-left:4%; font-size:10pt; font-family:Times New Roman"&gt;Level 2&#x2014;observable inputs other than Level&#160;1 inputs. Examples of Level&#160;2 inputs include quoted prices in active markets for similar assets or liabilities and quoted prices for identical assets or liabilities in markets that are not active. &lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; margin-left:4%; font-size:10pt; font-family:Times New Roman"&gt;Level 3&#x2014;unobservable inputs that reflect the Company&#x2019;s own assumptions about the assumptions market participants would use in pricing the asset or liability. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Financial assets and liabilities are classified in their entirety within the fair value hierarchy based on the lowest level of input that is significant to the fair value measurement. The Company measures the fair value of its marketable securities by taking into consideration valuations obtained from third- party pricing sources. The pricing services utilize industry standard valuation models, including both income and market based approaches, for which all significant inputs are observable, either directly or indirectly, to estimate fair value. These inputs include reported trades of and broker-dealer quotes on the same or similar securities, issuer credit spreads, benchmark securities and other observable inputs. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;As of September&#160;30, 2023, the Company&#x2019;s financial assets valued based on Level&#160;1 inputs consisted of cash and cash equivalents in a money market fund, its financial assets valued based on Level&#160;2 inputs consisted of high-grade corporate and government agency bonds and commercial paper, and it had no financial assets valued based on Level&#160;3 inputs. During the nine months ended September&#160;30, 2023 and 2022, the Company did not have any transfers of financial assets between Levels 1 and 2. As of September&#160;30, 2023 and December&#160;31, 2022, the Company did not have any financial liabilities that were recorded at fair value on a recurring basis on the balance sheet. &lt;/div&gt;</us-gaap:FairValueOfFinancialInstrumentsPolicy>
    <us-gaap:ResearchAndDevelopmentExpensePolicy contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Research and Development Costs &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Research and development costs are expensed as incurred. Research and development costs are comprised of costs incurred in performing research and development activities, including internal costs (including stock-based compensation), costs for consultants, milestone payments under licensing agreements, and other costs associated with the Company&#x2019;s preclinical and clinical programs. In particular, the Company has conducted safety studies in animals, optimized and implemented the manufacturing of its drug, and conducted clinical trials, all of which are considered research and development expenditures. Management uses significant judgment in estimating the amount of research and development costs recognized in each reporting period. Management analyzes and estimates the progress of its clinical trials, completion of milestone events per underlying agreements, invoices received and contracted costs when estimating the research and development costs to accrue in each reporting period. Actual results could differ from the Company&#x2019;s estimates. &lt;/div&gt;</us-gaap:ResearchAndDevelopmentExpensePolicy>
    <mdgl:PatentsPolicyTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Patents &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Costs to secure and defend patents are expensed as incurred and are classified as general and administrative expense in the Company&#x2019;s consolidated statements of operations. &lt;/div&gt;</mdgl:PatentsPolicyTextBlock>
    <us-gaap:ShareBasedCompensationOptionAndIncentivePlansPolicy contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Stock-Based Compensation &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company recognizes stock-based compensation expense based on the grant date fair value of stock options, restricted stock units, and other stock-based compensation awards granted to employees, officers, directors, and consultants. Awards that vest as the recipient provides service are expensed on a straight-line basis over the requisite service period. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company uses the Black-Scholes option pricing model to determine the grant date fair value of stock options as management believes it is the most appropriate valuation method for its option grants. The Black-Scholes model requires inputs for risk-free interest rate, dividend yield, volatility and expected lives of the options. The expected lives for options granted represent the period of time that options granted are expected to be outstanding. The Company uses the simplified method for determining the expected lives of options. Expected volatility is based upon an industry estimate or blended rate including the Company&#x2019;s historical trading activity. The risk-free rate for periods within the expected life of the option is based on the U.S. Treasury yield curve in effect at the time of the grant. The Company estimates the forfeiture rate based on historical data. This analysis is &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;re-evaluated&lt;/div&gt; at least annually and the forfeiture rate is adjusted as necessary. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;For other stock-based compensation awards granted to employees and directors that vest based on market conditions, such as the trading price of the Company&#x2019;s common stock achieving or exceeding certain price targets, the Company uses a Monte Carlo simulation model to estimate the grant date fair value and recognize stock compensation expense over the derived service period. The Monte Carlo simulation model requires key inputs for risk-free interest rate, dividend yield, volatility, and expected life. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The assumptions used in computing the fair value of equity awards reflect the Company&#x2019;s best estimates but involve uncertainties related to market and other conditions. Changes in any of these assumptions may materially affect the fair value of awards granted and the amount of stock-based compensation recognized. &lt;/div&gt;</us-gaap:ShareBasedCompensationOptionAndIncentivePlansPolicy>
    <us-gaap:IncomeTaxPolicyTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Income Taxes &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company uses the asset and liability method to account for income taxes. Deferred tax assets and liabilities are determined based on the expected future tax consequences of temporary differences between the Company&#x2019;s financial statement carrying amounts and the tax basis of assets and liabilities using enacted tax rates expected to be in effect in the years in which the differences are expected to reverse. The Company currently maintains a 100% valuation allowance on its deferred tax assets. &lt;/div&gt;</us-gaap:IncomeTaxPolicyTextBlock>
    <mdgl:DeferredTaxAssetsPercentageOfValuationAllowance
      contextRef="P01_01_2023To09_30_2023"
      decimals="2"
      unitRef="Unit_pure">1</mdgl:DeferredTaxAssetsPercentageOfValuationAllowance>
    <us-gaap:ComprehensiveIncomePolicyPolicyTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Comprehensive Loss &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Comprehensive loss is defined as the change in equity of a business enterprise during a period from transactions and other events and circumstances from &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;non-owner&lt;/div&gt; sources. Changes in unrealized gains and losses on marketable securities represent the only difference between the Company&#x2019;s net loss and comprehensive loss. &lt;/div&gt;</us-gaap:ComprehensiveIncomePolicyPolicyTextBlock>
    <us-gaap:EarningsPerSharePolicyTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Basic and Diluted Loss Per Common Share &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Basic net loss per share is computed using the weighted average number of common shares outstanding during the period. Diluted net loss per common share is computed using the weighted average number of common shares outstanding and the weighted average dilutive potential common shares outstanding using the treasury stock method. However, for the nine months ended September&#160;30, 2023 and 2022, diluted net loss per share is the same as basic net loss per share because the inclusion of weighted average shares of common stock issuable upon the exercise of stock options and warrants or vesting of restricted stock units, and common stock issuable upon the conversion of preferred stock would be anti-dilutive. The following table summarizes outstanding securities not included in the computation of diluted net loss per common share, as their inclusion would be anti-dilutive: &lt;/div&gt;&lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:76%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:76%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:2%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:2%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="6" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Outstanding&#160;at&#160;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Common stock options&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,518,612&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,026,163&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Restricted stock units&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;311,767&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other stock-based awards&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;150,000&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Preferred stock&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,369,797&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;1,969,797&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Warrants&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;19,454&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;14,899&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</us-gaap:EarningsPerSharePolicyTextBlock>
    <us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock contextRef="P01_01_2023To09_30_2023">The following table summarizes outstanding securities not included in the computation of diluted net loss per common share, as their inclusion would be anti-dilutive: &lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:76%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:76%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:2%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:2%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="6" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Outstanding&#160;at&#160;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Common stock options&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,518,612&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,026,163&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Restricted stock units&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;311,767&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other stock-based awards&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;150,000&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Preferred stock&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,369,797&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;1,969,797&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Warrants&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;19,454&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;14,899&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">2518612</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">3026163</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2023To09_30_2023_RestrictedStockUnitsRSUMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">311767</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2022To09_30_2022_RestrictedStockUnitsRSUMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">0</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2023To09_30_2023_OtherStockBasedCompensationMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">150000</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2022To09_30_2022_OtherStockBasedCompensationMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">0</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2023To09_30_2023_PreferredStockMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">2369797</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2022To09_30_2022_PreferredStockMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">1969797</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2023To09_30_2023_WarrantMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">19454</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount
      contextRef="P01_01_2022To09_30_2022_WarrantMemberusgaapAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"
      decimals="0"
      unitRef="Unit_shares">14899</us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount>
    <us-gaap:NewAccountingPronouncementsPolicyPolicyTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Recent Accounting Pronouncements &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;None &lt;/div&gt;</us-gaap:NewAccountingPronouncementsPolicyPolicyTextBlock>
    <us-gaap:SubstantialDoubtAboutGoingConcernTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;3. Liquidity and Uncertainties &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company is subject to risks common to development stage companies in the biopharmaceutical industry including, but not limited to, uncertainty of product development and commercialization, dependence on key personnel, uncertainty of market acceptance of products and product reimbursement, product liability, uncertain protection of proprietary technology, potential inability to raise additional financing necessary for development and commercialization, and compliance with the U.S. Food and Drug Administration (FDA) and other government regulations. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company has incurred losses since inception, including approximately $261.4&#160;million for the nine months ended September&#160;30, 2023, resulting in an accumulated deficit of approximately $1,224.1&#160;million as of September&#160;30, 2023. Management expects to incur losses for the foreseeable future. To date, the Company has funded its operations primarily through proceeds from sales of the Company&#x2019;s capital stock and debt financings. In October 2023, the Company completed a public offering and received approximately $472.0&#160;million net cash proceeds. Please see &#x201c;Note 10 &#x2013; Subsequent Events&#x201d; to the condensed consolidated financial statements included in this Quarterly Report on Form &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;10-Q&lt;/div&gt; for more information. The Company believes that its cash, cash equivalents and marketable securities will be sufficient to fund operations past one year from the issuance of these financial statements. To meet its future capital needs, the Company may need to raise additional capital through debt or equity financings, collaborations, partnerships or other strategic transactions. However, there can be no assurance that the Company will be able to complete any such transactions on acceptable terms or otherwise. The inability of the Company to obtain sufficient funds on acceptable terms when needed, if at all, could have a material adverse effect on the Company&#x2019;s business, results of operations and financial condition. The Company has the ability to delay certain research activities and related clinical expenses if necessary due to liquidity concerns until a date when those concerns are relieved. &lt;/div&gt;</us-gaap:SubstantialDoubtAboutGoingConcernTextBlock>
    <us-gaap:NetIncomeLoss
      contextRef="P01_01_2023To09_30_2023"
      decimals="-5"
      unitRef="Unit_USD">-261400000</us-gaap:NetIncomeLoss>
    <us-gaap:RetainedEarningsAccumulatedDeficit
      contextRef="PAsOn09_30_2023"
      decimals="-5"
      unitRef="Unit_USD">-1224100000</us-gaap:RetainedEarningsAccumulatedDeficit>
    <us-gaap:ProceedsFromIssuanceOfCommonStock
      contextRef="P10_01_2023To10_31_2023_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="-5"
      unitRef="Unit_USD">472000000</us-gaap:ProceedsFromIssuanceOfCommonStock>
    <us-gaap:CashCashEquivalentsAndMarketableSecuritiesTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;4. Cash, Cash Equivalents and Marketable Securities &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;A summary of cash, cash equivalents and &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;available-for-sale&lt;/div&gt;&lt;/div&gt; marketable securities held by the Company as of September&#160;30, 2023 and December&#160;31, 2022 is as follows (in thousands): &lt;/div&gt;&lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:92%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:63%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="14" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;September&#160;30,&#160;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Cost&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Unrealized&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;gains&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Unrealized&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;losses&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Fair&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;value&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Cash and cash equivalents:&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Cash (Level&#160;1)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;10,670&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;10,670&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Money market funds (Level 1)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;50,636&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;50,636&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Corporate debt securities due within 3&#160;months of date of purchase (Level&#160;2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;749&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;749&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total cash and cash equivalents&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;62,055&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;62,055&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Marketable securities:&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Corporate debt securities due within 1&#160;year of date of purchase (Level&#160;2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;94,710&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;9&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(42&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;94,677&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;U.S. government and government sponsored entities due within 1 year of date of purchase (Level 2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;74,888&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(4&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;74,884&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;U.S. government and government sponsored entities due within 1 to 2&#160;years of date of purchase (Level&#160;2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;740&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(5&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;735&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total cash, cash equivalents and marketable securities&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;232,393&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;9&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(51&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;232,351&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:92%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:63%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="14" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;December&#160;31,&#160;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Cost&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Unrealized&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;gains&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Unrealized&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;losses&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Fair&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;value&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Cash and cash equivalents:&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Cash (Level&#160;1)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;15,100&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;15,100&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Money market funds (Level 1)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;316,449&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;316,449&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total cash and cash equivalents&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;331,549&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;331,549&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Marketable securities:&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Corporate debt securities due within 1&#160;year of date of purchase (Level&#160;2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;27,257&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;7&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(39&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;27,225&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total cash, cash equivalents and marketable securities&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;358,806&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;7&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(39&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;358,774&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</us-gaap:CashCashEquivalentsAndMarketableSecuritiesTextBlock>
    <us-gaap:ScheduleOfCashCashEquivalentsAndShortTermInvestmentsTableTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;A summary of cash, cash equivalents and &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;available-for-sale&lt;/div&gt;&lt;/div&gt; marketable securities held by the Company as of September&#160;30, 2023 and December&#160;31, 2022 is as follows (in thousands): &lt;/div&gt;&lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:92%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:63%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="14" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;September&#160;30,&#160;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Cost&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Unrealized&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;gains&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Unrealized&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;losses&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Fair&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;value&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Cash and cash equivalents:&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Cash (Level&#160;1)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;10,670&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;10,670&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Money market funds (Level 1)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;50,636&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;50,636&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Corporate debt securities due within 3&#160;months of date of purchase (Level&#160;2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;749&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;749&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total cash and cash equivalents&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;62,055&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;62,055&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Marketable securities:&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Corporate debt securities due within 1&#160;year of date of purchase (Level&#160;2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;94,710&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;9&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(42&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;94,677&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;U.S. government and government sponsored entities due within 1 year of date of purchase (Level 2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;74,888&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(4&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;74,884&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;U.S. government and government sponsored entities due within 1 to 2&#160;years of date of purchase (Level&#160;2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;740&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(5&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;735&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total cash, cash equivalents and marketable securities&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;232,393&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;9&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(51&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;232,351&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:92%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:63%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="14" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;December&#160;31,&#160;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Cost&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Unrealized&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;gains&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Unrealized&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;losses&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Fair&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;value&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Cash and cash equivalents:&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Cash (Level&#160;1)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;15,100&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;15,100&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Money market funds (Level 1)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;316,449&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;316,449&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total cash and cash equivalents&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;331,549&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;331,549&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Marketable securities:&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Corporate debt securities due within 1&#160;year of date of purchase (Level&#160;2)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;27,257&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;7&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(39&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;27,225&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total cash, cash equivalents and marketable securities&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;358,806&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;7&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(39&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;358,774&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</us-gaap:ScheduleOfCashCashEquivalentsAndShortTermInvestmentsTableTextBlock>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CashMemberusgaapCashAndCashEquivalentsAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">10670000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn09_30_2023_CashMemberusgaapCashAndCashEquivalentsAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">10670000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis_MoneyMarketFundsMemberusgaapCashAndCashEquivalentsAxis"
      decimals="-3"
      unitRef="Unit_USD">50636000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn09_30_2023_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis_MoneyMarketFundsMemberusgaapCashAndCashEquivalentsAxis"
      decimals="-3"
      unitRef="Unit_USD">50636000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities contextRef="P01_01_2023To09_30_2023_CorporateDebtSecurities2MemberusgaapFinancialInstrumentAxis">P3M</mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CorporateDebtSecurities2MemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">749000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn09_30_2023_CorporateDebtSecurities2MemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">749000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis"
      decimals="-3"
      unitRef="Unit_USD">62055000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn09_30_2023_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis"
      decimals="-3"
      unitRef="Unit_USD">62055000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities contextRef="P01_01_2023To09_30_2023_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis">P1Y</mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities>
    <us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis
      contextRef="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">94710000</us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis>
    <us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax
      contextRef="PAsOn09_30_2023_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">9000</us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax>
    <us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax
      contextRef="PAsOn09_30_2023_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">42000</us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax>
    <us-gaap:AvailableForSaleSecuritiesDebtSecurities
      contextRef="PAsOn09_30_2023_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">94677000</us-gaap:AvailableForSaleSecuritiesDebtSecurities>
    <mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities contextRef="P01_01_2023To09_30_2023_AgencySecuritiesMemberusgaapFinancialInstrumentAxis">P1Y</mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities>
    <us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis
      contextRef="PAsOn09_30_2023_AgencySecuritiesMemberusgaapFinancialInstrumentAxis_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">74888000</us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis>
    <us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax
      contextRef="PAsOn09_30_2023_AgencySecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">4000</us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax>
    <us-gaap:AvailableForSaleSecuritiesDebtSecurities
      contextRef="PAsOn09_30_2023_AgencySecuritiesMemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">74884000</us-gaap:AvailableForSaleSecuritiesDebtSecurities>
    <mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities contextRef="P01_01_2023To09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_MinimumMembersrtRangeAxis">P1Y</mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities>
    <mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities contextRef="P01_01_2023To09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_MaximumMembersrtRangeAxis">P2Y</mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities>
    <us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis
      contextRef="PAsOn09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">740000</us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis>
    <us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax
      contextRef="PAsOn09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">5000</us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax>
    <us-gaap:AvailableForSaleSecuritiesDebtSecurities
      contextRef="PAsOn09_30_2023_AgencySecuritiesOneMemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">735000</us-gaap:AvailableForSaleSecuritiesDebtSecurities>
    <mdgl:CashCashEquivalentsAndShortTermInvestmentsAtCost
      contextRef="PAsOn09_30_2023_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis"
      decimals="-3"
      unitRef="Unit_USD">232393000</mdgl:CashCashEquivalentsAndShortTermInvestmentsAtCost>
    <mdgl:CashAndCashEquivalentsAndAvailableForSaleSecuritiesGrossUnrealizedGains
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">9000</mdgl:CashAndCashEquivalentsAndAvailableForSaleSecuritiesGrossUnrealizedGains>
    <mdgl:CashAndCashEquivalentsAndAvailableForSaleSecuritiesGrossUnrealizedLosses
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">51000</mdgl:CashAndCashEquivalentsAndAvailableForSaleSecuritiesGrossUnrealizedLosses>
    <us-gaap:CashCashEquivalentsAndShortTermInvestments
      contextRef="PAsOn09_30_2023_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis"
      decimals="-3"
      unitRef="Unit_USD">232351000</us-gaap:CashCashEquivalentsAndShortTermInvestments>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CashMemberusgaapCashAndCashEquivalentsAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">15100000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn12_31_2022_CashMemberusgaapCashAndCashEquivalentsAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">15100000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis_MoneyMarketFundsMemberusgaapCashAndCashEquivalentsAxis"
      decimals="-3"
      unitRef="Unit_USD">316449000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn12_31_2022_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel1MemberusgaapFairValueByFairValueHierarchyLevelAxis_MoneyMarketFundsMemberusgaapCashAndCashEquivalentsAxis"
      decimals="-3"
      unitRef="Unit_USD">316449000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis"
      decimals="-3"
      unitRef="Unit_USD">331549000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <us-gaap:CashAndCashEquivalentsFairValueDisclosure
      contextRef="PAsOn12_31_2022_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis"
      decimals="-3"
      unitRef="Unit_USD">331549000</us-gaap:CashAndCashEquivalentsFairValueDisclosure>
    <mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities contextRef="P01_01_2022To12_31_2022_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis">P1Y</mdgl:MaturityPeriodFromDateOfPurchaseToClassifyInvestmentAsMarketableSecurities>
    <us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis
      contextRef="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">27257000</us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis>
    <us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax
      contextRef="PAsOn12_31_2022_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">7000</us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax>
    <us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax
      contextRef="PAsOn12_31_2022_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">39000</us-gaap:AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax>
    <us-gaap:AvailableForSaleSecuritiesDebtSecurities
      contextRef="PAsOn12_31_2022_CorporateDebtSecuritiesMemberusgaapFinancialInstrumentAxis_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis_FairValueInputsLevel2MemberusgaapFairValueByFairValueHierarchyLevelAxis"
      decimals="-3"
      unitRef="Unit_USD">27225000</us-gaap:AvailableForSaleSecuritiesDebtSecurities>
    <mdgl:CashCashEquivalentsAndShortTermInvestmentsAtCost
      contextRef="PAsOn12_31_2022_CarryingReportedAmountFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis"
      decimals="-3"
      unitRef="Unit_USD">358806000</mdgl:CashCashEquivalentsAndShortTermInvestmentsAtCost>
    <mdgl:CashAndCashEquivalentsAndAvailableForSaleSecuritiesGrossUnrealizedGains
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">7000</mdgl:CashAndCashEquivalentsAndAvailableForSaleSecuritiesGrossUnrealizedGains>
    <mdgl:CashAndCashEquivalentsAndAvailableForSaleSecuritiesGrossUnrealizedLosses
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">39000</mdgl:CashAndCashEquivalentsAndAvailableForSaleSecuritiesGrossUnrealizedLosses>
    <us-gaap:CashCashEquivalentsAndShortTermInvestments
      contextRef="PAsOn12_31_2022_EstimateOfFairValueFairValueDisclosureMemberusgaapFairValueByMeasurementBasisAxis"
      decimals="-3"
      unitRef="Unit_USD">358774000</us-gaap:CashCashEquivalentsAndShortTermInvestments>
    <mdgl:AccruedLiabilitiesDisclosureTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;5. Accrued Liabilities &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Accrued liabilities as of September&#160;30, 2023 and December&#160;31, 2022 consisted of the following (in thousands): &lt;/div&gt;&lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:76%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:72%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:8%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:8%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;December&#160;31,&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Contract research organization costs&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;54,479&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;53,119&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other clinical study related costs&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,433&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;6,582&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Manufacturing and drug supply&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;5,030&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;11,262&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Compensation and benefits&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;9,963&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;14,864&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Professional fees&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,478&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;4,867&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;1,227&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;767&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total accrued liabilities&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;82,610&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;91,461&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</mdgl:AccruedLiabilitiesDisclosureTextBlock>
    <us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Accrued liabilities as of September&#160;30, 2023 and December&#160;31, 2022 consisted of the following (in thousands): &lt;/div&gt;&lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:76%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:72%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:8%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:8%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;December&#160;31,&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Contract research organization costs&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;54,479&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;53,119&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other clinical study related costs&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,433&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;6,582&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Manufacturing and drug supply&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;5,030&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;11,262&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Compensation and benefits&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;9,963&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;14,864&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Professional fees&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,478&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;4,867&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;1,227&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;767&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total accrued liabilities&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;82,610&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;91,461&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock>
    <mdgl:AccruedContractResearchCostsCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">54479000</mdgl:AccruedContractResearchCostsCurrent>
    <mdgl:AccruedContractResearchCostsCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">53119000</mdgl:AccruedContractResearchCostsCurrent>
    <mdgl:AccruedOtherClinicalStudyRelatedCostsCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">3433000</mdgl:AccruedOtherClinicalStudyRelatedCostsCurrent>
    <mdgl:AccruedOtherClinicalStudyRelatedCostsCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">6582000</mdgl:AccruedOtherClinicalStudyRelatedCostsCurrent>
    <mdgl:AccruedManufacturingAndDrugSupplyCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">5030000</mdgl:AccruedManufacturingAndDrugSupplyCurrent>
    <mdgl:AccruedManufacturingAndDrugSupplyCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">11262000</mdgl:AccruedManufacturingAndDrugSupplyCurrent>
    <mdgl:AccruedCompensationAndBenefitsCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">9963000</mdgl:AccruedCompensationAndBenefitsCurrent>
    <mdgl:AccruedCompensationAndBenefitsCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">14864000</mdgl:AccruedCompensationAndBenefitsCurrent>
    <us-gaap:AccruedProfessionalFeesCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">8478000</us-gaap:AccruedProfessionalFeesCurrent>
    <us-gaap:AccruedProfessionalFeesCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">4867000</us-gaap:AccruedProfessionalFeesCurrent>
    <us-gaap:OtherAccruedLiabilitiesCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">1227000</us-gaap:OtherAccruedLiabilitiesCurrent>
    <us-gaap:OtherAccruedLiabilitiesCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">767000</us-gaap:OtherAccruedLiabilitiesCurrent>
    <us-gaap:AccruedLiabilitiesCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">82610000</us-gaap:AccruedLiabilitiesCurrent>
    <us-gaap:AccruedLiabilitiesCurrent
      contextRef="PAsOn12_31_2022"
      decimals="-3"
      unitRef="Unit_USD">91461000</us-gaap:AccruedLiabilitiesCurrent>
    <us-gaap:DebtDisclosureTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;6. Long Term Debt &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;In May 2022 the Company and its wholly-owned subsidiary, Canticle Pharmaceuticals, Inc., entered into the $250.0&#160;million Loan Facility with the several banks and other financial institutions or entities party thereto (each, a &#x201c;Lender&#x201d; and collectively referred to as the &#x201c;Lenders&#x201d;), and Hercules Capital, Inc. (&#x201c;Hercules&#x201d;), in its capacity as administrative agent and collateral agent for itself and the Lenders. Under the terms of the Loan Facility, the first $50.0&#160;million tranche was drawn at closing. The Company also could draw up to an additional $125.0&#160;million in two separate tranches upon achievement of certain resmetirom clinical and regulatory milestones. A fourth tranche of $75.0&#160;million could be drawn by the Company, subject to the approval of Hercules. The Loan Facility had a minimum interest rate of 7.45% and adjusts with changes in the prime rate. The Company will pay interest-only monthly payments of accrued interest under the Loan Facility for a period of 30 months, which period may be extended to 36, 48, and 60 months upon the successive achievement of certain clinical and regulatory milestones and if the Company maintains compliance with applicable covenants. The Loan Facility matures in May 2026 and may be extended an additional year upon the achievement of certain clinical and regulatory milestones. The Loan Facility is secured by a security interest in substantially all of the Company&#x2019;s assets, other than intellectual property. It includes an end of term charge of 5.35% of the aggregate principal amount, which is accounted for in the loan discount. In connection with the first tranche drawn at closing, the Company issued Hercules a warrant to purchase 14,899 shares of Company common stock, which had a Black-Scholes value of $0.6&#160;million. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;On February&#160;3, 2023, the Company entered into the First Amendment (the &#x201c;Amendment&#x201d;) to the Loan Facility (as amended, the &#x201c;Amended Loan Facility&#x201d;). Under the Amended Loan Facility, an additional $35.0&#160;million was drawn under a second, expanded, $65.0&#160;million tranche (&#x201c;Tranche 2&#x201d;) in February of 2023 following the Company&#x2019;s achievement of the Phase 3 clinical development milestone. An additional $15.0&#160;million was drawn under Tranche 2 in June of 2023. The remaining $15.0&#160;million available under Tranche 2 was drawn in September of 2023 in accordance with the Amended Loan Facility. The third tranche (&#x201c;Tranche 3&#x201d;) of $75.0&#160;million remains unchanged by the Amendment, and such borrowings are available subject to the Company obtaining a certain FDA approval for resmetirom. Coincident with the expansion of Tranche 2 borrowing capacity by $15.0&#160;million, the Amendment reduced the fourth tranche under the Loan Facility (&#x201c;Tranche 4&#x201d;) by $15.0&#160;million to $60.0&#160;million, which amount is available subject to Hercules&#x2019; sole discretion. In connection with the $35.0&#160;million drawn under Tranche 2 at the closing of the Amendment, &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="line-height:normal;background-color:white;display: inline;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;$15.0&#160;million drawn in June of 2023, and $15.0&#160;million drawn in September of 2023, the Company issued to Hercules and affiliates Tranche 2 Warrants to purchase an aggregate of 4,555 shares of common stock, which had a Black-Scholes value of $0.9&#160;million. The Amendment reduced the interest rate under the Amended Loan Facility to the greater of (i)&#160;the prime rate as reported in The Wall Street Journal plus 2.45% and (ii) 8.25%. The Amendment and the Amended Loan Facility summary terms were disclosed in the Company&#x2019;s Current Report on Form &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;8-K&lt;/div&gt; filed with the Securities and Exchange Commission on February&#160;9, 2023. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Loan Facility includes affirmative and restrictive financial covenants commencing on January&#160;1, 2023, including maintenance of a minimum cash, cash equivalents and liquid funds covenant of $35.0&#160;million, which may decrease in certain circumstances if the Company achieves certain clinical milestones and a revenue milestone, and a revenue-based covenant that could apply commencing at or after the time that financial reporting is due for the quarter ending September 30, 2024. The Loan Facility contains event of default provisions for: the Company&#x2019;s failure to make required payments or maintain compliance with covenants under the Loan Facility; the Company&#x2019;s breach of certain representations or default under certain obligations outside the Loan Facility; insolvency, attachment or judgment events affecting the Company; and any circumstance which has occurred or could reasonably be expected to have a material adverse effect on the Company, provided that, any failure to achieve a clinical milestone or approval milestone under the Loan Facility shall not in and of itself constitute a material adverse effect. The Loan Facility also includes customary covenants associated with a secured loan facility, including covenants concerning financial reporting obligations, and certain limitations on indebtedness, liens (including a negative pledge on intellectual property and other assets), investments, distributions (including dividends), collateral, investments, distributions, transfers, mergers or acquisitions, taxes, corporate changes, and deposit accounts. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;As of September&#160;30, 2023, the outstanding principal under the Loan Facility was $115.0&#160;million. The interest rate as of September&#160;30, 2023 was 10.95%. As of September&#160;30, 2023, the Company was in compliance with all loan covenants and provisions. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Future minimum payments, including interest and principal, under the loans payable outstanding as of September&#160;30, 2023 are as follows (in thousands): &lt;/div&gt;&lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:68%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:87%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; white-space: nowrap; padding-bottom: 0.5pt;"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-bottom: 1pt solid rgb(0, 0, 0); display: table-cell; font-size: 8pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Period Ending September&#160;30, 2023:&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Amount&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;2023 (remaining three months)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,096&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;2024&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;12,802&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;2025&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;79,604&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Thereafter&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;53,388&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;148,890&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Less amount representing interest&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(27,737&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Less unamortized discount&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(6,426&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Loans payable, net of discount&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;114,727&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</us-gaap:DebtDisclosureTextBlock>
    <us-gaap:DebtInstrumentFaceAmount
      contextRef="PAsOn05_31_2022_TermLoanMemberusgaapDebtInstrumentAxis"
      decimals="-5"
      unitRef="Unit_USD">250000000</us-gaap:DebtInstrumentFaceAmount>
    <us-gaap:ProceedsFromIssuanceOfDebt
      contextRef="P05_01_2022To05_31_2022_TermLoanMemberusgaapDebtInstrumentAxis"
      decimals="-5"
      unitRef="Unit_USD">50000000</us-gaap:ProceedsFromIssuanceOfDebt>
    <us-gaap:DebtInstrumentUnusedBorrowingCapacityAmount
      contextRef="PAsOn05_31_2022_DrawnInTwoSeparateTranchesUponAchievementOfResmetiromClinicalAndRegulatoryMilestoneMemberMDGLDebtDescriptionAxis"
      decimals="-5"
      unitRef="Unit_USD">125000000</us-gaap:DebtInstrumentUnusedBorrowingCapacityAmount>
    <us-gaap:DebtInstrumentUnusedBorrowingCapacityAmount
      contextRef="PAsOn05_31_2022_DrawnInTwoSeparateTranchesUponAchievementOfResmetiromClinicalAndRegulatoryMilestoneMemberMDGLDebtDescriptionAxis_TermLoanMemberusgaapDebtInstrumentAxis"
      decimals="-5"
      unitRef="Unit_USD">75000000</us-gaap:DebtInstrumentUnusedBorrowingCapacityAmount>
    <mdgl:LongTermDebtFloorInterestRatePercentage
      contextRef="PAsOn05_31_2022_TermLoanMemberusgaapDebtInstrumentAxis"
      decimals="4"
      unitRef="Unit_pure">0.0745</mdgl:LongTermDebtFloorInterestRatePercentage>
    <mdgl:DebtInstrumentInterestPaymentsTerms contextRef="P05_01_2022To05_31_2022_TermLoanMemberusgaapDebtInstrumentAxis">The Company will pay interest-only monthly payments of accrued interest under the Loan Facility for a period of 30 months, which period may be extended to 36, 48, and 60 months upon the successive achievement of certain clinical and regulatory milestones</mdgl:DebtInstrumentInterestPaymentsTerms>
    <mdgl:PercenatgeOfTermChargesOnAggregatePrincipalAmount
      contextRef="P05_01_2022To05_31_2022"
      decimals="4"
      unitRef="Unit_pure">0.0535</mdgl:PercenatgeOfTermChargesOnAggregatePrincipalAmount>
    <us-gaap:DebtConversionConvertedInstrumentWarrantsOrOptionsIssued1
      contextRef="P05_01_2022To05_01_2022"
      decimals="0"
      unitRef="Unit_shares">14899</us-gaap:DebtConversionConvertedInstrumentWarrantsOrOptionsIssued1>
    <us-gaap:DebtConversionConvertedInstrumentAmount1
      contextRef="P05_09_2022To05_09_2022"
      decimals="-5"
      unitRef="Unit_USD">600000</us-gaap:DebtConversionConvertedInstrumentAmount1>
    <us-gaap:ProceedsFromIssuanceOfDebt
      contextRef="P02_03_2023To02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TermLoanMemberusgaapDebtInstrumentAxis"
      decimals="-5"
      unitRef="Unit_USD">35000000</us-gaap:ProceedsFromIssuanceOfDebt>
    <us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity
      contextRef="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">65000000</us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity>
    <us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity
      contextRef="PAsOn06_19_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">15000000</us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity>
    <us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity
      contextRef="PAsOn09_30_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">15000000</us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity>
    <us-gaap:LineOfCreditFacilityRemainingBorrowingCapacity
      contextRef="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheThreeMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">75000000</us-gaap:LineOfCreditFacilityRemainingBorrowingCapacity>
    <us-gaap:LineOfCreditFacilityCurrentBorrowingCapacity
      contextRef="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">15000000</us-gaap:LineOfCreditFacilityCurrentBorrowingCapacity>
    <us-gaap:LineOfCreditFacilityRemainingBorrowingCapacity
      contextRef="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheFouthMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">15000000</us-gaap:LineOfCreditFacilityRemainingBorrowingCapacity>
    <us-gaap:LineOfCreditFacilityRemainingBorrowingCapacity
      contextRef="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityOneMemberusgaapCreditFacilityAxis_TrancheFouthMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">60000000</us-gaap:LineOfCreditFacilityRemainingBorrowingCapacity>
    <us-gaap:ProceedsFromIssuanceOfDebt
      contextRef="P02_03_2023To02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">35000000</us-gaap:ProceedsFromIssuanceOfDebt>
    <us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity
      contextRef="PAsOn06_30_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">15000000</us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity>
    <us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity
      contextRef="PAsOn09_30_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">15000000</us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity>
    <us-gaap:ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights
      contextRef="PAsOn09_30_2023_TrancheTwoMemberMDGLTrancheAxis"
      decimals="INF"
      unitRef="Unit_shares">4555</us-gaap:ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights>
    <us-gaap:DebtConversionConvertedInstrumentAmount1
      contextRef="P02_03_2023To02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_TrancheTwoMemberMDGLTrancheAxis"
      decimals="-5"
      unitRef="Unit_USD">900000</us-gaap:DebtConversionConvertedInstrumentAmount1>
    <mdgl:LongTermDebtFloorInterestRatePercentage
      contextRef="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis_PrimeRateMemberusgaapVariableRateAxis"
      decimals="4"
      unitRef="Unit_pure">0.0245</mdgl:LongTermDebtFloorInterestRatePercentage>
    <mdgl:LongTermDebtFloorInterestRatePercentage
      contextRef="PAsOn02_03_2023_LoanFacilityAndAmendedLoanFacilityMemberusgaapCreditFacilityAxis"
      decimals="4"
      unitRef="Unit_pure">0.0825</mdgl:LongTermDebtFloorInterestRatePercentage>
    <us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity
      contextRef="PAsOn01_01_2023_LoanFacilityMemberusgaapCreditFacilityAxis"
      decimals="-5"
      unitRef="Unit_USD">35000000</us-gaap:LineOfCreditFacilityMaximumBorrowingCapacity>
    <us-gaap:LineOfCreditFacilityExpirationDate1 contextRef="P01_01_2023To01_02_2023_LoanFacilityMemberusgaapCreditFacilityAxis">2024-09-30</us-gaap:LineOfCreditFacilityExpirationDate1>
    <us-gaap:DebtInstrumentFaceAmount
      contextRef="PAsOn09_30_2023"
      decimals="-5"
      unitRef="Unit_USD">115000000</us-gaap:DebtInstrumentFaceAmount>
    <us-gaap:DebtInstrumentInterestRateStatedPercentage
      contextRef="PAsOn09_30_2023"
      decimals="4"
      unitRef="Unit_pure">0.1095</us-gaap:DebtInstrumentInterestRateStatedPercentage>
    <us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Future minimum payments, including interest and principal, under the loans payable outstanding as of September&#160;30, 2023 are as follows (in thousands): &lt;/div&gt;&lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:68%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:87%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; white-space: nowrap; padding-bottom: 0.5pt;"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-bottom: 1pt solid rgb(0, 0, 0); display: table-cell; font-size: 8pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Period Ending September&#160;30, 2023:&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Amount&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;2023 (remaining three months)&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,096&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;2024&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;12,802&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;2025&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;79,604&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Thereafter&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;53,388&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;148,890&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Less amount representing interest&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(27,737&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Less unamortized discount&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(6,426&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Loans payable, net of discount&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;114,727&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock>
    <us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">3096000</us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear>
    <us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">12802000</us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths>
    <us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">79604000</us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo>
    <us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">53388000</us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree>
    <us-gaap:LongTermDebt
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">148890000</us-gaap:LongTermDebt>
    <us-gaap:InterestExpenseDebtExcludingAmortization
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">27737000</us-gaap:InterestExpenseDebtExcludingAmortization>
    <us-gaap:DebtInstrumentUnamortizedDiscount
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">6426000</us-gaap:DebtInstrumentUnamortizedDiscount>
    <us-gaap:LoansPayableCurrent
      contextRef="PAsOn09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">114727000</us-gaap:LoansPayableCurrent>
    <us-gaap:StockholdersEquityNoteDisclosureTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;7. Stockholders&#x2019; Equity &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 6pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Common Stock &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Each common stockholder is entitled to one vote for each share of common stock held. The common stock will vote together with all other classes and series of stock of the Company as a single class on all actions to be taken by the Company&#x2019;s stockholders. Each share of common stock is entitled to receive dividends, as and when declared by the Company&#x2019;s Board of Directors (the &#x201c;Board&#x201d;). The Company has never declared cash dividends on its common stock and does not expect to do so in the foreseeable future. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Preferred Stock &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Series A and B Preferred Stock have a par value of $0.0001 per share and are convertible into shares of the common stock at a &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;one-to-one&lt;/div&gt;&lt;/div&gt; ratio, subject to adjustment as provided in the Certificates of Designation of Preferences, Rights and Limitations of Series A Preferred Stock and Series B Preferred Stock that the Company filed with the Secretary of State of the State of Delaware on June&#160;21, 2017 and December&#160;22, 2022, respectively. The terms of the Series A and B Preferred Stock are set forth in such Certificates of Designation. Each share of the Series A and B Preferred Stock is convertible into shares of common stock following notice that may be given at the holder&#x2019;s option. Upon any liquidation, dissolution or &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;winding-up&lt;/div&gt; of the Company, whether voluntary or involuntary, after the satisfaction in full of the debts of the Company and the payment of any liquidation preference owed to the holders of shares of capital stock of the Company ranking prior to the Series A and B Preferred Stock upon liquidation, the holders of the Series A and B Preferred Stock shall participate pari passu with the holders of the common stock (on an &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;as-if-converted-to-Common-Stock&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; basis) in the net assets of the Company. Shares of the Series A and B Preferred Stock will generally have no voting rights, except as required by law. Shares of the Series A and B Preferred Stock will be entitled to receive dividends before shares of any other class or series of capital stock of the Company (other than dividends in the form of the common stock) equal to the dividend payable on each share of the common stock, on an &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;as-converted&lt;/div&gt; basis. &lt;/div&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;December 2022 Registered Direct Offering &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;In December 2022, the Company entered into a Securities Purchase Agreement (the &#x201c;Purchase Agreement&#x201d;) with a group of institutional accredited investors, who were existing, &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;non-controlling&lt;/div&gt; stockholders of the Company, pursuant to which the Company sold securities to the Investors in an offering that was registered under the Company&#x2019;s existing shelf registration statement (the &#x201c;2022 Registered Direct Offering&#x201d;). Under the terms of the Purchase Agreement, the Company sold 44,444 shares of its common stock at a price of $225 per share, and 400,000 shares of its Series B Convertible Preferred Stock at a price of $225 per share. The 2022 Registered Direct Offering resulted in gross proceeds to the Company of approximately $100.0&#160;million, and net proceeds to the Company of approximately $99.5&#160;million. The 2022 Registered Direct Offering closed on December&#160;23, 2022. &lt;/div&gt;&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;At-The-Market&lt;/div&gt;&lt;/div&gt; Issuance Sales Agreement &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;In June 2021, the Company entered into an &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;at-the-market&lt;/div&gt;&lt;/div&gt; sales agreement (the &#x201c;2021 Sales Agreement&#x201d;) with Cowen and Company, LLC (&#x201c;Cowen&#x201d;), pursuant to which the Company could, from time to time, issue and sell shares of its common stock. The 2021 Sales Agreement initially authorized an aggregate offering of up to $200.0&#160;million in shares of the Company&#x2019;s common stock, at the Company&#x2019;s option, through Cowen as its sales agent. Sales of common stock through Cowen could be made by any method that is deemed an &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&#x201c;at-the-market&#x201d;&lt;/div&gt;&lt;/div&gt; offering as defined in Rule 415 promulgated under the Securities Act of 1933, as amended, including by means of ordinary brokers&#x2019; transactions at market prices, in block transactions or as otherwise agreed by the Company and Cowen. Subject to the terms and conditions of the 2021 Sales Agreement, Cowen would use commercially reasonable efforts consistent with its normal trading and sales practices to sell the common stock based upon the Company&#x2019;s instructions (including any price, time or size limits or other customary parameters or conditions the Company imposed). &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;In December 2022, the Company sold 738,900 shares of common stock under the 2021 Sales Agreement for an aggregate of $159.1&#160;million in gross proceeds, with net proceeds to the Company of $155.9&#160;million after deducting commissions and other transaction costs. In total, under the 2021 Sales Agreement the Company sold 1,235,943 shares for an aggregate of $199.9&#160;million in gross proceeds, with net proceeds to the Company of approximately $195.8&#160;million after deducting commissions and other transaction costs through December&#160;31, 2022. Of those shares sold, 738,900 were sold in 2022, and 497,043 were sold in 2021. All shares were sold pursuant to the Company&#x2019;s effective shelf registration statement on Form &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;S-3&lt;/div&gt; (the &#x201c;Registration Statement&#x201d;) and the prospectus supplement relating thereto. As of September&#160;30, 2023, no amounts remained reserved and available for sale under the 2021 Sales Agreement and the related prospectus supplement. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;In May 2023, the Company amended the 2021 Agreement (the &#x201c;Sales Agreement Amendment&#x201d;), with Cowen, pursuant to which the Company may, from time to time, issue and sell in additional $200.0&#160;million in shares of its common stock. The Company is not obligated to make any sales of its common stock under this arrangement. Any shares sold will be sold pursuant to the Registration Statement and prospectus supplement filed pursuant to the Registration Statement. The Sales Agreement Amendment authorizes sales of shares of the Company&#x2019;s common stock, from time to time, at the Company&#x2019;s option, through Cowen as its sales agent. Sales of common stock through Cowen may be made by any method that is deemed an &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;&#x201c;at-the-market&#x201d;&lt;/div&gt;&lt;/div&gt; offering as defined in Rule 415 promulgated under the Securities Act of 1933, as amended, and as described in the prospectus supplement. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;During the three months ended September&#160;30, 2023, under the Sales Agreement Amendment, the Company sold 12,200 shares for an aggregate of $2.8&#160;million in gross proceeds, with net proceeds to the Company of approximately $2.7&#160;million after deducting commissions and other transaction costs. During the nine months ended September&#160;30, 2023, and in total under the Sales Agreement Amendment, the Company sold 98,101 shares for an aggregate of $25.2&#160;million in gross proceeds, with net proceeds to the Company of approximately $24.5&#160;million after deducting commissions and other transaction costs. All shares were sold pursuant to the Company&#x2019;s effective Registration Statement and the prospectus supplement relating thereto. As of September&#160;30, 2023, $174.8&#160;million remained reserved and available for sale under the 2023 Sales Agreement Amendment and the Company&#x2019;s related prospectus supplement. &lt;/div&gt;</us-gaap:StockholdersEquityNoteDisclosureTextBlock>
    <mdgl:CommonStockVotingRightsNumber
      contextRef="P01_01_2023To09_30_2023"
      decimals="0"
      unitRef="Unit_Vote">1</mdgl:CommonStockVotingRightsNumber>
    <us-gaap:PreferredStockParOrStatedValuePerShare
      contextRef="PAsOn06_30_2017_ConvertibleSeriesAAndBPreferredStockMemberusgaapStatementClassOfStockAxis"
      decimals="4"
      unitRef="Unit_USD_per_Share">0.0001</us-gaap:PreferredStockParOrStatedValuePerShare>
    <us-gaap:ConversionOfStockSharesConverted1
      contextRef="P06_01_2017To06_30_2017_ConvertibleSeriesAAndBPreferredStockMemberusgaapStatementClassOfStockAxis"
      decimals="INF"
      unitRef="Unit_shares">1</us-gaap:ConversionOfStockSharesConverted1>
    <mdgl:PreferredStockNumberOfVotingRights
      contextRef="PAsOn06_30_2017_ConvertibleSeriesAAndBPreferredStockMemberusgaapStatementClassOfStockAxis"
      decimals="0"
      unitRef="Unit_Vote">0</mdgl:PreferredStockNumberOfVotingRights>
    <us-gaap:StockIssuedDuringPeriodSharesNewIssues
      contextRef="P12_01_2022To12_23_2022_CommonStockMemberusgaapStatementClassOfStockAxis_PurchaseAgreementMemberMDGLAgreementAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis"
      decimals="0"
      unitRef="Unit_shares">44444</us-gaap:StockIssuedDuringPeriodSharesNewIssues>
    <us-gaap:SharesIssuedPricePerShare
      contextRef="PAsOn12_23_2022_CommonStockMemberusgaapStatementClassOfStockAxis_PurchaseAgreementMemberMDGLAgreementAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis"
      decimals="0"
      unitRef="Unit_USD_per_Share">225</us-gaap:SharesIssuedPricePerShare>
    <us-gaap:StockIssuedDuringPeriodSharesNewIssues
      contextRef="P12_01_2022To12_23_2022_PurchaseAgreementMemberMDGLAgreementAxis_SeriesBPreferredStockMemberusgaapStatementClassOfStockAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis"
      decimals="0"
      unitRef="Unit_shares">400000</us-gaap:StockIssuedDuringPeriodSharesNewIssues>
    <us-gaap:SharesIssuedPricePerShare
      contextRef="PAsOn12_23_2022_PurchaseAgreementMemberMDGLAgreementAxis_SeriesBPreferredStockMemberusgaapStatementClassOfStockAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis"
      decimals="0"
      unitRef="Unit_USD_per_Share">225</us-gaap:SharesIssuedPricePerShare>
    <mdgl:ProceedsFromIssuanceorSaleofEquityGross
      contextRef="P12_01_2022To12_23_2022_PurchaseAgreementMemberMDGLAgreementAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis"
      decimals="-5"
      unitRef="Unit_USD">100000000</mdgl:ProceedsFromIssuanceorSaleofEquityGross>
    <us-gaap:ProceedsFromIssuanceOrSaleOfEquity
      contextRef="P12_01_2022To12_23_2022_PurchaseAgreementMemberMDGLAgreementAxis_TwoThousandAndTwentyTwoRegisteredDirectOfferingMemberusgaapSubsidiarySaleOfStockAxis"
      decimals="-5"
      unitRef="Unit_USD">99500000</us-gaap:ProceedsFromIssuanceOrSaleOfEquity>
    <mdgl:CommonStockAggregateOfferingPrice
      contextRef="P06_01_2021To06_30_2021_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_CowenCoLlcMembersrtCounterpartyNameAxis_MaximumMembersrtRangeAxis"
      decimals="-5"
      unitRef="Unit_USD">200000000</mdgl:CommonStockAggregateOfferingPrice>
    <us-gaap:StockIssuedDuringPeriodSharesNewIssues
      contextRef="P01_01_2022To12_31_2022_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis"
      decimals="INF"
      unitRef="Unit_shares">738900</us-gaap:StockIssuedDuringPeriodSharesNewIssues>
    <us-gaap:StockIssuedDuringPeriodValueNewIssues
      contextRef="P01_01_2022To12_31_2022_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">159100000</us-gaap:StockIssuedDuringPeriodValueNewIssues>
    <us-gaap:ProceedsFromIssuanceOfCommonStock
      contextRef="P01_01_2022To12_31_2022_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">155900000</us-gaap:ProceedsFromIssuanceOfCommonStock>
    <us-gaap:StockIssuedDuringPeriodSharesNewIssues
      contextRef="P01_01_2021To12_31_2022_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis"
      decimals="INF"
      unitRef="Unit_shares">1235943</us-gaap:StockIssuedDuringPeriodSharesNewIssues>
    <us-gaap:StockIssuedDuringPeriodValueNewIssues
      contextRef="P01_01_2021To12_31_2022_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">199900000</us-gaap:StockIssuedDuringPeriodValueNewIssues>
    <us-gaap:ProceedsFromIssuanceOfCommonStock
      contextRef="P01_01_2021To12_31_2022_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">195800000</us-gaap:ProceedsFromIssuanceOfCommonStock>
    <us-gaap:StockIssuedDuringPeriodSharesNewIssues
      contextRef="P01_01_2021To12_31_2021_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis"
      decimals="INF"
      unitRef="Unit_shares">497043</us-gaap:StockIssuedDuringPeriodSharesNewIssues>
    <mdgl:RemainingSecuritiesUnderShelfRegistrationValue
      contextRef="PAsOn09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyOneSalesAgreementMemberMDGLAgreementAxis"
      decimals="-6"
      unitRef="Unit_USD">0</mdgl:RemainingSecuritiesUnderShelfRegistrationValue>
    <mdgl:CommonStockAggregateOfferingPrice
      contextRef="P05_01_2023To05_31_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_CowenCoLlcMembersrtCounterpartyNameAxis_MaximumMembersrtRangeAxis"
      decimals="-5"
      unitRef="Unit_USD">200000000</mdgl:CommonStockAggregateOfferingPrice>
    <us-gaap:StockIssuedDuringPeriodSharesNewIssues
      contextRef="P07_01_2023To09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_SeptemberTwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis"
      decimals="INF"
      unitRef="Unit_shares">12200</us-gaap:StockIssuedDuringPeriodSharesNewIssues>
    <us-gaap:StockIssuedDuringPeriodValueNewIssues
      contextRef="P07_01_2023To09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_SeptemberTwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">2800000</us-gaap:StockIssuedDuringPeriodValueNewIssues>
    <us-gaap:ProceedsFromIssuanceOfCommonStock
      contextRef="P07_01_2023To09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_SeptemberTwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">2700000</us-gaap:ProceedsFromIssuanceOfCommonStock>
    <us-gaap:StockIssuedDuringPeriodSharesNewIssues
      contextRef="P01_01_2023To09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis"
      decimals="INF"
      unitRef="Unit_shares">98101</us-gaap:StockIssuedDuringPeriodSharesNewIssues>
    <us-gaap:StockIssuedDuringPeriodValueNewIssues
      contextRef="P01_01_2023To09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">25200000</us-gaap:StockIssuedDuringPeriodValueNewIssues>
    <us-gaap:ProceedsFromIssuanceOfCommonStock
      contextRef="P01_01_2023To09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">24500000</us-gaap:ProceedsFromIssuanceOfCommonStock>
    <mdgl:RemainingSecuritiesUnderShelfRegistrationValue
      contextRef="PAsOn09_30_2023_AtTheMarketIssuanceSalesAgreementMemberusgaapTypeOfArrangementAxis_TwoThousandAndTwentyThreeSalesAgreementMemberMDGLAgreementAxis"
      decimals="-5"
      unitRef="Unit_USD">174800000</mdgl:RemainingSecuritiesUnderShelfRegistrationValue>
    <us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock contextRef="P01_01_2023To09_30_2023">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;8. Stock-based Compensation &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 6pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2015 Stock Plan &lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company&#x2019;s 2015 Stock Plan, as amended (the &#x201c;2015 Stock Plan&#x201d;), is one of the Company&#x2019;s equity incentive compensation plans through which equity based grants are awarded. The 2015 Stock Plan provides for the grant of incentive stock options, &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;non-statutory&lt;/div&gt; stock options, restricted stock, restricted stock units and other stock-based compensation awards to employees, officers, directors, and consultants of the Company. The administration of the 2015 Stock Plan is under the general supervision of the Compensation Committee of the Board. The terms of stock options awarded under the 2015 Stock Plan, in general, are determined by the Compensation Committee, provided the exercise price per share generally shall not be set at less than the fair market value of a share of the common stock on the date of grant and the term shall not be greater than ten years from the date the option is granted. As of September&#160;30, 2023, 686,125 shares were available for future issuance under the 2015 Stock Plan. &lt;/div&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023 Inducement Plan &lt;/div&gt;&lt;/div&gt; &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;In September 2023, the Company adopted the 2023 Inducement Plan (the &#x201c;Inducement Plan&#x201d;), pursuant to which the Company may from time to time make equity grants to new employees as a material inducement to their employment. The Inducement Plan was adopted without stockholder approval, pursuant to Nasdaq Listing Rule 5635(c)(4), and is administered by the Compensation Committee of the Board. The Inducement Plan provides for the granting of &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;non-statutory&lt;/div&gt; stock options, restricted stock, restricted stock units, performance stock units and other stock-based compensation awards to new employees, but does not allow for the granting of incentive stock options. The terms of the stock options under the Inducement Plan, in general, are determined by the Compensation Committee, provided the exercise price per share generally shall not be set at less than the fair market value of a share of the common stock on the date of grant and the term shall not be greater than ten years from the date the option or award is granted. A total of 500,000 shares of the Company&#x2019;s common stock were reserved for issuance under the Inducement Plan. As of September&#160;30, 2023, 287,011 shares were available for future issuance under the 2023 Inducement Plan. &lt;/div&gt; &lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Stock Options &lt;/div&gt;&lt;/div&gt;  &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The following table summarizes stock option activity during the nine months ended September&#160;30, 2023: &lt;/div&gt; &lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:76%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:73%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:6%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Shares&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Weighted&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;average&#160;exercise&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;price&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Outstanding at January&#160;1, 2023&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,857,054&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;81.78&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Options granted&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;5,205&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;283.08&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Options exercised&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(293,568&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;89.18&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Options cancelled&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(50,079&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;174.61&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Outstanding at September&#160;30, 2023&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,518,612&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;79.49&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Exercisable at September&#160;30, 2023&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;1,818,817&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;74.86&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;  &lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The total cash received by the Company as a result of stock option exercises was $26.2&#160;million and $0.0&#160;million, respectively, for the nine months ended September&#160;30, 2023 and 2022. The total intrinsic value of options exercised was $51.0&#160;million and $0.0&#160;million, respectively, for the nine months ended September&#160;30, 2023 and 2022. The weighted-average grant date fair values, based on the Black-Scholes option model, of options granted during the nine months ended September&#160;30, 2023 and 2022 were $219.02 and $55.14, respectively. &lt;/div&gt; &lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Restricted Stock Units &lt;/div&gt;&lt;/div&gt; &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company&#x2019;s 2015 Stock Plan provides for awards of restricted stock units to employees, officers, directors and consultants to the Company. The Company&#x2019;s Inducement Plan provides for awards of restricted stock units to new employees. Restricted stock units vest over a period of months or years, or upon the occurrence of certain performance criteria or the attainment of stated goals or events, and are subject to forfeiture if employment or service terminates before vesting. As of September&#160;30, 2023, the Company had 311,767 restricted stock units outstanding, with a weighted average grant date fair value of $256.81 per unit. &lt;/div&gt; &lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Other Stock-Based Awards &lt;/div&gt;&lt;/div&gt; &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company&#x2019;s 2015 Stock Plan provides for other stock-based compensation awards to employees, officers, directors and consultants to the Company. The Company&#x2019;s Inducement Plan provides for other stock-based compensation awards to new employees. As of September&#160;30, 2023, the Company had 150,000 performance stock units outstanding under the Inducement Plan, with a weighted average grant date fair value of $146.37 per unit. &lt;/div&gt; &lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Outstanding Awards &lt;/div&gt;&lt;/div&gt; &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;As of September&#160;30, 2023, the Company had restricted stock units, performance stock units, and options outstanding pursuant to which an aggregate of 2,980,379 shares of its common stock may be issued pursuant to the terms of all awards granted under the 2015 Stock Plan and Inducement Plan. &lt;/div&gt; &lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt; &lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;  &lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Stock-Based Compensation Expense &lt;/div&gt;&lt;/div&gt;  &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Stock-based compensation expense during the three and nine months ended September&#160;30, 2023 and 2022 was as follows (in thousands): &lt;/div&gt; &lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:92%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:65%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="6" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Three&#160;Months&#160;Ended&#160;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="6" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Nine&#160;Months&#160;Ended&#160;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Stock-based compensation expense by type of award:&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Stock options&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,375&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,122&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;24,404&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;23,543&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Restricted stock units&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,652&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;9,846&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other stock-based awards&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;633&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;633&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total stock-based compensation expense&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;12,660&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,122&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;34,883&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;23,543&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Effect of stock-based compensation expense by line item:&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Research and development&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;5,133&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,596&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;15,703&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;10,084&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;General and administrative&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;7,527&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;4,526&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;19,180&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;13,459&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total stock-based compensation expense included in net loss&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;12,660&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,122&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;34,883&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;23,543&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;  &lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Unrecognized stock-based compensation expense as of September&#160;30, 2023 was $119.3&#160;million with a weighted average remaining period of 2.68 years. &lt;/div&gt; </us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock>
    <us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod contextRef="P01_01_2023To09_30_2023_MaximumMembersrtRangeAxis_TwoThousandAndFifteenStockPlanMemberusgaapPlanNameAxis">P10Y</us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant
      contextRef="PAsOn09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis_TwoThousandAndFifteenStockPlanMemberusgaapPlanNameAxis"
      decimals="INF"
      unitRef="Unit_shares">686125</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant>
    <us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod contextRef="P01_01_2023To09_30_2023_MaximumMembersrtRangeAxis_TwoThousandAndTwentyThreeStockInducementPlanMemberusgaapPlanNameAxis">P10Y</us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod>
    <us-gaap:CommonStockCapitalSharesReservedForFutureIssuance
      contextRef="PAsOn09_30_2023_TwoThousandAndTwentyThreeStockInducementPlanMemberusgaapPlanNameAxis"
      decimals="INF"
      unitRef="Unit_shares">500000</us-gaap:CommonStockCapitalSharesReservedForFutureIssuance>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant
      contextRef="PAsOn09_30_2023_TwoThousandAndTwentyThreeStockInducementPlanMemberusgaapPlanNameAxis"
      decimals="INF"
      unitRef="Unit_shares">287011</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant>
    <us-gaap:ScheduleOfShareBasedCompensationStockOptionsActivityTableTextBlock contextRef="P01_01_2023To09_30_2023"> &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The following table summarizes stock option activity during the nine months ended September&#160;30, 2023: &lt;/div&gt; &lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:76%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:73%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:6%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:5%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Shares&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Weighted&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;average&#160;exercise&lt;/div&gt;&lt;/div&gt;&lt;br/&gt; &lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;price&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Outstanding at January&#160;1, 2023&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,857,054&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;81.78&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Options granted&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;5,205&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;283.08&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Options exercised&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(293,568&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;89.18&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Options cancelled&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;(50,079&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;)&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;174.61&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Outstanding at September&#160;30, 2023&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;2,518,612&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;79.49&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Exercisable at September&#160;30, 2023&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;1,818,817&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;74.86&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </us-gaap:ScheduleOfShareBasedCompensationStockOptionsActivityTableTextBlock>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber
      contextRef="PAsOn12_31_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">2857054</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice
      contextRef="PAsOn12_31_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">81.78</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">5205</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross>
    <us-gaap:ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">283.08</us-gaap:ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice>
    <us-gaap:StockIssuedDuringPeriodSharesStockOptionsExercised
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">293568</us-gaap:StockIssuedDuringPeriodSharesStockOptionsExercised>
    <us-gaap:ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">89.18</us-gaap:ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">50079</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod>
    <us-gaap:ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">174.61</us-gaap:ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber
      contextRef="PAsOn09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">2518612</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice
      contextRef="PAsOn09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">79.49</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber
      contextRef="PAsOn09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">1818817</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice
      contextRef="PAsOn09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="INF"
      unitRef="Unit_USD_per_Share">74.86</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice>
    <us-gaap:ProceedsFromStockOptionsExercised
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-5"
      unitRef="Unit_USD">26200000</us-gaap:ProceedsFromStockOptionsExercised>
    <us-gaap:ProceedsFromStockOptionsExercised
      contextRef="P01_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-5"
      unitRef="Unit_USD">0</us-gaap:ProceedsFromStockOptionsExercised>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-5"
      unitRef="Unit_USD">51000000</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue
      contextRef="P01_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-5"
      unitRef="Unit_USD">0</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">219.02</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue
      contextRef="P01_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">55.14</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber
      contextRef="PAsOn09_30_2023_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis_TwoThousandAndFifteenStockPlanMemberusgaapPlanNameAxis"
      decimals="INF"
      unitRef="Unit_shares">311767</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue
      contextRef="PAsOn09_30_2023_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis_TwoThousandAndFifteenStockPlanMemberusgaapPlanNameAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">256.81</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber
      contextRef="PAsOn09_30_2023_PerformanceStockUnitsMemberusgaapAwardTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">150000</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue
      contextRef="PAsOn09_30_2023_PerformanceStockUnitsMemberusgaapAwardTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">146.37</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue>
    <us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod
      contextRef="P01_01_2023To09_30_2023_TwoThousandAndFifteenStockAndInducementPlanMemberusgaapPlanNameAxis"
      decimals="INF"
      unitRef="Unit_shares">2980379</us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod>
    <mdgl:ScheduleOfShareBasedCompensationExpenseAllocationOfCompensationCostsAndRecognizedPeriodCostsTableTextBlock contextRef="P01_01_2023To09_30_2023"> &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;Stock-based compensation expense during the three and nine months ended September&#160;30, 2023 and 2022 was as follows (in thousands): &lt;/div&gt; &lt;div style="font-size:12pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE:COLLAPSE; font-family:Times New Roman; font-size:10pt;width:92%;border:0;margin:0 auto"&gt;
&lt;tr style="font-size: 0px;"&gt;
&lt;td style="width:65%"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom;width:4%"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="6" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Three&#160;Months&#160;Ended&#160;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="6" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Nine&#160;Months&#160;Ended&#160;September&#160;30,&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:8pt"&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2023&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&#160;&lt;/td&gt;
&lt;td colspan="2" style="border-bottom:1.00pt solid #000000;vertical-align:bottom;text-align:center;"&gt;&lt;div style="letter-spacing: 0px; top: 0px;;display:inline;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;2022&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td style="vertical-align: bottom; padding-bottom: 0.5pt;"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Stock-based compensation expense by type of award:&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Stock options&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,375&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,122&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;24,404&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;23,543&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Restricted stock units&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,652&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;9,846&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Other stock-based awards&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;633&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;633&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;&#x2014;&#x2002;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total stock-based compensation expense&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;12,660&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,122&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;34,883&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;23,543&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Effect of stock-based compensation expense by line item:&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Research and development&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;5,133&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;3,596&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;15,703&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;10,084&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 3em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;General and administrative&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;7,527&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;4,526&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;19,180&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;13,459&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 1px solid rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="page-break-inside:avoid ; font-family:Times New Roman; font-size:10pt;background-color:#cceeff"&gt;
&lt;td style="vertical-align:top"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 1em; text-indent: -1em; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;; line-height: normal;"&gt;Total stock-based compensation expense included in net loss&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;12,660&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;8,122&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;34,883&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;$&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom;text-align:right;"&gt;23,543&lt;/td&gt;
&lt;td style="white-space:nowrap;vertical-align:bottom"&gt;&#160;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="font-size:1px"&gt;
&lt;td style="vertical-align:bottom"&gt;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt;&#160;&#160;&lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td style="vertical-align:bottom"&gt; &lt;div style="margin-top: 0pt; margin-bottom: 0pt; border-top: 3px double rgb(0, 0, 0); line-height: normal;"&gt;&#160;&lt;/div&gt; &lt;/td&gt;
&lt;td&gt;&#160;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </mdgl:ScheduleOfShareBasedCompensationExpenseAllocationOfCompensationCostsAndRecognizedPeriodCostsTableTextBlock>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">8375000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">8122000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">24404000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2022To09_30_2022_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">23543000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2023To09_30_2023_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">3652000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2022To09_30_2022_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">0</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2023To09_30_2023_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">9846000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2022To09_30_2022_RestrictedStockUnitsRSUMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">0</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2023To09_30_2023_OtherStockBasedCompensationMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">633000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2022To09_30_2022_OtherStockBasedCompensationMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">0</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2023To09_30_2023_OtherStockBasedCompensationMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">633000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2022To09_30_2022_OtherStockBasedCompensationMemberusgaapAwardTypeAxis"
      decimals="-3"
      unitRef="Unit_USD">0</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">12660000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">8122000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">34883000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">23543000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2023To09_30_2023_ResearchAndDevelopmentExpenseMemberusgaapIncomeStatementLocationAxis"
      decimals="-3"
      unitRef="Unit_USD">5133000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2022To09_30_2022_ResearchAndDevelopmentExpenseMemberusgaapIncomeStatementLocationAxis"
      decimals="-3"
      unitRef="Unit_USD">3596000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2023To09_30_2023_ResearchAndDevelopmentExpenseMemberusgaapIncomeStatementLocationAxis"
      decimals="-3"
      unitRef="Unit_USD">15703000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2022To09_30_2022_ResearchAndDevelopmentExpenseMemberusgaapIncomeStatementLocationAxis"
      decimals="-3"
      unitRef="Unit_USD">10084000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2023To09_30_2023_GeneralAndAdministrativeExpenseMemberusgaapIncomeStatementLocationAxis"
      decimals="-3"
      unitRef="Unit_USD">7527000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2022To09_30_2022_GeneralAndAdministrativeExpenseMemberusgaapIncomeStatementLocationAxis"
      decimals="-3"
      unitRef="Unit_USD">4526000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2023To09_30_2023_GeneralAndAdministrativeExpenseMemberusgaapIncomeStatementLocationAxis"
      decimals="-3"
      unitRef="Unit_USD">19180000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2022To09_30_2022_GeneralAndAdministrativeExpenseMemberusgaapIncomeStatementLocationAxis"
      decimals="-3"
      unitRef="Unit_USD">13459000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">12660000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P07_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">8122000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2023To09_30_2023"
      decimals="-3"
      unitRef="Unit_USD">34883000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:AllocatedShareBasedCompensationExpense
      contextRef="P01_01_2022To09_30_2022"
      decimals="-3"
      unitRef="Unit_USD">23543000</us-gaap:AllocatedShareBasedCompensationExpense>
    <us-gaap:EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized
      contextRef="PAsOn09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis"
      decimals="-5"
      unitRef="Unit_USD">119300000</us-gaap:EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized>
    <us-gaap:EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1 contextRef="P01_01_2023To09_30_2023_EmployeeStockOptionMemberusgaapAwardTypeAxis">P2Y8M4D</us-gaap:EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1>
    <us-gaap:CommitmentsAndContingenciesDisclosureTextBlock contextRef="P01_01_2023To09_30_2023"> &lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;9. Commitments and Contingencies &lt;/div&gt;&lt;/div&gt; &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company has a Research, Development and Commercialization Agreement with &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;Hoffmann-La&lt;/div&gt; Roche (&#x201c;Roche&#x201d;) which grants the Company a sole and exclusive license to develop, use, sell, offer for sale and import any Licensed Product as defined by the agreement. &lt;/div&gt; &lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The agreement requires future milestone payments to Roche. Remaining milestones under the agreement total $8&#160;million and are payable upon Madrigal achieving specified objectives related to future regulatory approval in the United States and Europe of resmetirom or a product developed from resmetirom. Furthermore, a tiered single-digit royalty is payable on net sales of resmetirom or a product developed from resmetirom, subject to certain reductions. The Company has not achieved any additional product development or regulatory milestones and had no Licensed Product sales for the nine months ended September&#160;30, 2023 and 2022. &lt;/div&gt; &lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The Company has entered into customary contractual arrangements and letters of intent in preparation for and in support of clinical trials and commercialization. &lt;/div&gt; &lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;In August 2023, The Company entered into the Fifth Amendment to the Office Lease (the &#x201c;Lease Amendment&#x201d;). The Lease Amendment extends the term of the lease through November 2026. As a result of the Lease Amendment, an incremental $1.6&#160;million ROU asset and lease liabilities were recorded during the nine months ended September&#160;30, 2023. &lt;/div&gt; </us-gaap:CommitmentsAndContingenciesDisclosureTextBlock>
    <mdgl:RemainingMilestonePayments
      contextRef="PAsOn09_30_2023_HoffmanLaRocheMembersrtCounterpartyNameAxis_ResearchDevelopmentAndCommercializationAgreementMemberusgaapTypeOfArrangementAxis"
      decimals="-6"
      unitRef="Unit_USD">8000000</mdgl:RemainingMilestonePayments>
    <us-gaap:RevenueFromContractWithCustomerIncludingAssessedTax
      contextRef="P01_01_2023To09_30_2023"
      decimals="-6"
      unitRef="Unit_USD">0</us-gaap:RevenueFromContractWithCustomerIncludingAssessedTax>
    <us-gaap:RevenueFromContractWithCustomerIncludingAssessedTax
      contextRef="P01_01_2022To09_30_2022"
      decimals="-6"
      unitRef="Unit_USD">0</us-gaap:RevenueFromContractWithCustomerIncludingAssessedTax>
    <mdgl:LeaseExpiration contextRef="P08_01_2023To08_31_2023">November 2026</mdgl:LeaseExpiration>
    <mdgl:IncreaseDecreaseInRightOfUseAssetAndLeaseLiabilities
      contextRef="P08_01_2023To08_31_2023"
      decimals="-5"
      unitRef="Unit_USD">1600000</mdgl:IncreaseDecreaseInRightOfUseAssetAndLeaseLiabilities>
    <us-gaap:SubsequentEventsTextBlock contextRef="P01_01_2023To09_30_2023"> &lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;10. Subsequent Events &lt;/div&gt;&lt;/div&gt; &lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;On September&#160;28, 2023, the Company entered into an Underwriting Agreement with Goldman Sachs&#160;&amp;amp; Co. LLC, as representative of the several underwriters named therein, pursuant to which the Company sold to the underwriters in an underwritten public offering (the &#x201c;Offering&#x201d;): (i) 1,248,098 shares of common stock at a public offering price of $151.69 per share, &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;and&#160;(ii)&#160;pre-funded&#160;warrants&lt;/div&gt; &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;(the&#160;&#x201c;Pre-Funded&#160;Warrants&#x201d;)&lt;/div&gt; to purchase 2,048,098 shares of common stock at a public offering price of $151.6899 &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;per&#160;Pre-Funded&#160;Warrant,&lt;/div&gt; which represents the per share public offering price for the common stock less a $0.0001 per share exercise price for &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;each&#160;such&#160;Pre-Funded&#160;Warrant.&#160;The&lt;/div&gt; Offering closed on October&#160;3, 2023. &lt;/div&gt; &lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;The gross proceeds of the Offering was $500.0&#160;million, and the Company received net proceeds, after deducting the underwriting discount and commissions and other estimated offering expenses payable by the Company, of approximately $472.0&#160;million. The Company intends to use the net proceeds from the Offering for its clinical and commercial activities in preparation for a potential launch of resmetirom in the&#160;U.S.&#160;and for general corporate purposes, including, without limitation, research and development expenditures, clinical trial expenditures, manufacture and supply of drug substance and drug products, potential acquisitions or licensing of new technologies, capital expenditures and working capital. &lt;/div&gt; &lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt; &lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman;text-align:center"&gt; &lt;/div&gt;  &lt;div style="margin-top:0pt; margin-bottom:0pt; font-size:10pt; font-family:Times New Roman"&gt;&lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;The&#160;Pre-Funded&#160;Warrants&#160;are&lt;/div&gt; exercisable at any time after the date of issuance. A &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;holder&#160;of&#160;Pre-Funded&#160;Warrants&#160;may&lt;/div&gt; not exercise the warrant if the holder, together with its affiliates, would beneficially own more than 9.99% of the number of shares of common stock outstanding immediately after giving effect to such exercise. A &lt;div style="white-space: nowrap; letter-spacing: 0px; top: 0px;;display:inline;"&gt;holder&#160;of&#160;Pre-Funded&#160;Warrants&#160;may&lt;/div&gt; increase or decrease this percentage, but not in excess of 19.99%, by providing at least 61 days prior notice to the Company.&lt;/div&gt; &lt;div style="margin-top: 1em; margin-bottom: 1em"&gt;&lt;/div&gt; </us-gaap:SubsequentEventsTextBlock>
    <us-gaap:StockIssuedDuringPeriodSharesNewIssues
      contextRef="P10_03_2023To10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">1248098</us-gaap:StockIssuedDuringPeriodSharesNewIssues>
    <us-gaap:SharesIssuedPricePerShare
      contextRef="PAsOn10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="2"
      unitRef="Unit_USD_per_Share">151.69</us-gaap:SharesIssuedPricePerShare>
    <us-gaap:ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights
      contextRef="PAsOn10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_PreFundedWarrantsMemberusgaapClassOfWarrantOrRightAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="INF"
      unitRef="Unit_shares">2048098</us-gaap:ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights>
    <us-gaap:SharesIssuedPricePerShare
      contextRef="PAsOn10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_PreFundedWarrantsMemberusgaapClassOfWarrantOrRightAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="4"
      unitRef="Unit_USD_per_Share">151.6899</us-gaap:SharesIssuedPricePerShare>
    <us-gaap:ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1
      contextRef="PAsOn10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_PreFundedWarrantsMemberusgaapClassOfWarrantOrRightAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="4"
      unitRef="Unit_USD_per_Share">0.0001</us-gaap:ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1>
    <us-gaap:StockIssuedDuringPeriodValueNewIssues
      contextRef="P10_03_2023To10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_PreFundedWarrantsAndCommonStockMemberusgaapStatementEquityComponentsAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="-5"
      unitRef="Unit_USD">500000000</us-gaap:StockIssuedDuringPeriodValueNewIssues>
    <us-gaap:SaleOfStockConsiderationReceivedOnTransaction
      contextRef="P10_03_2023To10_03_2023_OfferingMemberusgaapSubsidiarySaleOfStockAxis_PreFundedWarrantsAndCommonStockMemberusgaapStatementEquityComponentsAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="-5"
      unitRef="Unit_USD">472000000</us-gaap:SaleOfStockConsiderationReceivedOnTransaction>
    <mdgl:PercentageOfOwnershipByHolderPostExerciseOfWarrants
      contextRef="PAsOn10_03_2023_PreFundedWarrantsMemberusgaapClassOfWarrantOrRightAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="4"
      unitRef="Unit_pure">0.0999</mdgl:PercentageOfOwnershipByHolderPostExerciseOfWarrants>
    <mdgl:MaximumOwnershipByHolder
      contextRef="PAsOn10_03_2023_PreFundedWarrantsMemberusgaapClassOfWarrantOrRightAxis_SubsequentEventMemberusgaapSubsequentEventTypeAxis"
      decimals="4"
      unitRef="Unit_pure">0.1999</mdgl:MaximumOwnershipByHolder>
</xbrl>
