XML 65 R54.htm IDEA: XBRL DOCUMENT
v3.21.1

Business Acquisitions - Additional Information (Details) - USD ($) |  | 1 Months Ended | 3 Months Ended
--- | --- | --- | ---
Apr. 01, 2021 | Apr. 30, 2021 | Jan. 31, 2021 | Apr. 30, 2020 | Mar. 31, 2021 | Mar. 31, 2020
Business Acquisition [Line Items] |  |  |  |  |  |
Transaction costs related to business combinations |  |  |  |  | $ 237,000 | $ 1,307,000
Number of common stock shares issued in connection with business acquisition |  |  |  |  | 71,740 |
Revenues from discontinued service lines |  |  |  |  | $ 0 | $ 2,500,000
MSE Group |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Percentage of interests acquired |  |  | 100.00% |  |  |
Number of common stock shares issued in connection with business acquisition |  |  |  |  | 71,740 |
Revenue |  |  |  |  | $ 4,000,000 |
Pre-tax loss |  |  |  |  | $ 300,000 |
MSE Group | Subsequent Event |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Number of common stock shares issued in connection with business acquisition | 24,200 |  |  |  |  |
MSE Group | Customer Relationships |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 7 years |  |  |
MSE Group | Related Backlog |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 2 years |  |  |
MSE Group | Trade Names |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 2 years |  |  |
MSE Group | Covenants Not to Compete |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 5 years |  |  |
MSE Group | 2022 Earn Out |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Business combination, earn-out payment, maximum |  |  | $ 6,200,000 |  |  |
MSE Group | 2023 Earn Out |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Business combination, earn-out payment, maximum |  |  | $ 6,200,000 |  |  |
CTEH |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Percentage of interests acquired |  |  |  | 100.00% |  |
Number of common stock shares issued in connection with business acquisition |  |  |  | 791,139 |  |
CTEH | External Proprietary Software |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  |  | 5 years |  |
CTEH | Subsequent Event |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Number of common stock shares issued in connection with business acquisition | 539,607 |  |  |  |  |
CTEH | Customer Relationships |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  |  | 15 years |  |
CTEH | Trade Names |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  |  | 5 years |  |
CTEH | Covenants Not to Compete |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  |  | 5 years |  |
CTEH | Proprietary Software |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  |  | 3 years |  |
CTEH | 2020 Earn Out |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Business combination, earn-out payment, maximum |  |  |  | $ 50,000,000 |  |
Business combination, contingent consideration arrangements, basis for amount |  |  |  |  | The CTEH first year earn-out was calculated at twelve times CTEH’s 2020 EBITDA (as defined in the purchase agreement) in excess of $18.3 million, with a maximum first year earn-out payment of $50.0 million, which was fully achieved. |
Business combination, contingent consideration arrangements, description |  |  |  |  | The 2020 earn-out was initially payable 100.0% in common stock, but as a result of the completion of the Company’s IPO (Note 1), 50.0% was payable in cash. In April 2021, the 2020 earn-out payment was made with 50.0% paid in cash and the remaining 50.0% paid in common stock of the Company (Note 22). |
Business combination, minimum EBITDA for contingent consideration arrangements |  |  |  | $ 18,300,000 |  |
Percentage of earn out payable in common stock |  |  |  | 100.00% |  |
CTEH | 2020 Earn Out | Subsequent Event |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Percentage of earn out paid in cash, as result of completing of IPO |  | 50.00% |  |  |  |
Percentage of earn out paid in common stock, as a result of completion of IPO |  | 50.00% |  |  |  |
CTEH | 2020 Earn Out | Minimum |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Business combination, actual EBITDA |  |  |  | $ 18,300,000 |  |
CTEH | 2020 Earn Out | Maximum |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Business combination, actual EBITDA |  |  |  | 22,500,000 |  |
CTEH | 2021 Earn Out |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Business combination, earn-out payment, maximum |  |  |  | $ 30,000,000 |  |
Business combination, contingent consideration arrangements, basis for amount |  |  |  |  | The second year earn-out is to be calculated at ten times CTEH’s 2021 EBITDA in excess of actual 2020 EBITDA (with actual 2020 EBITDA subject to a minimum of $18.3 million and a maximum of $22.5 million), with a maximum second year earn-out payment of $30.0 million. |
Business combination, contingent consideration arrangements, description |  |  |  |  | The 2021 earn-out, if any, is payable 100.0% in cash. |
Percentage of earn out payable in cash |  |  |  | 100.00% |  |
Other Acquisition | Covenants Not to Compete |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  |  | 4 years |  |

