/* =============================================================
   Saltwater Aquarium Guide — Magazine: editorial pages
   Loaded on every page except the parent theme's tool pages.
   ============================================================= */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--mg-bg); color: var(--mg-ink);
	font: 400 17px/1.65 var(--mg-sans);
	-webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--mg-teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--mg-navy); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--mg-serif); font-weight: 600; line-height: 1.2; color: var(--mg-navy); margin: 0 0 .5em; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--mg-teal); outline-offset: 2px; border-radius: 4px; }
.mg-main:focus { outline: none; }
.screen-reader-text, .visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mg-muted { color: var(--mg-muted); }

.mg-wrap { max-width: var(--mg-wrap); margin: 0 auto; padding: 0 20px; }
.mg-wrap--narrow { max-width: 800px; }
.mg-wrap--article { max-width: 1140px; }

/* ---------- Sections ---------- */
.mg-section { padding: 56px 0; background: var(--mg-white); }
.mg-section--tint { background: var(--mg-bg); }
.mg-section--plain { background: var(--mg-white); border-top: 1px solid var(--mg-line); }
.mg-section--dark { background: var(--mg-navy); color: #D5E6EC; }
.mg-section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 28px; }
.mg-section__title { font-size: clamp(26px, 3.2vw, 34px); margin: 0; }
.mg-section__intro { margin: 8px 0 0; max-width: 680px; color: var(--mg-muted); font-size: 17px; }
.mg-section--dark .mg-section__title { color: var(--mg-white); }
.mg-section--dark .mg-section__intro { color: #BFD6DF; }
.mg-more, .mg-link {
	display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15.5px;
	color: var(--mg-teal-ink); text-decoration: none; padding: 6px 0;
}
.mg-more:hover, .mg-link:hover { color: var(--mg-navy); text-decoration: underline; }
.mg-section--dark .mg-more { color: var(--mg-aqua); }
.mg-section--dark .mg-more:hover { color: var(--mg-white); }
@media (min-width: 900px) { .mg-section { padding: 72px 0; } }

/* ---------- Kicker + meta ---------- */
.mg-kicker {
	display: inline-block; margin: 0 0 8px; font: 600 12.5px/1.3 var(--mg-sans);
	letter-spacing: .07em; text-transform: uppercase; color: var(--mg-teal-ink); text-decoration: none;
}
a.mg-kicker { padding: 4px 0; }
a.mg-kicker:hover { color: var(--mg-navy); text-decoration: underline; }
.mg-meta { margin: 0; color: var(--mg-muted); font-size: 14px; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.mg-meta__sep { color: #9FB2BC; }

/* ---------- Hero ---------- */
.mg-hero { position: relative; isolation: isolate; background: var(--mg-navy); color: var(--mg-white); display: grid; min-height: clamp(420px, 62vh, 620px); }
.mg-hero__media { position: absolute; inset: 0; z-index: -2; }
.mg-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mg-hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(90deg, rgba(9, 43, 64, .92) 0%, rgba(9, 43, 64, .78) 42%, rgba(9, 43, 64, .28) 100%);
}
.mg-hero__inner { align-self: center; width: 100%; max-width: var(--mg-wrap); margin: 0 auto; padding: 56px 20px; }
.mg-hero__kicker { margin: 0 0 14px; font: 600 13px/1.3 var(--mg-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--mg-aqua); }
.mg-hero__title { color: var(--mg-white); font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; max-width: 14em; margin: 0 0 18px; }
.mg-hero__sub { max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: #E3EEF2; margin: 0 0 28px; }
.mg-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 640px) {
	.mg-hero::after { background: linear-gradient(180deg, rgba(9, 43, 64, .78) 0%, rgba(9, 43, 64, .9) 100%); }
	.mg-hero__actions .mg-btn { width: 100%; }
}

.mg-stats { background: var(--mg-marine); color: #D5E6EC; font-size: 14.5px; }
.mg-stats ul { list-style: none; margin: 0 auto; padding-top: 12px; padding-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.mg-stats strong { color: var(--mg-white); font-weight: 700; }

/* ---------- Thumbnails ---------- */
.mg-thumb-fallback {
	display: grid; place-items: center; width: 100%; height: 100%; min-height: 120px; color: rgba(255, 255, 255, .88);
	background: linear-gradient(135deg, var(--mg-marine), var(--mg-teal));
}
.mg-tone-b { background: linear-gradient(135deg, var(--mg-navy), var(--mg-marine)); }
.mg-tone-c { background: linear-gradient(135deg, var(--mg-teal), #2BA3A6); }

/* ---------- Cards ---------- */
.mg-grid { display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
.mg-grid:empty { display: none; }
@media (min-width: 640px) { .mg-grid--3, .mg-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .mg-grid--3 { grid-template-columns: repeat(3, 1fr); } .mg-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.mg-card { display: flex; flex-direction: column; background: var(--mg-white); border: 1px solid var(--mg-line); border-radius: var(--mg-radius); overflow: hidden; }
.mg-card__media { display: block; aspect-ratio: 3 / 2; background: var(--mg-line); overflow: hidden; }
.mg-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.mg-card:hover .mg-card__media img { transform: scale(1.03); }
.mg-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.mg-card__title { font-size: 20px; line-height: 1.28; margin: 0 0 8px; }
.mg-card__title a { color: var(--mg-navy); text-decoration: none; }
.mg-card__title a:hover { color: var(--mg-teal-ink); text-decoration: underline; }
.mg-card__excerpt { color: var(--mg-ink); font-size: 15.5px; line-height: 1.55; margin: 0 0 14px; }
.mg-card .mg-meta { margin-top: auto; }

.mg-card--feature .mg-card__title { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.18; }
.mg-card--feature .mg-card__excerpt { font-size: 17px; }
@media (min-width: 900px) {
	.mg-archive__lead .mg-card--feature { flex-direction: row; }
	.mg-archive__lead .mg-card--feature .mg-card__media { flex: 0 0 56%; aspect-ratio: auto; min-height: 340px; }
	.mg-archive__lead .mg-card--feature .mg-card__body { padding: 32px; justify-content: center; }
	.mg-archive__lead .mg-card--feature .mg-meta { margin-top: 8px; }
}

.mg-card--row { flex-direction: row; align-items: stretch; }
.mg-card--row .mg-card__media { flex: 0 0 34%; max-width: 170px; aspect-ratio: auto; min-height: 104px; }
.mg-card--row .mg-card__body { padding: 12px 16px; }
.mg-card--row .mg-card__title { font-size: 17px; margin-bottom: 6px; }
.mg-card--row .mg-kicker { margin-bottom: 2px; font-size: 11.5px; }

.mg-latest { display: grid; gap: 24px; }
.mg-latest__list { display: grid; gap: 14px; align-content: start; }
@media (min-width: 1000px) { .mg-latest { grid-template-columns: 1.15fr 1fr; gap: 32px; } }

/* ---------- Start here ---------- */
.mg-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: 1fr; counter-reset: none; }
@media (min-width: 640px) { .mg-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .mg-steps { grid-template-columns: repeat(4, 1fr); } }
.mg-step { display: flex; flex-direction: column; background: var(--mg-white); border: 1px solid var(--mg-line); border-radius: var(--mg-radius); overflow: hidden; }
.mg-step__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--mg-line); }
.mg-step__media img { width: 100%; height: 100%; object-fit: cover; }
.mg-step__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.mg-step__num { font: 600 12.5px/1.3 var(--mg-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--mg-teal-ink); margin-bottom: 6px; }
.mg-step__title { font-size: 20px; margin: 0 0 8px; }
.mg-step__body p { font-size: 15.5px; line-height: 1.55; margin: 0 0 12px; }
.mg-step .mg-link { margin-top: auto; }

/* ---------- Category tiles ---------- */
.mg-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .mg-tiles { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .mg-tiles { grid-template-columns: repeat(5, 1fr); } }
.mg-tile { display: flex; flex-direction: column; height: 100%; background: var(--mg-white); border: 1px solid var(--mg-line); border-radius: var(--mg-radius); overflow: hidden; text-decoration: none; color: var(--mg-ink); transition: border-color .15s ease, box-shadow .15s ease; }
.mg-tile:hover { border-color: var(--mg-teal); box-shadow: var(--mg-shadow); color: var(--mg-ink); }
.mg-tile__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mg-line); }
.mg-tile__media img { width: 100%; height: 100%; object-fit: cover; }
.mg-tile__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.mg-tile__name { font: 600 17.5px/1.25 var(--mg-serif); color: var(--mg-navy); }
.mg-tile:hover .mg-tile__name { color: var(--mg-teal-ink); text-decoration: underline; }
.mg-tile__desc { font-size: 14.5px; line-height: 1.45; color: var(--mg-muted); }
.mg-tile__count { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; color: var(--mg-teal-ink); }
@media (max-width: 480px) { .mg-tile__desc { display: none; } }

/* ---------- Equipment list ---------- */
.mg-gear { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .mg-gear { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .mg-gear { grid-template-columns: repeat(3, 1fr); } }
.mg-gear__item { display: flex; gap: 16px; padding: 20px; background: var(--mg-bg); border: 1px solid var(--mg-line); border-radius: var(--mg-radius); }
.mg-gear__icon { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--mg-navy); color: var(--mg-aqua); }
.mg-gear__title { font-size: 18px; line-height: 1.3; margin: 0; }
.mg-gear__item { align-items: center; }
.mg-gear__title a { color: var(--mg-navy); text-decoration: none; }
.mg-gear__title a:hover { color: var(--mg-teal-ink); text-decoration: underline; }
.mg-gear__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--mg-muted); }
.mg-gear .mg-kicker { margin-bottom: 4px; }

/* ---------- Disclosure ---------- */
.mg-disclosure {
	display: flex; gap: 10px; align-items: flex-start; margin: 0 0 24px; padding: 12px 16px;
	background: #EEF6F7; border: 1px solid #CFE4E7; border-radius: 10px;
	font-size: 14.5px; line-height: 1.5; color: var(--mg-ink);
}
.mg-disclosure .mg-icon { margin-top: 3px; color: var(--mg-teal-ink); }
.mg-disclosure--center { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- Comparison table ---------- */
.mg-compare { margin: 0 0 24px; }
.mg-compare__scroll { overflow-x: auto; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); background: var(--mg-white); }
.mg-table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.mg-table th, .mg-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--mg-line); }
.mg-table thead th { background: var(--mg-navy); color: var(--mg-white); font: 600 13px/1.3 var(--mg-sans); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.mg-table tbody th { font: 600 17px/1.3 var(--mg-serif); color: var(--mg-navy); min-width: 150px; }
.mg-table tbody tr:last-child th, .mg-table tbody tr:last-child td { border-bottom: 0; }
.mg-table__actions { min-width: 210px; }
.mg-table__actions .mg-link { display: block; padding: 0 0 10px; font-size: 14.5px; }
.mg-table--plain thead th { white-space: normal; }
.mg-compare__note { margin: 12px 0 0; font-size: 14.5px; color: var(--mg-muted); }
@media (max-width: 760px) {
	.mg-compare .mg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.mg-compare .mg-table, .mg-compare .mg-table tbody, .mg-compare .mg-table tr, .mg-compare .mg-table th, .mg-compare .mg-table td { display: block; width: 100%; }
	.mg-compare .mg-table tr { padding: 16px; border-bottom: 1px solid var(--mg-line); }
	.mg-compare .mg-table tr:last-child { border-bottom: 0; }
	.mg-compare .mg-table th, .mg-compare .mg-table td { padding: 0 0 10px; border: 0; min-width: 0; }
	.mg-compare .mg-table tbody th { font-size: 20px; padding-bottom: 12px; }
	.mg-compare .mg-table td::before { content: attr(data-label); display: block; font: 600 12px/1.3 var(--mg-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mg-muted); margin-bottom: 2px; }
	.mg-compare .mg-table td.mg-table__actions::before { content: none; }
	.mg-compare .mg-table__actions .mg-btn { width: 100%; }
}

/* ---------- Quick links ---------- */
.mg-quicklinks { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.mg-quicklinks a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--mg-line); border-radius: 999px; background: var(--mg-white); color: var(--mg-navy); font-weight: 600; font-size: 15px; text-decoration: none; }
.mg-quicklinks a:hover { border-color: var(--mg-teal); color: var(--mg-teal-ink); }

