/*
Theme Name: Mozhi
Theme URI: https://example.com/mozhi
Author: Mozhi
Description: A bold, colourful news and magazine theme for young Malayalam readers. Sticker-style headings, colour-coded categories, big friendly cards, a dark-mode switch, and carefully reserved, clearly labelled ad slots that never sit in front of the story.
Version: 2.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mozhi
Tags: blog, news, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready, dark-mode
*/

/* ==========================================================================
   1. Tokens
   Look: a cool light-grey page, white cards with 2px ink outlines and hard offset
   shadows, five story colours, one sticker-style wordmark. Malayalam notes: no
   letter-spacing, no uppercase, no justified text; line-heights stay generous
   because the script has tall ascenders and deep descenders.
   ========================================================================== */
:root {
	color-scheme: light;
	--bg: #f1f2f6;
	--surface: #ffffff;
	--ink: #0e1013;
	--soft: #2f333c;
	--muted: #555a66;
	--line: #d9dbe3;
	--bd: #0e1013;
	--hot: #d62810;
	--mark: #ffd60a;
	--on-tone: #0e1013;
	--t1: #ffd60a;
	--t2: #5be3a4;
	--t3: #ff8f7e;
	--t4: #7cc6ff;
	--t5: #c8a8ff;
	--shadow: 5px 5px 0 var(--bd);
	--shadow-sm: 3px 3px 0 var(--bd);
	--display: "Anek Malayalam", "Noto Sans Malayalam", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--text: "Noto Sans Malayalam", "Anek Malayalam", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--measure: 700px;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--bg: #0b0c0f;
		--surface: #15171c;
		--ink: #f3f3ef;
		--soft: #d3d6de;
		--muted: #a4a9b5;
		--line: #2a2d35;
		--bd: #e4e5ea;
		--hot: #ff7a66;
		--mark: #5c4b00;
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0b0c0f;
	--surface: #15171c;
	--ink: #f3f3ef;
	--soft: #d3d6de;
	--muted: #a4a9b5;
	--line: #2a2d35;
	--bd: #e4e5ea;
	--hot: #ff7a66;
	--mark: #5c4b00;
}

.mz-tone-1 { --tone: var(--t1); }
.mz-tone-2 { --tone: var(--t2); }
.mz-tone-3 { --tone: var(--t3); }
.mz-tone-4 { --tone: var(--t4); }
.mz-tone-5 { --tone: var(--t5); }

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 1.0625rem/1.8 var(--text);
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 { font-family: var(--display); font-weight: 800; line-height: 1.5; margin: 0; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; border-radius: 4px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal;
}
.screen-reader-text:focus {
	background: var(--surface); clip: auto; clip-path: none; color: var(--ink);
	display: block; font: 700 1rem var(--display); height: auto; left: 1rem; top: 1rem;
	padding: .8rem 1rem; width: auto; z-index: 100000; border: 2px solid var(--bd); border-radius: 12px;
}

.mz-wrap { width: min(100% - 2rem, 1200px); margin-inline: auto; }
.mz-main { padding-block: 1.6rem 1rem; }

/* ==========================================================================
   3. Header
   ========================================================================== */
.mz-progress { position: fixed; inset: 0 0 auto 0; height: 5px; z-index: 60; pointer-events: none; }
.mz-progress span { display: block; height: 100%; width: 0; background: var(--hot); border-right: 2px solid var(--bd); }
.admin-bar .mz-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .mz-progress { top: 46px; } }

.mz-header { background: var(--surface); border-bottom: 2px solid var(--bd); }

