/* =========================================================
   Elementor container reset
   Loaded AFTER Elementor's frontend.css but BEFORE style-base.css.

   Elementor's `.e-con` base rule drives display, padding, margin, gap,
   z-index, position, overflow, border-radius and width from CSS variables
   whose defaults are opinionated (10px padding, 20px gap, position:relative,
   z-index:revert). Those declarations sit at the same (0,1,0) specificity as
   most of the design's own single-class rules, so whichever stylesheet loads
   last wins the tie.

   Rather than patch each collision, this file resets the variables to neutral
   values on the theme's own containers. The design's real declarations then
   win by source order wherever it actually specifies something, and where it
   says nothing the element behaves like the plain <div>/<section> the original
   static markup used.
   ========================================================= */

.mm-con {
	--width: 100%;
	--height: auto;
	--min-height: initial;
	--position: static;
	--z-index: auto;
	--overflow: visible;
	--border-radius: 0;

	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;

	--margin-top: 0px;
	--margin-right: 0px;
	--margin-bottom: 0px;
	--margin-left: 0px;

	--gap: 0px;
	--row-gap: 0px;
	--column-gap: 0px;

	/* Containers stand in for the design's plain block-level wrappers; the few
	   that need flex or grid declare it themselves in style-base.css. */
	display: block;
}

/* The theme's own widgets (and any raw HTML widget) carry a component whose
   exact DOM the design's CSS and main.js depend on — grids with :nth-child
   rules, marquees, the carousel, the forms. `display: contents` removes
   Elementor's wrapper divs from the box tree so the component sits as a direct
   grid/flex child exactly as it did in the static markup. The editor keeps real
   boxes, so widgets stay selectable and draggable there. */
body:not(.elementor-editor-active) .mm-widget,
body:not(.elementor-editor-active) .elementor-widget-html,
body:not(.elementor-editor-active) .elementor-widget-html > .elementor-widget-container {
	display: contents;
}

/* Exception: `.stack` and `.story__body` space their children with
   `> * + *` margins, which a `display: contents` element cannot apply. Inside
   those, the wrapper stays a block and takes the margin itself — the same
   spacing the static markup produced. */
body:not(.elementor-editor-active) .stack > .mm-widget,
body:not(.elementor-editor-active) .story__body > .mm-widget {
	display: block;
}

/* A bare link widget drops its wrapper so the link sits in the layout exactly
   as the static markup had it — a block wrapper would change the line box the
   inline link creates. The wrapper can then no longer carry the margin that
   `.stack > * + *` gives a child, so it is passed to the link (the same 1.2rem
   that rule uses). */
body:not(.elementor-editor-active) .stack > .mm-widget.mm-bare {
	display: contents;
}

body:not(.elementor-editor-active) .stack > * + .mm-widget.mm-bare > a {
	margin-top: 1.2rem;
}

/* A widget that sets its own top spacing opts out of `.stack`'s `> * + *`
   margin, so the two do not stack up. */
body:not(.elementor-editor-active) .stack > .mm-widget.mm-tight {
	margin-top: 0;
}

/* Long-form copy (the legal pages) sits in one Text Editor widget. Its wrappers
   are removed on the frontend so rules like `.doc > h2:first-child` still see
   the headings as direct children. */
body:not(.elementor-editor-active) .elementor-widget-text-editor.mm-flow,
body:not(.elementor-editor-active) .elementor-widget-text-editor.mm-flow > .elementor-widget-container {
	display: contents;
}

/* Elementor's heading widget hard-codes `line-height: 1` at (0,1,0), which
   outranks the design's typography scale on the bare `h1`–`h4` selectors.
   Restating it per level at (0,1,1) hands those back; anything the design says
   more specifically still wins, because this file loads before style-base.css. */
h1.elementor-heading-title {
	line-height: var(--lh-h1);
}

h2.elementor-heading-title {
	line-height: var(--lh-h2);
}

h3.elementor-heading-title {
	line-height: var(--lh-h3);
}

h4.elementor-heading-title {
	line-height: var(--lh-h4);
}

h5.elementor-heading-title,
h6.elementor-heading-title {
	line-height: var(--lh-h4);
}

/* Elementor's own `.e-con .elementor-widget.elementor-widget { margin-block-end: 0 }`
   already removes the inter-widget spacing inside containers, so the design's
   own element margins are the only ones left. Nothing to add here. */