/* ---------- Tools ---------- */
.mg-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mg-tools { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .mg-tools { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.mg-tool { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; height: 100%; padding: 20px; border-radius: var(--mg-radius); text-decoration: none; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); color: #D5E6EC; transition: background-color .15s ease, border-color .15s ease; }
.mg-tool:hover { background: rgba(255, 255, 255, .11); border-color: var(--mg-aqua); color: #D5E6EC; }
.mg-tool__icon { grid-row: span 2; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: rgba(70, 198, 197, .16); color: var(--mg-aqua); }
.mg-tool__name { font: 600 18px/1.25 var(--mg-serif); color: var(--mg-white); }
.mg-tool__desc { font-size: 14.5px; line-height: 1.5; }
.mg-tools--light .mg-tool { background: var(--mg-white); border-color: var(--mg-line); color: var(--mg-muted); }
.mg-tools--light .mg-tool:hover { border-color: var(--mg-teal); box-shadow: var(--mg-shadow); color: var(--mg-muted); }
.mg-tools--light .mg-tool__icon { background: #E3F2F3; color: var(--mg-teal-ink); }
.mg-tools--light .mg-tool__name { color: var(--mg-navy); }
.mg-toolgroup { margin-bottom: 44px; }
.mg-toolgroup h2 { font-size: 26px; margin-bottom: 4px; }
.mg-toolgroup__intro { color: var(--mg-muted); margin-bottom: 18px; }

/* ---------- Principles / newsletter / callout ---------- */
.mg-principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
@media (min-width: 860px) { .mg-principles { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.mg-principles h3 { font-size: 20px; margin-bottom: 8px; }
.mg-principles p { font-size: 15.5px; margin-bottom: 8px; }
.mg-newsletter { padding: 32px; background: var(--mg-bg); border: 1px solid var(--mg-line); border-radius: var(--mg-radius); }
.mg-newsletter h2 { font-size: 26px; }
.mg-callout { margin: 40px 0 0; padding: 24px 28px; background: #EEF6F7; border: 1px solid #CFE4E7; border-radius: var(--mg-radius); }
.mg-callout h2 { font-size: 22px; margin-bottom: 8px; }
.mg-callout p:last-child { margin-bottom: 0; }
.mg-callout--inline { margin: 0 0 28px; padding: 16px 20px; }

/* ---------- Breadcrumbs ---------- */
.mg-breadcrumbs { margin: 0 0 18px; font-size: 14px; }
.mg-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; }
.mg-breadcrumbs li { display: inline-flex; align-items: center; color: var(--mg-muted); }
.mg-breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: #9FB2BC; }
.mg-breadcrumbs a { color: var(--mg-muted); text-decoration: none; padding: 4px 0; }
.mg-breadcrumbs a:hover { color: var(--mg-teal-ink); text-decoration: underline; }
.mg-breadcrumbs [aria-current] { color: var(--mg-ink); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Archives ---------- */
.mg-archive__head { background: var(--mg-white); border-bottom: 1px solid var(--mg-line); padding: 32px 0 30px; }
.mg-kicker--static { margin-bottom: 8px; }
.mg-archive__title { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.12; margin: 0 0 12px; }
.mg-archive__page { font-family: var(--mg-sans); font-size: .5em; font-weight: 500; color: var(--mg-muted); white-space: nowrap; }
.mg-archive__intro { max-width: 720px; font-size: 18px; line-height: 1.55; color: var(--mg-ink); margin: 0; }
.mg-archive__body { padding-top: 36px; padding-bottom: 64px; }
.mg-archive__lead { margin-bottom: 28px; }
.mg-archive__foot { padding-bottom: 48px; margin-top: -32px; }
.mg-empty { font-size: 17px; margin: 0 0 24px; }
.mg-empty--actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.mg-topicnav { background: var(--mg-white); border-bottom: 1px solid var(--mg-line); }
.mg-topicnav ul { list-style: none; margin: 0; padding: 10px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.mg-topicnav ul::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .mg-topicnav ul { flex-wrap: wrap; overflow: visible; } }
.mg-topicnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--mg-line); border-radius: 999px; white-space: nowrap; text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--mg-ink); background: var(--mg-white); }
.mg-topicnav a:hover { border-color: var(--mg-teal); color: var(--mg-teal-ink); }
.mg-topicnav a[aria-current="page"] { background: var(--mg-navy); border-color: var(--mg-navy); color: var(--mg-white); }

.mg-pagination { margin-top: 44px; }
.mg-pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mg-pagination a, .mg-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--mg-line); border-radius: 10px; background: var(--mg-white); color: var(--mg-ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.mg-pagination a:hover { border-color: var(--mg-teal); color: var(--mg-teal-ink); }
.mg-pagination .current { background: var(--mg-navy); border-color: var(--mg-navy); color: var(--mg-white); }
.mg-pagination .dots { border-color: transparent; background: transparent; }

.mg-topiclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .mg-topiclist { grid-template-columns: repeat(2, 1fr); } }
.mg-topiclist a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); background: var(--mg-white); text-decoration: none; color: var(--mg-muted); font-size: 15px; }
.mg-topiclist strong { display: block; font: 600 18px/1.3 var(--mg-serif); color: var(--mg-navy); margin-bottom: 2px; }
.mg-topiclist a:hover { border-color: var(--mg-teal); }
.mg-topiclist a:hover strong { color: var(--mg-teal-ink); text-decoration: underline; }

.mg-search__form--page { padding: 20px 0 0; max-width: 620px; margin: 0; }
.mg-search__form--page input[type="search"] { border-color: var(--mg-line); }

/* ---------- Article ---------- */
.mg-article__head { background: var(--mg-white); padding: 32px 0 26px; }
.mg-article__title { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12; max-width: 22em; margin: 0 0 16px; }
.mg-article__standfirst { max-width: 44em; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--mg-ink); margin: 0 0 18px; }
.mg-article__meta { font-size: 14.5px; }
.mg-article__figure { margin: 0 auto; background: var(--mg-white); }
.mg-article__figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 620px; object-fit: cover; border-radius: var(--mg-radius); }
.mg-article__figure figcaption { padding: 8px 2px 0; font-size: 13.5px; line-height: 1.45; color: var(--mg-muted); }
.mg-article__figure figcaption a { color: var(--mg-muted); }
.mg-article { background: var(--mg-white); }
.mg-article__layout { display: grid; gap: 40px; padding-top: 32px; padding-bottom: 56px; }
.mg-article__main { min-width: 0; max-width: 720px; }
.mg-article__side { display: none; }
@media (min-width: 1080px) {
	.mg-article__layout { grid-template-columns: minmax(0, 720px) 300px; justify-content: space-between; }
	.mg-article__side { display: block; }
	.mg-article__side > * + * { margin-top: 20px; }
	.mg-article__side .mg-toc { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
	.mg-toc--inline { display: none; }
}
.mg-article__tags { font-size: 14.5px; color: var(--mg-muted); margin-top: 28px; }

.mg-toc { padding: 18px 20px; background: var(--mg-bg); border: 1px solid var(--mg-line); border-radius: var(--mg-radius); font-size: 15px; }
.mg-toc--inline { margin: 0 0 28px; }
.mg-toc summary, .mg-toc__title { margin: 0; font: 600 13px/1.3 var(--mg-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--mg-navy); cursor: default; }
.mg-toc summary { cursor: pointer; padding: 4px 0; }
.mg-toc ol { list-style: none; margin: 12px 0 0; padding: 0; }
.mg-toc li { margin: 0; }
.mg-toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--mg-line); color: var(--mg-ink); text-decoration: none; line-height: 1.4; }
.mg-toc a:hover { color: var(--mg-teal-ink); border-left-color: var(--mg-teal); }
.mg-toc a.toc-active { color: var(--mg-teal-ink); border-left-color: var(--mg-teal); font-weight: 600; }
.mg-toc__l3 a { padding-left: 26px; font-size: 14.5px; color: var(--mg-muted); }