.mz-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem .7rem; }
.mz-brand { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.mz-brand__name { margin: 0; font-size: 1rem; line-height: 1; }
.mz-brand__name a {
	display: inline-block; background: var(--t1); color: var(--on-tone);
	border: 2px solid var(--bd); border-radius: 14px; padding: .1em .6em;
	font: 800 clamp(1.4rem, 4.6vw, 2.1rem)/1.55 var(--display);
	box-shadow: var(--shadow-sm); transform: rotate(-1.5deg); transition: transform .15s;
}
.mz-brand__name a:hover { transform: rotate(0) translate(-1px, -1px); }
.mz-brand .custom-logo { max-height: 56px; width: auto; }
.mz-date { display: none; font: 500 .85rem/1.4 var(--text); color: var(--muted); }
@media (min-width: 760px) { .mz-date { display: block; } }

.mz-tools { display: flex; gap: .5rem; flex: none; }
.mz-tool {
	width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
	border: 2px solid var(--bd); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
}
.mz-tool:hover { background: var(--t1); color: var(--on-tone); }

.mz-ico-sun { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .mz-ico-moon { display: none; }
	:root:not([data-theme="light"]) .mz-ico-sun { display: block; }
}
:root[data-theme="dark"] .mz-ico-moon { display: none; }
:root[data-theme="dark"] .mz-ico-sun { display: block; }

/* Category chips: scroll sideways on a phone, no hamburger needed. */
.mz-nav { padding-bottom: .9rem; }
.mz-nav .mz-wrap { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mz-nav .mz-wrap::-webkit-scrollbar { display: none; }
.mz-menu { list-style: none; margin: 0; padding: 2px; display: flex; gap: .5rem; white-space: nowrap; }
.mz-menu a {
	display: block; padding: .25rem .95rem; background: var(--surface);
	border: 2px solid var(--bd); border-radius: 999px; font: 700 .95rem/1.65 var(--display);
}
.mz-menu a:hover { background: var(--t1); color: var(--on-tone); }
.mz-menu .current-menu-item > a, .mz-menu .current-cat > a { background: var(--ink); color: var(--surface); }

.mz-searchbar { display: none; border-top: 2px solid var(--bd); background: var(--t1); }
.mz-searchbar.is-open, .no-js .mz-searchbar { display: block; }

.mz-search { display: flex; gap: .6rem; padding: 1rem 0; width: min(100% - 2rem, 700px); margin-inline: auto; }
.mz-search input[type="search"] {
	flex: 1; min-width: 0; font: 500 1.05rem/1.6 var(--text); color: var(--ink);
	background: var(--surface); border: 2px solid var(--bd); border-radius: 999px; padding: .55rem 1.2rem;
}
.mz-search button {
	font: 700 1rem/1.4 var(--display); color: var(--surface); background: var(--ink);
	border: 2px solid var(--bd); border-radius: 999px; padding: .55rem 1.4rem; cursor: pointer;
}
.mz-search button:hover { background: var(--hot); border-color: var(--bd); color: #fff; }

/* ==========================================================================
   4. Shared story pieces
   ========================================================================== */
.mz-chip {
	position: relative; z-index: 2; display: inline-block; margin-bottom: .55rem;
	background: var(--tone, var(--t1)); color: var(--on-tone);
	border: 2px solid var(--bd); border-radius: 999px; padding: 0 .8em;
	font: 700 .8rem/1.8 var(--display);
}
.mz-chip:hover { box-shadow: 2px 2px 0 var(--bd); }

.mz-meta { font: 500 .85rem/1.6 var(--text); color: var(--muted); }
.mz-meta a { position: relative; z-index: 2; }
.mz-meta a:hover { color: var(--hot); text-decoration: underline; }
.mz-meta .sep::before { content: "•"; margin: 0 .55em; opacity: .55; }

.mz-dek {
	font-size: 1rem; line-height: 1.75; color: var(--soft); margin: .2rem 0 .7rem;
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}

.mz-media { display: block; position: relative; overflow: hidden; background: var(--line); aspect-ratio: 16 / 10; }
.mz-media img { width: 100%; height: 100%; object-fit: cover; }
.mz-ph { display: grid; place-items: center; background: var(--tone, var(--t1)); padding: 1rem; }
.mz-ph span { font: 800 clamp(1.15rem, 2.6vw, 1.6rem)/1.45 var(--display); color: var(--on-tone); text-align: center; text-wrap: balance; }

.mz-btn {
	display: inline-block; background: var(--ink); color: var(--surface);
	border: 2px solid var(--bd); border-radius: 999px; padding: .65rem 1.8rem;
	font: 700 1rem/1.5 var(--display); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
}
.mz-btn:hover { background: var(--t1); color: var(--on-tone); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--bd); }

/* Section headings: a colour sticker + a small "all" pill. */
.mz-section { margin-block: 2.4rem; }
.mz-section-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 1.2rem; font-size: 1rem; }
.mz-section-title__text {
	display: inline-block; background: var(--tone, var(--t1)); color: var(--on-tone);
	border: 2px solid var(--bd); border-radius: 14px; padding: .05em .8em;
	font: 800 clamp(1.15rem, 2.6vw, 1.55rem)/1.65 var(--display);
	box-shadow: var(--shadow-sm); transform: rotate(-1deg);
}
.mz-section-more {
	font: 700 .88rem/1.5 var(--display); background: var(--surface);
	border: 2px solid var(--bd); border-radius: 999px; padding: .2rem .95rem; white-space: nowrap;
}
.mz-section-more:hover { background: var(--ink); color: var(--surface); }

/* Picture card */
.mz-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.mz-card {
	position: relative; display: flex; flex-direction: column; background: var(--surface);
	border: 2px solid var(--bd); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm);
	transition: transform .15s, box-shadow .15s;
}
.mz-card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--bd); }
.mz-card .mz-media { border-bottom: 2px solid var(--bd); }
.mz-card__body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 1rem 1.1rem 1.1rem; }
.mz-card__title { font: 700 1.1rem/1.6 var(--display); margin: 0 0 .5rem; }
.mz-card__title a::after, .mz-row__title a::after, .mz-lead__title a::after { content: ""; position: absolute; inset: 0; }
.mz-card .mz-meta { margin-top: auto; }

