XML 71 R60.htm IDEA: XBRL DOCUMENT
v3.23.2

Business Acquisitions - Additional Information (Details) - USD ($) $ in Thousands | 3 Months Ended | 6 Months Ended |  |  |  |  |  |
--- | --- | --- | --- | --- | --- | --- | --- | ---
Jun. 30, 2023 | Jun. 30, 2022 | Jun. 30, 2023 | Jun. 30, 2022 | May 31, 2023 | Feb. 28, 2023 | Nov. 30, 2022 | Sep. 30, 2022 | Aug. 31, 2022 | Jan. 31, 2022
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Transaction costs related to business combinations | $ 2,696 | $ 519 | $ 3,471 | $ 986 |  |  |  |  |  |
Common Stock |  |  | 2,598 |  |  |  |  |  |  |
Business combination, paid in cash |  |  | 65,337 |  |  |  |  |  |  |
Acquisitions measurement period adjustments |  |  | $ (164) |  |  |  |  |  |  |
EnvStd |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Percentage of interests acquired |  |  |  |  |  |  |  |  |  | 100.00%
EAI |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Percentage of interests acquired |  |  |  |  |  | 100.00% |  |  |  |
GreenPath |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Percentage of interests acquired |  |  |  |  | 100.00% |  |  |  |  |
GreenPath | Customer Relationships |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 12 years |  |  |  |  |  |  |
GreenPath | Trade Names |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 1 year |  |  |  |  |  |  |
GreenPath | Covenants Not to Compete |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 5 years |  |  |  |  |  |  |
GreenPath | Proprietary Software |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 5 years |  |  |  |  |  |  |
Matrix |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Percentage of interests acquired | 100.00% |  | 100.00% |  |  |  |  |  |  |
Business combination, paid in cash |  |  | $ 46,563 |  |  |  |  |  |  |
TriAD |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Percentage of interests acquired |  |  |  |  |  |  |  |  | 100.00% |
AirKinetics |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Percentage of interests acquired |  |  |  |  |  |  |  | 100.00% |  |
Huco |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Percentage of interests acquired |  |  |  |  |  |  | 100.00% |  |  |
EnvStd and IAG | 2026 Earn Out |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Payment through cash or common stock |  |  | 1,500 |  |  |  |  |  |  |
Common Stock |  |  | 5,500 |  |  |  |  |  |  |
Business combination, earn-out payment, maximum | $ 7,700 |  | 7,700 |  |  |  |  |  |  |
Business combination, paid in cash |  |  | 800 |  |  |  |  |  |  |
Frontier, EAI, GreenPath and Matrix |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Revenue | 10,600 |  | 11,600 |  |  |  |  |  |  |
Pre-tax income (loss) | $ 800 |  | 1,000 |  |  |  |  |  |  |
All Other 2023 Acquisitions |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Common Stock |  |  | 2,598 |  |  |  |  |  |  |
Business combination, paid in cash |  |  | $ 18,774 |  |  |  |  |  |  |
All Other 2023 Acquisitions | Customer Relationships |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 7 years |  |  |  |  |  |  |
All Other 2023 Acquisitions | Trade Names |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 2 years |  |  |  |  |  |  |
All Other 2023 Acquisitions | Covenants Not to Compete |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Weighted average useful lives for acquired intangible assets |  |  | 5 years |  |  |  |  |  |  |
EnvStd, IAG, TriAD, AirKinetics and Huco |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |
Revenue |  | 4,300 |  | 7,600 |  |  |  |  |  |
Pre-tax income (loss) |  | $ (100) |  | $ 700 |  |  |  |  |  |

X
- Definition Business combination payment through cash or common stock. + References No definition available. + Details
Name: | meg_BusinessCombinationPaymentThroughCashOrCommonStock
Namespace Prefix: | meg_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
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 -Topic 350 -SubTopic 30 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Subparagraph (a)(3) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482665/350-30-50-1 + 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 Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 805 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 5 -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479907/805-20-50-5 + 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 -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479328/805-10-50-2 + Details
Name: | us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired
Namespace Prefix: | us-gaap_
Data Type: | dtr-types: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 -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 25 -Paragraph 23 -Publisher FASB -URI https://asc.fasb.org//1943274/2147479405/805-10-25-23 + Details
Name: | us-gaap_BusinessCombinationAcquisitionRelatedCosts
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Amount of equity interests of the acquirer, including instruments or interests issued or issuable in consideration for the business combination. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Section 30 -Paragraph 8 -SubTopic 30 -Topic 805 -Publisher FASB -URI https://asc.fasb.org//1943274/2147479637/805-30-30-8 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Section 30 -Paragraph 7 -SubTopic 30 -Topic 805 -Publisher FASB -URI https://asc.fasb.org//1943274/2147479637/805-30-30-7 + Details
Name: | us-gaap_BusinessCombinationConsiderationTransferredEquityInterestsIssuedAndIssuable
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
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 -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 1 -Subparagraph (c)(3) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479581/805-30-50-1 + 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 -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (h)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479328/805-10-50-2 + 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 -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (h)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479328/805-10-50-2 + Details
Name: | us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of increase (decrease) from adjustments after acquisition date under purchase accounting of an asset representing the future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 350 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Subparagraph (g) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482573/350-20-50-1 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Section 25 -Paragraph 16 -SubTopic 10 -Topic 805 -Publisher FASB -URI https://asc.fasb.org//1943274/2147479405/805-10-25-16 + Details
Name: | us-gaap_GoodwillPurchaseAccountingAdjustments
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition The cash outflow associated with the acquisition of business during the period. The cash portion only of the acquisition price. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 805 -SubTopic 30 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Subparagraph (b)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479581/805-30-50-1 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 230 -SubTopic 10 -Section 45 -Paragraph 13 -Subparagraph (b) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482740/230-10-45-13 + Details
Name: | us-gaap_PaymentsToAcquireBusinessesGross
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

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

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

X
- Details
Name: | us-gaap_BusinessAcquisitionAxis=meg_GreenpathEnergyLtdMember
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_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_FiniteLivedIntangibleAssetsByMajorClassAxis=us-gaap_SoftwareDevelopmentMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

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

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

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

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

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

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

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

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

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