.mg-sidecard { padding: 20px; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); background: var(--mg-white); font-size: 15px; }
.mg-sidecard__title { font: 600 18px/1.3 var(--mg-serif); color: var(--mg-navy); margin: 0 0 6px; }

/* Prose */
.mg-prose { font-size: 18px; line-height: 1.72; color: var(--mg-ink); overflow-wrap: break-word; }
.mg-prose > *:first-child { margin-top: 0; }
.mg-prose p, .mg-prose ul, .mg-prose ol, .mg-prose table, .mg-prose figure, .mg-prose blockquote { margin: 0 0 1.25em; }
.mg-prose h2 { font-size: clamp(25px, 2.6vw, 30px); margin: 1.9em 0 .55em; scroll-margin-top: 24px; }
.mg-prose h3 { font-size: clamp(21px, 2.1vw, 24px); margin: 1.6em 0 .5em; scroll-margin-top: 24px; }
.mg-prose h4 { font: 600 18px/1.35 var(--mg-sans); margin: 1.4em 0 .4em; color: var(--mg-navy); }
.mg-prose ul, .mg-prose ol { padding-left: 1.3em; }
.mg-prose li { margin-bottom: .45em; }
.mg-prose li::marker { color: var(--mg-teal-ink); }
.mg-prose a { text-decoration: underline; text-decoration-thickness: 1px; }
.mg-prose img { border-radius: 10px; }
.mg-prose figcaption { font-size: 14px; color: var(--mg-muted); margin-top: 8px; }
.mg-prose blockquote { padding: 4px 0 4px 20px; border-left: 3px solid var(--mg-teal); color: var(--mg-navy); font-size: 1.05em; }
.mg-prose code { font-size: .88em; background: #EEF3F4; padding: 2px 6px; border-radius: 5px; }
.mg-prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.mg-prose th, .mg-prose td { padding: 10px 12px; border: 1px solid var(--mg-line); text-align: left; vertical-align: top; }
.mg-prose thead th { background: var(--mg-bg); color: var(--mg-navy); font-weight: 600; }
.mg-prose .mg-table { display: table; }
.mg-prose hr { border: 0; border-top: 1px solid var(--mg-line); margin: 2em 0; }
.mg-prose details { margin: 0 0 12px; padding: 14px 18px; border: 1px solid var(--mg-line); border-radius: 10px; background: var(--mg-bg); }
.mg-prose summary { cursor: pointer; font-weight: 600; color: var(--mg-navy); }

/* Buy box */
.mg-buybox { display: grid; gap: 16px; margin: 32px 0; padding: 24px; border: 1px solid #F0D9A8; border-left: 5px solid var(--mg-amber); border-radius: var(--mg-radius); background: #FFFBF2; }
.mg-buybox p { margin: 0; }
.mg-buybox__label { font: 600 12.5px/1.3 var(--mg-sans); letter-spacing: .07em; text-transform: uppercase; color: #7A5300; margin-bottom: 4px !important; }
.mg-buybox__name { font: 600 22px/1.25 var(--mg-serif); color: var(--mg-navy); }
.mg-buybox__note { margin-top: 8px !important; font-size: 15px; line-height: 1.5; color: var(--mg-ink); }
.mg-buybox__aff { margin-top: 8px !important; font-size: 13px; line-height: 1.4; color: var(--mg-muted); }
.mg-buybox--compact { margin: 0 0 28px; padding: 16px 20px; }
.mg-buybox--compact .mg-buybox__name { font-size: 19px; }
@media (min-width: 700px) { .mg-buybox { grid-template-columns: 1fr auto; align-items: center; } .mg-buybox__cta { text-align: right; max-width: 280px; } }
@media (max-width: 699px) { .mg-buybox .mg-btn { width: 100%; } }

/* Product card + shortcode layouts */
.mg-product { margin: 32px 0; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); background: var(--mg-white); overflow: hidden; box-shadow: var(--mg-shadow); }
.mg-product__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; }
.mg-product__body { padding: 24px; font-size: 16.5px; }
.mg-product__tag { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; background: #E3F2F3; color: var(--mg-teal-ink); font-size: 13.5px; font-weight: 600; }
.mg-product__name { font-size: 24px; margin: 0 0 12px; }
.mg-product__body h4 { font: 600 14px/1.3 var(--mg-sans); letter-spacing: .05em; text-transform: uppercase; color: var(--mg-navy); margin: 18px 0 8px; }
.mg-product__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--mg-line); }
.mg-product__aff, .mg-tiers__aff { font-size: 13px; color: var(--mg-muted); }
.mg-proscons { display: grid; gap: 16px; margin: 20px 0; }
@media (min-width: 640px) { .mg-proscons { grid-template-columns: 1fr 1fr; } }
.mg-proscons__col { padding: 16px 18px; border-radius: 10px; border: 1px solid var(--mg-line); background: var(--mg-bg); }
.mg-proscons__col h4 { margin: 0 0 8px !important; font: 600 14px/1.3 var(--mg-sans); letter-spacing: .05em; text-transform: uppercase; }
.mg-proscons__col--pros { border-top: 3px solid #1F8A5B; }
.mg-proscons__col--pros h4 { color: #17694A; }
.mg-proscons__col--cons { border-top: 3px solid #B4532A; }
.mg-proscons__col--cons h4 { color: #94411F; }
.mg-proscons ul { margin: 0; padding-left: 1.2em; font-size: 16px; }
.mg-bestfor, .mg-checklist { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); background: var(--mg-bg); }
.mg-bestfor__title, .mg-checklist__title { font-size: 21px; margin: 0 0 12px; }
.mg-bestfor dl { margin: 0; display: grid; gap: 10px; }
.mg-bestfor dt { font-weight: 600; color: var(--mg-navy); }
.mg-bestfor dd { margin: 0; }
.mg-checklist ul { list-style: none; margin: 0; padding: 0; }
.mg-checklist li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.mg-checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border: 2px solid var(--mg-teal); border-radius: 4px; }
.mg-tiers { display: grid; gap: 16px; margin: 28px 0 8px; }
@media (min-width: 760px) { .mg-tiers { grid-template-columns: repeat(3, 1fr); } }
.mg-tier { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); background: var(--mg-white); }
.mg-tier__label { margin: 0; font: 600 12.5px/1.3 var(--mg-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--mg-teal-ink); }
.mg-tier__name { margin: 0; font: 600 19px/1.3 var(--mg-serif); color: var(--mg-navy); }
.mg-tier__note { margin: 0 0 8px; font-size: 15px; }
.mg-tier .mg-btn { margin-top: auto; }

/* ---------- Pages ---------- */
.mg-page { background: var(--mg-white); }
.mg-page__body { padding-top: 36px; padding-bottom: 64px; }
.mg-path { list-style: none; margin: 0; padding: 0; }
.mg-path__step { display: grid; grid-template-columns: 44px 1fr; gap: 0 18px; padding-bottom: 32px; position: relative; }
.mg-path__step:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; width: 2px; background: var(--mg-line); }
.mg-path__num { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--mg-navy); color: var(--mg-white); font: 600 18px/1 var(--mg-serif); }
.mg-path__body h2 { font-size: 24px; margin: 6px 0 8px; }
.mg-path__links { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.mg-path__links li { padding: 12px 16px; border: 1px solid var(--mg-line); border-radius: 10px; background: var(--mg-bg); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.mg-path__links a { font-weight: 600; text-decoration: none; }
.mg-path__links a:hover { text-decoration: underline; }
.mg-path__type { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mg-muted); }

/* ---------- Parent-theme markup on light pages (contact, privacy, terms, glossary) ---------- */
.section { padding: 0; background: var(--mg-white); }
.section > .container { max-width: var(--mg-wrap); margin: 0 auto; padding: 32px 20px 64px; }
.section > .container.container-narrow { max-width: 800px; }
.breadcrumbs { margin: 0 0 18px; font-size: 14px; color: var(--mg-muted); display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs a { color: var(--mg-muted); }
.legal-hero, .tool-hero { margin: 0 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--mg-line); }
.legal-hero h1, .tool-hero h1 { font-size: clamp(30px, 4.4vw, 44px); margin: 0 0 12px; }
.legal-hero p, .tool-hero p { font-size: 18px; margin: 0; max-width: 680px; }
.eyebrow, .badge-pill { display: inline-block; margin: 0 0 8px; font: 600 12.5px/1.3 var(--mg-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--mg-teal-ink); }
.prose { font-size: 17.5px; line-height: 1.7; }
.prose h2 { font-size: 26px; margin: 1.7em 0 .5em; }
.prose h3 { font-size: 21px; margin: 1.4em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.glass-card { background: var(--mg-white); }
.legal-body.glass-card { padding: 0; }
.muted { color: var(--mg-muted); }
.small { font-size: 14px; }
.btn-primary, .btn-ghost {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
	border-radius: 999px; border: 1.5px solid transparent; font: 600 15px/1.2 var(--mg-sans); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--mg-teal); color: var(--mg-white); }
.btn-primary:hover { background: var(--mg-teal-ink); color: var(--mg-white); }
.btn-ghost { background: var(--mg-white); color: var(--mg-teal-ink); border-color: var(--mg-teal); }
.btn-ghost:hover { background: var(--mg-teal); color: var(--mg-white); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.aff-disclosure { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 20px; padding: 12px 16px; background: #EEF6F7; border: 1px solid #CFE4E7; border-radius: 10px; font-size: 14.5px; line-height: 1.5; }
.aff-disclosure svg { flex: none; margin-top: 3px; color: var(--mg-teal-ink); }
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.3fr 1fr; } }
.contact-grid .legal-body { padding: 24px; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); }
.contact-form { display: grid; gap: 16px; }
.contact-form .field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; color: var(--mg-navy); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea {
	width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid #B9CBD2; border-radius: 10px; background: var(--mg-white); color: var(--mg-ink); font: 400 16px/1.4 var(--mg-sans);
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.bullet-list { padding-left: 1.2em; }
.bullet-list li { margin-bottom: .6em; }
.glossary-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; }
.glossary-jump a { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; border: 1px solid var(--mg-line); border-radius: 8px; text-decoration: none; font-weight: 600; background: var(--mg-white); }
.glossary-jump a:hover { border-color: var(--mg-teal); }
.glossary-letter { font-size: 28px; margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--mg-teal); scroll-margin-top: 20px; }
.glossary-list { margin: 0; }
.glossary-row { padding: 14px 0; border-bottom: 1px solid var(--mg-line); scroll-margin-top: 20px; }
.glossary-row dt { font: 600 18px/1.3 var(--mg-serif); color: var(--mg-navy); margin-bottom: 4px; }
.glossary-row dd { margin: 0; }
.tool-recommend { padding: 24px !important; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); }
.tr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-amazon { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; background: var(--mg-amber); color: var(--mg-amber-ink); font: 600 15px/1.2 var(--mg-sans); text-decoration: none; }
.btn-amazon:hover { background: #E79A22; color: var(--mg-amber-ink); }
.author-card { display: flex; gap: 16px; margin: 36px 0 0; padding: 20px; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); background: var(--mg-bg); font-size: 15.5px; }
.author-avatar { border-radius: 50%; flex: none; }
.author-card h4 { margin: 0; font-size: 19px; }
.author-title { color: var(--mg-muted); font-size: 14px; }