@media (max-width: 1000px) { .mz-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
	.mz-cards--scroll {
		display: flex; overflow-x: auto; gap: 1rem; scroll-snap-type: x mandatory;
		margin-inline: -1rem; padding: 4px 1rem 14px; scroll-padding-inline: 1rem;
		scrollbar-width: none;
	}
	.mz-cards--scroll::-webkit-scrollbar { display: none; }
	.mz-cards--scroll .mz-card { flex: 0 0 78%; scroll-snap-align: start; }
}

/* Row card (latest list, archives) */
.mz-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.mz-row {
	position: relative; display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 1rem; align-items: start;
	background: var(--surface); border: 2px solid var(--bd); border-radius: 18px; padding: .9rem;
	box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
}
.mz-row:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--bd); }
.mz-row .mz-media { aspect-ratio: 1; border: 2px solid var(--bd); border-radius: 12px; }
.mz-row .mz-ph { padding: .4rem; }
.mz-row .mz-ph span { font-size: .85rem; overflow-wrap: anywhere; }
.mz-row--text { grid-template-columns: minmax(0, 1fr); }
.mz-row__body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.mz-row__title { font: 700 1.1rem/1.6 var(--display); margin: 0 0 .15rem; }
.mz-row .mz-dek { font-size: .92rem; -webkit-line-clamp: 2; line-clamp: 2; margin: .1rem 0 .5rem; }
.mz-list .mz-ad { grid-column: 1 / -1; }
@media (max-width: 860px) { .mz-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
	.mz-row { grid-template-columns: 96px minmax(0, 1fr); gap: .8rem; padding: .75rem; }
	.mz-row .mz-dek { display: none; }
	.mz-row__title { font-size: 1.02rem; }
}

.mz-card__title a:hover, .mz-row__title a:hover, .mz-lead__title a:hover { text-decoration: underline; text-decoration-color: var(--hot); text-decoration-thickness: 3px; text-underline-offset: .18em; }

/* Headline-only item */
.mz-compact { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 0; border-top: 2px dashed rgba(14, 16, 19, .22); }
.mz-compact__title { font: 700 1.02rem/1.6 var(--display); margin: 0; }
.mz-compact__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.mz-dot {
	flex: none; width: .75rem; height: .75rem; margin-top: .8em; border-radius: 50%;
	background: var(--tone, var(--t1)); border: 2px solid var(--on-tone, var(--bd));
}

/* ==========================================================================
   5. Front page
   ========================================================================== */
.mz-hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.5rem; }
.mz-hero__lead { display: flex; }
@media (max-width: 900px) { .mz-hero { grid-template-columns: minmax(0, 1fr); } }

.mz-lead {
	position: relative; display: flex; flex-direction: column; flex: 1; background: var(--surface);
	border: 2px solid var(--bd); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
}
.mz-lead .mz-media { aspect-ratio: 16 / 9; border-bottom: 2px solid var(--bd); }
.mz-lead__body { display: flex; flex-direction: column; align-items: flex-start; padding: 1.3rem 1.5rem 1.5rem; }
.mz-lead__title { font: 800 clamp(1.5rem, 3vw, 2.25rem)/1.5 var(--display); margin: 0 0 .5rem; text-wrap: balance; }
.mz-lead .mz-dek { font-size: 1.05rem; }

