/*
Theme Name: MicrowaveSafeGuide Editorial
Description: A lightweight editorial child theme for MicrowaveSafeGuide.
Template: generatepress
Version: 1.0.11
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: microsafe-editorial
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

body {
	--msg-paper: #f7f7f7;
	--msg-white: #fff;
	--msg-ink: #111;
	--msg-muted: #505050;
	--msg-line: #dedede;
	--msg-gold: #ffcd00;
	--msg-space: clamp(18px, 4vw, 52px);
	background: var(--msg-paper);
	color: var(--msg-ink);
}

body .grid-container { max-width: 1240px; }
body h1, body h2, body h3, body h4 {
	color: var(--msg-ink);
	line-height: 1.16;
	letter-spacing: -.025em;
}
body h1 { font-size: clamp(2.15rem, 4.8vw, 3.8rem); }
body h2 { font-size: clamp(1.55rem, 2.7vw, 2.25rem); }
body h3 { font-size: clamp(1.23rem, 2vw, 1.6rem); }
body :is(a, button, input, textarea, select):focus-visible {
	outline: 2px solid #8a6700;
	outline-offset: 3px;
}
body :is(.entry-content, .taxonomy-description, .comment-content) a:not(.wp-element-button) {
	text-decoration: underline;
	text-decoration-thickness: .075em;
	text-underline-offset: .17em;
}

body .site-header {
	border-top: 4px solid var(--msg-gold);
	border-bottom: 1px solid var(--msg-line);
}
body .inside-header { padding: 15px var(--msg-space); }
.site-header .site-logo img { width: clamp(145px, 19vw, 205px); height: auto; }
body .main-navigation .main-nav ul li a, body .main-navigation .menu-toggle {
	padding: 14px 12px;
	line-height: 1.35;
}
body .mobile-menu-control-wrapper .menu-toggle { color: var(--msg-white); }
body .main-navigation .main-nav ul.sub-menu > li > a { color: var(--msg-ink); }
body .main-navigation .main-nav ul.sub-menu > li:is(:hover, :focus-within, .sfHover, .current-menu-item, .current-menu-ancestor, .current-menu-parent) > a {
	background: #fff4c2;
	color: var(--msg-ink);
}
body .main-navigation .main-nav ul ul {
	border: 1px solid var(--msg-line);
	box-shadow: 0 10px 24px #00000014;
}
body .main-navigation .dropdown-menu-toggle { padding-right: 0; }

body #page { background: transparent; }
body #content { padding: clamp(18px, 4vw, 46px) var(--msg-space); }
body .site-main, body .sidebar .inside-right-sidebar, body .sidebar .inside-left-sidebar { margin-top: 0; margin-bottom: 0; }
body #primary, body .sidebar { min-width: 0; }
body .site-main :is(.inside-article, .page-header, .comments-area), body .sidebar .widget {
	border: 1px solid var(--msg-line);
	border-radius: 14px;
	padding: clamp(18px, 3.5vw, 42px);
}
body .site-main > :is(article, .page-header) + article { margin-top: 16px; }
body .sidebar .widget { padding: 20px; margin-bottom: 16px; }
body .sidebar .widget-title { margin-bottom: 12px; }
body .sidebar .widget li + li {
	border-top: 1px solid currentColor;
	border-top-color: color-mix(in srgb, currentColor 24%, transparent);
	padding-top: 8px;
}
body .sidebar .widget :is(.widget-title, .wp-block-heading) {
	margin-bottom: 10px;
	font-size: clamp(1.15rem, 2vw, 1.35rem);
}
body .sidebar .wp-block-search__label {
	display: block;
	margin-bottom: 7px;
	font-weight: 700;
}
body .sidebar .wp-block-search__inside-wrapper { gap: 8px; }
body .sidebar .wp-block-search :is(.wp-block-search__input, .wp-block-search__button),
body .sidebar .search-form :is(input[type="search"], button[type="submit"]) {
	min-height: 44px;
	border-radius: 8px;
}
body .sidebar :is(.wp-block-search__input, .search-form input[type="search"]) { min-width: 0; }
body .sidebar .wp-block-search .wp-block-search__button {
	margin-inline: 0;
	padding: 8px 12px;
}
body .sidebar :is(.wp-block-search .wp-block-search__button, .search-form button[type="submit"]) {
	background: var(--msg-gold);
	color: var(--msg-ink);
	border: 1px solid transparent;
}
body .sidebar :is(.wp-block-search .wp-block-search__button, .search-form button[type="submit"]):is(:hover, :focus-visible) {
	background: #fff4c2;
	color: var(--msg-ink);
}
body .entry-content, body .entry-summary { overflow-wrap: anywhere; }
body.single-post .entry-header, body.single-post .entry-content {
	max-width: 70ch;
	margin-inline: auto;
}
body.single-post .entry-title { font-size: clamp(2rem, 4.2vw, 3.4rem); }
body.single-post .entry-content { font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.75; }
body.single-post .entry-content :is(h2, h3) { margin-top: 1.55em; }
/* Give lead and in-article images breathing room before the text that follows.
 * Covers classic editor images and Gutenberg image blocks without changing cards. */