/* ---------- Reading progress + consent banner (created by parent scripts) ---------- */
.reading-progress { position: fixed; left: 0; top: 0; z-index: 200; width: 100%; height: 3px; background: var(--mg-aqua); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
.swag-consent {
	position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 760px; margin: 0 auto;
	background: var(--mg-white); color: var(--mg-ink); border: 1px solid var(--mg-line); border-radius: var(--mg-radius);
	box-shadow: 0 20px 50px -16px rgba(9, 43, 64, .45); font-size: 14.5px; line-height: 1.5;
}
.sc-inner { display: grid; gap: 14px; padding: 18px 20px; }
@media (min-width: 720px) { .sc-inner { grid-template-columns: 1fr auto; align-items: center; } }
.sc-copy strong { display: block; color: var(--mg-navy); margin-bottom: 2px; }
.sc-link { margin-left: 6px; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.mg-card__media img, .mg-tile, .mg-tool { transition: none; }
	.mg-card:hover .mg-card__media img { transform: none; }
}
@media print {
	.mg-header, .mg-footer, .mg-article__side, .mg-related, .mg-topicnav, .swag-consent, .reading-progress, .mg-toc--inline { display: none !important; }
	body { background: #fff; font-size: 12pt; }
	.mg-prose a::after { content: " (" attr(href) ")"; font-size: 10pt; }
}