.mz-now {
	background: var(--t1); color: var(--on-tone); border: 2px solid var(--bd);
	border-radius: 22px; padding: 1.2rem 1.4rem .5rem; box-shadow: var(--shadow);
}
.mz-now .mz-meta { color: rgba(14, 16, 19, .72); }
.mz-now__title { display: flex; align-items: center; gap: .6rem; font: 800 1.35rem/1.6 var(--display); margin: 0 0 .3rem; }
.mz-live { width: .8rem; height: .8rem; border-radius: 50%; background: #e5301b; border: 2px solid var(--on-tone); animation: mz-pulse 1.8s ease-in-out infinite; }
@keyframes mz-pulse { 50% { transform: scale(1.35); opacity: .6; } }
.mz-now__title + .mz-compact { border-top: 0; }

.mz-more { text-align: center; margin: 1.8rem 0 0; }

.mz-notice {
	margin: 0 0 1.4rem; padding: 1rem 1.2rem; background: var(--surface);
	border: 2px dashed var(--bd); border-radius: 16px; font: 500 .95rem/1.7 var(--text);
}
.mz-notice ul { margin: .4rem 0 .6rem; padding-left: 1.2rem; }
.mz-notice p { margin: 0; color: var(--muted); font-size: .85rem; }

/* ==========================================================================
   6. Archive, search, page, 404
   ========================================================================== */
.mz-archive__head { text-align: center; padding: 1.4rem 0 2rem; max-width: 760px; margin: 0 auto; }
.mz-archive__label { font: 700 .9rem/1.5 var(--display); color: var(--muted); margin: 0 0 .3rem; }
.mz-archive__title { font: 800 clamp(1.7rem, 4.5vw, 2.7rem)/1.6 var(--display); }
.mz-archive__title span { background: linear-gradient(transparent 55%, var(--mark) 55%); padding: 0 .2em; }
.mz-archive__desc { color: var(--soft); margin-top: .8rem; }
.mz-archive__head .mz-search { padding-bottom: 0; margin-top: 1rem; }
.mz-empty { max-width: 640px; margin: 1rem auto 3rem; text-align: center; color: var(--soft); }

.mz-panel { background: var(--surface); border: 2px solid var(--bd); border-radius: 20px; padding: 1.1rem 1.3rem .4rem; box-shadow: var(--shadow-sm); }
.mz-panel__title { font: 800 1.2rem/1.6 var(--display); margin: 0 0 .3rem; }
.mz-panel__title + .mz-compact, .mz-panel > .mz-compact:first-child { border-top: 0; }
.mz-panel .mz-compact { border-top-color: var(--line); }
.mz-panel--plain { max-width: 760px; margin-inline: auto; }

.mz-page { max-width: var(--measure); margin: 0 auto; padding: 1rem 0 3rem; }
.mz-page__title { font: 800 clamp(1.8rem, 4vw, 2.5rem)/1.5 var(--display); margin-bottom: 1.4rem; }

.navigation.pagination { margin-top: 2rem; }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; align-items: center; font: 700 .95rem/1 var(--display); }
.navigation.pagination .nav-links > * {
	min-width: 44px; height: 44px; padding: 0 1rem; display: inline-grid; place-items: center;
	border: 2px solid var(--bd); border-radius: 999px; background: var(--surface);
}
.navigation.pagination a:hover { background: var(--t1); color: var(--on-tone); }
.navigation.pagination .current { background: var(--ink); color: var(--surface); }
.navigation.pagination .dots { border-color: transparent; background: none; }

/* ==========================================================================
   7. Single article
   ========================================================================== */
.mz-single { display: grid; grid-template-columns: minmax(0, 1fr); padding-block: .6rem 3rem; }
.mz-article { width: 100%; max-width: var(--measure); margin-inline: auto; }

@media (min-width: 1180px) {
	.mz-single { grid-template-columns: minmax(0, var(--measure)) 320px; gap: 0 56px; justify-content: center; }
	.mz-article { margin-inline: 0; }
}

.mz-article__title { font: 800 clamp(1.7rem, 4vw, 2.6rem)/1.5 var(--display); margin: .2rem 0 .8rem; text-wrap: balance; }
.mz-article__dek { font: 500 1.15rem/1.75 var(--text); color: var(--soft); margin: 0 0 1.1rem; }

.mz-article__meta {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem;
	padding: .8rem 0; margin-bottom: 1.5rem; border-block: 2px solid var(--bd);
}
.mz-fontsize { display: inline-flex; gap: .4rem; }
.mz-fontsize button {
	font: 700 .9rem/1 var(--display); color: var(--ink); background: var(--surface);
	border: 2px solid var(--bd); border-radius: 999px; padding: .5rem .85rem; cursor: pointer;
}
.mz-fontsize button:hover { background: var(--t1); color: var(--on-tone); }

.mz-article__figure { margin: 0 0 2rem; }
.mz-article__figure img { width: 100%; border: 2px solid var(--bd); border-radius: 20px; box-shadow: var(--shadow-sm); }
.mz-article__figure figcaption, .mz-prose figcaption, .wp-caption-text { font: 500 .85rem/1.6 var(--text); color: var(--muted); margin-top: .6rem; }

.mz-prose { font-size: var(--mz-prose, 1.15rem); line-height: 1.95; }
.mz-prose > * { margin-top: 0; }
.mz-prose p { margin: 0 0 1.4em; }
.mz-prose h2 { font-size: 1.55rem; margin: 2.1em 0 .6em; }
.mz-prose h3 { font-size: 1.3rem; margin: 1.8em 0 .5em; }
.mz-prose h4 { font-size: 1.12rem; margin: 1.5em 0 .5em; }
.mz-prose a { text-decoration: underline; text-decoration-color: var(--hot); text-decoration-thickness: 2px; text-underline-offset: .22em; }
.mz-prose a:hover { background: var(--mark); }
.mz-prose ul, .mz-prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.mz-prose li { margin-bottom: .4em; }
.mz-prose blockquote, .mz-prose .wp-block-pullquote {
	margin: 2.2rem 0; padding: 1.2rem 1.4rem; background: var(--surface);
	border: 2px solid var(--bd); border-radius: 18px; box-shadow: var(--shadow-sm);
	font: 700 1.25em/1.75 var(--display); font-style: normal;
}
.mz-prose blockquote p:last-child { margin-bottom: 0; }
.mz-prose cite { font: 500 .85rem/1.6 var(--text); color: var(--muted); font-style: normal; }
.mz-prose figure { margin: 2rem 0; }
.mz-prose img { border: 2px solid var(--bd); border-radius: 16px; }
.mz-prose hr { border: 0; border-top: 2px dashed var(--bd); margin: 2.5rem 0; }
.mz-prose table { border-collapse: collapse; width: 100%; font: 400 .95rem/1.6 var(--text); margin-bottom: 1.5rem; }
.mz-prose th, .mz-prose td { border-bottom: 2px solid var(--line); padding: .5rem .6rem; text-align: left; }
.mz-prose pre, .mz-prose code { font-size: .9em; background: var(--surface); border-radius: 8px; }
.mz-prose pre { padding: 1rem; overflow-x: auto; border: 2px solid var(--bd); }
.mz-prose iframe { width: 100%; border: 2px solid var(--bd); border-radius: 16px; }
.mz-prose .alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.mz-prose .alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.mz-prose .aligncenter { margin-inline: auto; }
.mz-prose::after { content: ""; display: table; clear: both; }

.mz-pagelinks { font: 700 .95rem var(--display); margin: 1rem 0; }

.mz-article__foot { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 2px dashed var(--bd); }
.mz-tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.1rem; }
.mz-tags__label, .mz-share__label { font: 700 .9rem/1.6 var(--display); color: var(--muted); margin-right: .2rem; }
.mz-tag { font: 600 .9rem/1.7 var(--text); background: var(--surface); border: 2px solid var(--bd); border-radius: 999px; padding: 0 .85rem; }
.mz-tag:hover { background: var(--t1); color: var(--on-tone); }

.mz-share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.mz-pill {
	font: 700 .92rem/1.6 var(--display); color: var(--ink); background: var(--surface);
	border: 2px solid var(--bd); border-radius: 999px; padding: .3rem 1rem; cursor: pointer;
	transition: transform .15s, box-shadow .15s;
}
.mz-pill:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--bd); }
.mz-pill--wa { background: var(--t2); color: var(--on-tone); }

.mz-related { margin-top: 2.8rem; }
.mz-related .mz-cards { grid-template-columns: minmax(0, 1fr); }
.mz-related .mz-card { flex-direction: row; }
.mz-related .mz-media { width: 40%; flex: none; aspect-ratio: auto; min-height: 150px; border-bottom: 0; border-right: 2px solid var(--bd); }
@media (max-width: 520px) {
	.mz-related .mz-card { flex-direction: column; }
	.mz-related .mz-media { width: auto; aspect-ratio: 16 / 10; min-height: 0; border-right: 0; border-bottom: 2px solid var(--bd); }
}

.mz-comments { margin-top: 3rem; }
.mz-comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.mz-comment-list .children { list-style: none; padding-left: 1.2rem; border-left: 2px solid var(--line); }
.mz-comment-list .comment-body { padding: 1rem 0; border-bottom: 2px dashed var(--line); font-size: 1rem; }
.mz-comment-list .comment-meta { font: 500 .85rem/1.6 var(--text); color: var(--muted); }
.mz-comments label { display: block; font: 700 .9rem/1.6 var(--display); margin-bottom: .2rem; }
.mz-comments input[type="text"], .mz-comments input[type="email"], .mz-comments input[type="url"], .mz-comments textarea {
	width: 100%; font: 400 1rem/1.6 var(--text); color: var(--ink); background: var(--surface);
	border: 2px solid var(--bd); border-radius: 14px; padding: .55rem .9rem;
}
.mz-comments .submit {
	font: 700 1rem/1.5 var(--display); color: var(--surface); background: var(--ink);
	border: 2px solid var(--bd); border-radius: 999px; padding: .6rem 1.6rem; cursor: pointer; box-shadow: var(--shadow-sm);
}

/* Side rail: wide screens only */
.mz-rail { display: none; }
@media (min-width: 1180px) {
	.mz-rail { display: block; }
	.mz-rail--sticky .mz-rail__inner { position: sticky; top: 1.5rem; }
}
.mz-rail .mz-ad { margin-top: 0; }

/* ==========================================================================
   8. Ad slots
   Rules the theme follows: always labelled, never before the headline, never
   sticky or overlaying text, space is reserved to avoid layout jumps, and the
   whole slot disappears if Google returns no ad.
   ========================================================================== */
.mz-ad {
	--mz-ad-h: 100px;
	clear: both;
	margin: 2.2rem auto;
	max-width: 100%;
	min-height: calc(var(--mz-ad-h) + 1.8rem);
	text-align: center;
	overflow: hidden;
}
.mz-ad__label {
	display: inline-block; font: 600 .72rem/1.6 var(--text); color: var(--muted);
	margin-bottom: .45rem; padding: 0 .8em; border: 1px solid var(--line); border-radius: 999px;
}
.mz-ad ins.adsbygoogle { display: block; min-height: var(--mz-ad-h); }
.mz-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

.mz-ad--wide { --mz-ad-h: 100px; max-width: 970px; }
.mz-ad--box { --mz-ad-h: 250px; max-width: 100%; }
.mz-ad--side { --mz-ad-h: 250px; max-width: 300px; margin-bottom: 1.6rem; }
.mz-ad--header { margin: 1.2rem auto 0; }

.mz-ad__placeholder {
	display: grid; place-items: center; height: var(--mz-ad-h);
	border: 2px dashed var(--bd); border-radius: 14px; color: var(--muted);
	font: 600 .85rem/1.5 var(--text); padding: .5rem;
}
.mz-ad--guide { min-height: 0; margin-block: 1.2rem; }
.mz-ad--guide .mz-ad__placeholder { height: auto; min-height: 56px; }
.mz-prose .mz-ad { margin: 2.4rem auto; }

/* ==========================================================================
   9. Footer
   ========================================================================== */
.mz-footer { margin-top: 2.5rem; background: #0e1013; color: #f3f3ef; border-top: 2px solid var(--bd); padding: 2.4rem 0 2.6rem; text-align: center; }
.mz-footer__brand a {
	display: inline-block; background: var(--t1); color: var(--on-tone); border: 2px solid #f3f3ef; border-radius: 14px;
	padding: .1em .7em; font: 800 1.9rem/1.55 var(--display); transform: rotate(-1.5deg);
}
.mz-footer__tag { color: #b9bdc8; margin: .9rem 0 0; }
.mz-menu--footer { justify-content: center; flex-wrap: wrap; margin: 1.2rem auto 0; width: fit-content; max-width: 100%; }
.mz-menu--footer a { background: transparent; color: #f3f3ef; border-color: #f3f3ef; }
.mz-menu--footer a:hover { background: var(--t1); color: var(--on-tone); }
.mz-footer__copy { font: 400 .85rem/1.7 var(--text); color: #a4a9b5; margin: 1.3rem 0 0; }

/* ==========================================================================
   10. Motion + print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
	.mz-header, .mz-ad, .mz-rail, .mz-share, .mz-fontsize, .mz-related, .mz-comments, .mz-footer, .mz-progress { display: none !important; }
	body { font-size: 12pt; color: #000; background: #fff; }
	.mz-article { max-width: none; }
}