X
- Definition Business combination earnings before interest tax depreciation and amortization. + References No definition available. + Details
Name: | meg_BusinessCombinationEarningsBeforeInterestTaxDepreciationAndAmortization
Namespace Prefix: | meg_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Business combination, minimum earnings before interest, tax, depreciation and amortization for contingent consideration arrangements. + References No definition available. + Details
Name: | meg_BusinessCombinationMinimumEarningsBeforeInterestTaxDepreciationAndAmortizationForContingentConsiderationArrangements
Namespace Prefix: | meg_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Percentage of earn out paid in cash, as result of completing of initial public offering. + References No definition available. + Details
Name: | meg_PercentageOfEarnOutPaidInCashAsResultOfCompletingOfInitialPublicOffering
Namespace Prefix: | meg_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of earn out paid in common stock, as a result of completion of initial public offering. + References No definition available. + Details
Name: | meg_PercentageOfEarnOutPaidInCommonStockAsResultOfCompletionOfInitialPublicOffering
Namespace Prefix: | meg_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of earn out payable in cash. + References No definition available. + Details
Name: | meg_PercentageOfEarnOutPayableInCash
Namespace Prefix: | meg_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of earn out payable in common stock. + References No definition available. + Details
Name: | meg_PercentageOfEarnOutPayableInCommonStock
Namespace Prefix: | meg_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Weighted average amortization period of finite-lived intangible assets acquired either individually or as part of a group of assets, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 350 -SubTopic 30 -Section 50 -Paragraph 1 -Subparagraph (a)(3) -URI http://asc.fasb.org/extlink&oid=66006027&loc=d3e16265-109275 + Details
Name: | us-gaap_AcquiredFiniteLivedIntangibleAssetsWeightedAverageUsefulLife
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References No definition available. + Details
Name: | us-gaap_BusinessAcquisitionLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of voting equity interests acquired at the acquisition date in the business combination. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (c) -URI http://asc.fasb.org/extlink&oid=79982066&loc=d3e1392-128463 + Details
Name: | us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired
Namespace Prefix: | us-gaap_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | instant

X
- Definition This element represents acquisition-related costs incurred to effect a business combination which costs have been expensed during the period. Such costs include finder's fees; advisory, legal, accounting, valuation, and other professional or consulting fees; general administrative costs, including the costs of maintaining an internal acquisitions department; and may include costs of registering and issuing debt and equity securities. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 25 -Paragraph 23 -URI http://asc.fasb.org/extlink&oid=116868678&loc=d3e1043-128460 + Details
Name: | us-gaap_BusinessCombinationAcquisitionRelatedCosts
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition For contingent consideration arrangements recognized in connection with a business combination, this element represents a description of the basis for determining the amount of the payment recorded. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 25 -Paragraph 5 -URI http://asc.fasb.org/extlink&oid=6911189&loc=d3e6405-128476 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 25 -Paragraph 6 -URI http://asc.fasb.org/extlink&oid=6911189&loc=d3e6408-128476 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 1 -Subparagraph (c)(2) -URI http://asc.fasb.org/extlink&oid=120321790&loc=d3e6927-128479 Reference 4: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 25 -Paragraph 7 -URI http://asc.fasb.org/extlink&oid=6911189&loc=d3e6411-128476 + Details
Name: | us-gaap_BusinessCombinationContingentConsiderationArrangementsBasisForAmount
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition For contingent consideration arrangements recognized in connection with a business combination, this element represents a description of such arrangements. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 1 -Subparagraph (c)(2) -URI http://asc.fasb.org/extlink&oid=120321790&loc=d3e6927-128479 + Details
Name: | us-gaap_BusinessCombinationContingentConsiderationArrangementsDescription
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition For contingent consideration arrangements recognized in connection with a business combination, this element represents an estimate of the high-end of the potential range (undiscounted) of the consideration which may be paid. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 1 -Subparagraph (c)(3) -URI http://asc.fasb.org/extlink&oid=120321790&loc=d3e6927-128479 + Details
Name: | us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition This element represents the amount of earnings or loss of the acquiree since the acquisition date included in the consolidated income statement for the reporting period. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (h)(1) -URI http://asc.fasb.org/extlink&oid=79982066&loc=d3e1392-128463 + Details
Name: | us-gaap_BusinessCombinationProFormaInformationEarningsOrLossOfAcquireeSinceAcquisitionDateActual
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition This element represents the amount of revenue of the acquiree since the acquisition date included in the consolidated income statement for the reporting period. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (h)(1) -URI http://asc.fasb.org/extlink&oid=79982066&loc=d3e1392-128463 + Details
Name: | us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of revenue attributable to disposal group, including, but not limited to, discontinued operation. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 205 -SubTopic 20 -Section 50 -Paragraph 5B -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=109222650&loc=SL51721673-107760 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 205 -SubTopic 20 -Section 50 -Paragraph 7 -URI http://asc.fasb.org/extlink&oid=109222650&loc=SL51721683-107760 + Details
Name: | us-gaap_DisposalGroupIncludingDiscontinuedOperationRevenue
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Number of shares of stock issued during the period pursuant to acquisitions. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(29)) -URI http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.3-04) -URI http://asc.fasb.org/extlink&oid=120397183&loc=d3e187085-122770 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(28)) -URI http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682 + Details
Name: | us-gaap_StockIssuedDuringPeriodSharesAcquisitions
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Details
Name: | us-gaap_BusinessAcquisitionAxis=meg_MSEGroupMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_SubsequentEventTypeAxis=us-gaap_SubsequentEventMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis=us-gaap_CustomerRelationshipsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis=us-gaap_OrderOrProductionBacklogMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis=us-gaap_TradeNamesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis=us-gaap_NoncompeteAgreementsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ContingentConsiderationByTypeAxis=meg_TwoThousandAndTwentyTwoEarnOutsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ContingentConsiderationByTypeAxis=meg_TwoThousandAndTwentyThreeEarnOutsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_BusinessAcquisitionAxis=meg_TheCenterForToxicologyAndEnvironmentalHealthLLCMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_PropertyPlantAndEquipmentByTypeAxis=us-gaap_SoftwareDevelopmentMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis=us-gaap_ComputerSoftwareIntangibleAssetMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ContingentConsiderationByTypeAxis=meg_TwoThousandAndTwentyEarnOutMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MinimumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MaximumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ContingentConsiderationByTypeAxis=meg_TwoThousandAndTwentyOneEarnOutMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_BusinessAcquisitionAxis=meg_OtherAcquisitionMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |