.mg-component {
	box-sizing: border-box;
	margin-block: clamp(1.25rem, 3vw, 2.5rem);
}

.mg-component *,
.mg-component *::before,
.mg-component *::after {
	box-sizing: inherit;
}

.mg-component__heading {
	margin-block: 0 1rem;
	font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

.mg-component--unavailable {
	padding: 0.75rem 1rem;
	border: 1px dashed currentColor;
	color: #5f6368;
	font-size: 0.875rem;
}

.mg-commerce__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1rem;
}

.mg-commerce__product {
	display: grid;
	grid-template-columns: minmax(7rem, 12rem) 1fr;
	gap: 1rem;
	padding: clamp(1rem, 2.5vw, 1.5rem);
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 0.75rem;
	background: var(--color_content_bg, #fff);
}

.mg-commerce__product--compact {
	grid-template-columns: 6rem 1fr;
}

.mg-commerce__image {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
}

.mg-commerce__body > :first-child,
.mg-commerce__ranking,
.mg-content-collection ul {
	margin-block-start: 0;
}

.mg-commerce__offers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-block-start: 1rem;
}

.mg-commerce__offer {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.625rem 1rem;
	border-radius: 999px;
	background: #1f5a96;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.mg-commerce__ranking {
	display: grid;
	gap: 1.25rem;
	padding-inline-start: 2rem;
}

.mg-commerce__ranking-item::marker {
	font-size: 1.5rem;
	font-weight: 800;
}

/* The legacy image_only contract is retained as a canonical presentation. */
.mg-commerce__ranking--image-only {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
	align-items: center;
	list-style: none;
	padding-inline-start: 0;
}

.mg-commerce__ranking-item--image-only {
	display: grid;
	place-items: center;
}

.mg-commerce__image-link {
	display: block;
	width: 100%;
	max-width: 14rem;
	padding: 0.5rem;
	border-radius: 0.75rem;
	background: var(--color_content_bg, #fff);
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.mg-commerce__image-link:hover,
.mg-commerce__image-link:focus-visible {
	transform: translateY(-0.125rem);
	box-shadow: 0 0.5rem 1.25rem color-mix(in srgb, currentColor 15%, transparent);
}

.mg-finder__form {
	margin-block-end: 1rem;
	padding: clamp(1rem, 2.5vw, 1.5rem);
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 0.75rem;
	background: color-mix(in srgb, #1f5a96 4%, transparent);
}

.mg-finder__fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	gap: 0.75rem 1rem;
}

.mg-finder__fields label:not(.mg-finder__check) {
	display: grid;
	gap: 0.35rem;
	font-weight: 700;
}

.mg-finder__fields input[type="number"],
.mg-finder__fields select {
	width: 100%;
	min-height: 2.75rem;
	padding-inline: 0.625rem;
	border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
	border-radius: 0.35rem;
	background: var(--color_content_bg, #fff);
	color: inherit;
}

.mg-finder__check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
}

.mg-finder__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-block-start: 1rem;
}

.mg-finder__actions button {
	min-height: 2.75rem;
	padding: 0.625rem 1rem;
	border: 1px solid #1f5a96;
	border-radius: 0.35rem;
	background: #1f5a96;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.mg-finder__actions button[type="reset"] {
	background: transparent;
	color: inherit;
}

.mg-finder__status {
	font-weight: 700;
}

.mg-finder__specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.35rem 0.75rem;
	margin-block: 0.75rem;
}

.mg-finder__specs div {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	border-block-end: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.mg-finder__specs dt,
.mg-finder__specs dd {
	margin: 0;
}

.mg-finder__specs dt {
	color: color-mix(in srgb, currentColor 72%, transparent);
}

.mg-component__table-scroll {
	overflow-x: auto;
}

.mg-language-switcher ul,
.mg-taxonomy-links ul,
.mg-follow-hub ul,
.mg-news-ticker ul,
.mg-table-of-contents ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mg-language-switcher a,
.mg-taxonomy-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 2.75rem;
	padding: 0.5rem 0.85rem;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
}

.mg-language-switcher a[aria-current="page"] {
	border-color: #1f5a96;
	background: #1f5a96;
	color: #fff;
}

.mg-language-switcher.is-align-center ul {
	justify-content: center;
}

.mg-language-switcher.is-align-right ul {
	justify-content: flex-end;
}

.mg-language-switcher--dropdown ul {
	width: min(100%, 24rem);
	margin-inline: auto;
}

.mg-language-switcher--dropdown li,
.mg-language-switcher--dropdown a {
	width: 100%;
}

.mg-follow-hub ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.mg-follow-hub a {
	display: grid;
	gap: 0.35rem;
	height: 100%;
	padding: 1rem;
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 0.75rem;
	color: inherit;
	text-decoration: none;
}

.mg-follow-hub a span {
	font-size: 0.875rem;
	opacity: 0.78;
}

.mg-news-ticker {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	background: color-mix(in srgb, #1f5a96 8%, transparent);
}

.mg-news-ticker__label {
	color: #a13c18;
	letter-spacing: 0.08em;
}

.mg-news-ticker ul {
	display: grid;
	gap: 0.35rem;
}

.mg-news-ticker a {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.75rem;
	color: inherit;
}

.mg-table-of-contents ol {
	display: grid;
	gap: 0.4rem;
}

.mg-table-of-contents .is-level-3 {
	padding-inline-start: 1.25rem;
}

.mg-interactive-embed iframe {
	display: block;
	width: 100%;
	min-height: clamp(24rem, 70vh, 64rem);
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 0.75rem;
}

.mg-site-metric {
	display: inline;
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.mg-site-summary {
	margin: 0;
}

.mg-site-summary__metric {
	font-variant-numeric: tabular-nums;
}

.mg-component table {
	width: 100%;
	border-collapse: collapse;
}

.mg-component th,
.mg-component td {
	padding: 0.75rem;
	border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
	text-align: start;
}

.mg-evidence,
.mg-callout {
	padding: clamp(1rem, 2.5vw, 1.5rem);
	border-inline-start: 0.35rem solid #1f5a96;
	background: color-mix(in srgb, #1f5a96 8%, transparent);
}

.mg-callout--warning {
	border-inline-start-color: #a13c18;
	background: color-mix(in srgb, #a13c18 9%, transparent);
}

.mg-component-editor {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem;
	border: 1px dashed #757575;
}

@media (max-width: 38rem) {
	.mg-commerce__product,
	.mg-commerce__product--compact {
		grid-template-columns: 1fr;
	}

	.mg-commerce__image {
		max-width: 12rem;
		margin-inline: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mg-component *,
	.mg-component *::before,
	.mg-component *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