body:is(.single-post, .page:not(.home)) .entry-content > :is(img, figure, .wp-block-image, .wp-caption) {
	display: block;
	margin-block-end: clamp(26px, 3.2vw, 36px);
}
body:is(.single-post, .page:not(.home)) .entry-content > p:has(> img:only-child) {
	margin-block-end: clamp(26px, 3.2vw, 36px);
}
body .post-image img, body .featured-image img { border-radius: 10px; }
body .entry-content blockquote {
	background: #fff8dc;
	border-inline-start: 3px solid var(--msg-gold);
	color: var(--msg-ink);
}
body :is(.entry-content, .comment-content) .wp-block-table { overflow-x: auto; }
body:is(.blog, .archive, .search) .entry-title { font-size: clamp(1.6rem, 3vw, 2.45rem); }

body.home.page.no-sidebar #primary { width: 100%; }
body.home.page #main > article > .inside-article {
	padding: 0;
	background: transparent;
	border: 0;
}
body.home.page #main > article > .inside-article > .entry-content { margin-top: 0; }
.msg-home-hero {
	display: grid;
	gap: clamp(16px, 4vw, 50px);
	margin-bottom: clamp(28px, 5vw, 56px);
	padding: clamp(26px, 5vw, 60px) var(--msg-space);
	border-radius: 16px;
	background: var(--msg-ink);
	color: var(--msg-white);
}
body .msg-home-hero h1 {
	margin: 0 0 16px;
	color: inherit;
	font-size: clamp(2rem, 5vw, 4rem);
}
.msg-home-hero p {
	max-width: 72ch;
	margin: 0;
	color: #f0f0f0;
	font-size: clamp(1rem, 1.5vw, 1.15rem);
}
body .msg-home-hero p a { color: var(--msg-gold); }
.msg-hero-art { display: none; }
@media (min-width: 840px) {
	.msg-home-hero-has-image { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
	.msg-hero-art {
		display: block;
		aspect-ratio: 360 / 245;
		background: var(--msg-hero-image, url("assets/microwave-diagram.svg")) center / contain no-repeat;
	}
	.msg-hero-art-top { align-self: start; }
	.msg-hero-art-center { align-self: center; }
	.msg-hero-art-bottom { align-self: end; }
}
.msg-topic-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.msg-topic-grid > li { display: flex; }
.msg-topic-grid a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 56px;
	padding: 10px 15px;
	border: 1px solid var(--msg-line);
	border-radius: 8px;
	background: var(--msg-white);
	font-size: .92rem;
	font-weight: 700;
	text-decoration: none;
}
.msg-topic-grid a::after {
	content: "";
	flex: 0 0 7px;
	height: 7px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
}
.msg-topic-grid a:hover { background: #fff4c2; border-color: #b08a00; }
body.home.page #main .entry-content > h2 + .wp-block-separator {
	border: 0;
	height: 2px;
	width: 52px;
	margin: 0 0 16px !important; /* The existing block sets margins inline. */
}
body.home.page #main .wp-block-query .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
	gap: 12px;
	margin: 0;
}
body.home.page #main .wp-block-query .wp-block-post {
	margin: 0;
	padding: 16px;
	background: var(--msg-white);
	border: 1px solid var(--msg-line);
	border-radius: 10px;
}
body.home.page #main .wp-block-post > .wp-block-columns {
	display: block;
	padding: 0 !important; /* The current query template sets inline padding. */
	background: transparent !important; /* Override the query block’s palette class. */
}
body.home.page #main .wp-block-post .wp-block-post-featured-image { margin-bottom: 12px; }
body.home.page #main .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 7px !important; /* Matches the card even when the image block sets a radius. */
}
body.home.page #main .wp-block-post-title { margin: 0; font-size: 1.23rem; }
body.home.page #main .wp-block-post-title a { color: var(--msg-ink); text-decoration: none; }
body.home.page #main .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: #8a6700; }

body .site-info {
	border-top: 3px solid var(--msg-gold);
	font-size: .875rem;
	line-height: 1.5;
}
body .inside-site-info { padding: 22px var(--msg-space); }
body .site-header :focus-visible, body .site-info a:focus-visible { outline-color: var(--msg-gold); }
.msg-footer-nav { margin-bottom: 10px; }
.msg-footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.msg-footer-nav a { text-decoration: none; }
.msg-footer-nav a:hover, .msg-footer-nav a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

.msg-ad {
	box-sizing: border-box;
	margin-block: 20px;
	padding: 8px 0;
	max-width: 100%;
	border-block: 1px solid var(--msg-line);
	text-align: center;
}
.msg-ad-label {
	margin-bottom: 7px;
	color: var(--msg-muted);
	font-size: .69rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.msg-ad-widget { min-height: 90px; }
.msg-article-rail { margin-top: 0; }
.msg-article-rail .msg-ad-widget { min-height: 250px; }

@media (max-width: 768px) {
	body #content { padding-inline: 14px; }
	body .sidebar { margin-top: 16px; }
	body .inside-header, body .inside-site-info { padding-inline: 16px; }
	body .main-navigation .main-nav ul li a, body .main-navigation .menu-toggle { min-height: 44px; }
	.msg-footer-nav ul { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	body .site-header *, body .site-main *, body .site-footer * { scroll-behavior: auto; }
}

body #main :is(.wp-block-query-pagination, .paging-navigation .nav-links, .wp-block-query-pagination-numbers, .comment-navigation .nav-links) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
body #main :is(.wp-block-query-pagination, .paging-navigation, .comment-navigation) { margin: 24px 0 0; }
body #main :is(.wp-block-query-pagination, .wp-block-query-pagination-numbers) > * { margin: 0; }
body #main :is(.wp-block-query-pagination, .paging-navigation .nav-links, .comment-navigation .nav-links) :is(a, .current) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 5px 10px;
	border: 1px solid var(--msg-line);
	border-radius: 8px;
	background: var(--msg-white);
	color: var(--msg-ink);
	text-decoration: none;
}
body #main :is(.wp-block-query-pagination, .paging-navigation .nav-links, .comment-navigation .nav-links) :is(a:hover, .current) {
	background: var(--msg-gold);
	border-color: var(--msg-gold);
}
body #main .paging-navigation > :is(.nav-next, .nav-previous) { display: none; }

body.single-post .entry-header .entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	line-height: 1.4;
}
body.single-post .entry-header .entry-meta > .byline {
	display: flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
}
body.single-post .entry-header .msg-author-avatar {
	display: block;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	margin-inline-end: 3px;
	border-radius: 50%;
	object-fit: cover;
}
body.single-post .entry-header .msg-author-badge {
	display: inline-flex;
	flex: none;
	color: var(--msg-gold);
}
.msg-author-badge svg { display: block; }
body.single-post .entry-header .entry-meta > .posted-on {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	column-gap: .7em;
	row-gap: .15em;
}
body.single-post .entry-header .posted-on time.entry-date { order: -1; }
body.single-post .entry-header .posted-on time.entry-date::before { content: "Published "; }
body.single-post .entry-header .posted-on time.updated::before { content: "Updated "; }
body.single-post .entry-content #rank-math-toc {
	padding: clamp(16px, 2.5vw, 24px);
	margin: 24px 0 30px;
	border: 1px solid var(--msg-line);
	border-radius: 12px;
	background: #fafafa;
}
body.single-post .entry-content #rank-math-toc > h2 {
	margin: 0 0 12px;
	font-size: 1.12rem;
	line-height: 1.4;
}
body.single-post .entry-content #rank-math-toc ul {
	margin: 0;
	padding-inline-start: 1.3em;
}
body.single-post .entry-content #rank-math-toc li + li { margin-top: .35em; }
body.single-post .entry-content #rank-math-toc a {
	color: var(--msg-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
body.single-post .entry-content h2[id] { scroll-margin-top: 28px; }
body.single-post .entry-header .byline + .posted-on {
	padding-inline-start: 12px;
	border-inline-start: 1px solid var(--msg-line);
}

@media (max-width: 380px) {
	body.single-post .entry-header .entry-meta { column-gap: 8px; font-size: .8rem; }
	body.single-post .entry-header .entry-meta > .byline { gap: 4px; }
	body.single-post .entry-header .byline + .posted-on { padding-inline-start: 8px; }
}

body.single-post .inside-article .post-navigation,
.msg-related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
	gap: 12px;
}
body.single-post .inside-article .post-navigation {
	margin-top: 20px;
}
body.single-post .inside-article .post-navigation > div {
	padding: 12px;
	border: 1px solid var(--msg-line);
	border-radius: 8px;
	background: var(--msg-white);
}
.msg-article-direction {
	display: block;
	margin-bottom: .25em;
	color: var(--msg-muted);
	font-size: .85rem;
	font-weight: 700;
}

.msg-related-guides {
	margin-top: 28px;
	padding-top: 22px;
	border-top: 2px solid var(--msg-gold);
}
.msg-related-guides h2 {
	margin-bottom: 14px;
	font-size: clamp(1.3rem, 2.2vw, 1.65rem);
}
.msg-related-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}
.msg-related-grid li {
	min-width: 0;
	border: 1px solid var(--msg-line);
	border-radius: 8px;
	background: var(--msg-white);
}
.msg-related-grid a {
	display: block;
	height: 100%;
	color: var(--msg-ink);
	font-weight: 700;
	text-decoration: none;
}
.msg-related-grid a:hover span {
	text-decoration: underline;
	text-decoration-color: #8a6700;
}
.msg-related-grid img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 7px 7px 0 0;
	object-fit: cover;
}
.msg-related-grid span {
	display: block;
	padding: 10px 12px;
	overflow-wrap: anywhere;
}

.msg-topic-directory {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
	gap: clamp(20px, 4vw, 48px);
	margin-bottom: clamp(30px, 5vw, 54px);
	padding: clamp(20px, 3.5vw, 38px);
	border: 1px solid var(--msg-line);
	border-radius: 14px;
	background: var(--msg-white);
}
.msg-topic-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--msg-ink);
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
}
.msg-topic-kicker::before {
	content: "";
	width: 18px;
	height: 3px;
	background: var(--msg-gold);
}
.msg-topic-intro h2 { margin: 9px 0; }
.msg-topic-intro p {
	max-width: 30ch;
	margin: 0;
	color: var(--msg-muted);
	font-size: .95rem;
}
.msg-topic-index {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(12px, 3vw, 30px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.msg-topic-index li {
	display: flex;
	min-width: 0;
	border-bottom: 1px solid var(--msg-line);
}
body .entry-content .msg-topic-index a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 48px;
	padding: 8px 6px;
	color: var(--msg-ink);
	font-size: .94rem;
	font-weight: 700;
	overflow-wrap: anywhere;
	text-decoration: none;
}
.msg-topic-index a::after {
	content: "›";
	flex: none;
	font-size: 1.3em;
	line-height: 1;
}
body .entry-content .msg-topic-index a:hover { background: #fff4c2; }
.msg-more-topics { margin-top: 8px; }
.msg-more-topics summary {
	width: fit-content;
	min-height: 44px;
	padding: 10px 6px;
	font-weight: 700;
	cursor: pointer;
}
.msg-more-topics summary:hover { text-decoration: underline; }
.msg-more-topics summary:focus-visible { outline: 2px solid #8a6700; }
.msg-more-topics[open] .msg-topic-index { margin-top: 4px; }

@media (max-width: 880px) {
	.msg-topic-directory { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
	.msg-topic-index { grid-template-columns: minmax(0, 1fr); }
}

body.category .site-main > .page-header {
	margin: 0 0 22px;
	padding: clamp(20px, 4vw, 36px);
	background: var(--msg-white);
}
body.category .page-header .page-title {
	margin-bottom: 0;
	font-size: clamp(2rem, 4vw, 3rem);
}
body.category .taxonomy-description {
	max-width: 65ch;
	margin-top: 10px;
}
body.category .taxonomy-description > :last-child { margin-bottom: 0; }
.msg-category-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: .4em .65em;
	margin-bottom: 12px;
	color: var(--msg-muted);
	font-size: .9rem;
}
.msg-category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
.msg-category-card {
	min-width: 0;
	border: 1px solid var(--msg-line);
	border-radius: 12px;
	background: var(--msg-white);
}
.msg-category-card-link {
	display: block;
	border-radius: 12px 12px 0 0;
	color: var(--msg-ink);
	text-decoration: none;
}
.msg-category-card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 11px 11px 0 0;
	object-fit: cover;
}
.msg-category-card h2 {
	margin: 0;
	padding: 16px 18px 8px;
	font-size: clamp(1.2rem, 2vw, 1.55rem);
	overflow-wrap: anywhere;
}
.msg-category-card-link:hover h2 {
	text-decoration: underline;
	text-decoration-color: #8a6700;
}
.msg-category-card p {
	margin: 0;
	padding: 0 18px 18px;
	color: var(--msg-muted);
	overflow-wrap: anywhere;
}
.msg-category-topics {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 2px solid var(--msg-gold);
}
body.category .site-main > .paging-navigation { margin-top: 20px; }
body .sidebar .widget :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
@media (max-width: 850px) {
	.msg-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
	.msg-topic-grid, .msg-category-grid, .msg-related-grid { grid-template-columns: minmax(0, 1fr); }
}
body .entry-content .msg-topic-directory .msg-topic-index a { text-decoration: none; }
