/*
Theme Name: Peacepa Almanac
Theme URI: https://peacepa.com/
Author: Peacepa
Description: A warm, editorial theme for plant-based recipes. Oat-paper backgrounds, forest ink, persimmon accents and a pea-pod mark. Includes a raw Header widget area printed right after the header (for Analytics / AdSense), a randomised Popular Topics block with at least eight cards on every page, and strict link markup.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
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: peacepa
Tags: blog, food-and-drink, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/* ---------- Tokens ---------- */
:root {
	--oat: #f4eee3;
	--oat-deep: #ebe2d0;
	--paper: #fbf8f2;
	--ink: #1b2a1d;
	--ink-soft: #4b5647;
	--ink-mute: #6c7566;
	--line: #ddd3c1;
	--persimmon: #e0552e;
	--persimmon-ink: #b23d18;
	--pea: #b9d35a;
	--pea-soft: #e3ecbf;
	--beet: #6e2944;
	--sage: #d7e0c4;

	--font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
	--font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--r-lg: 28px;
	--r-md: 20px;
	--r-sm: 12px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
	margin: 0;
	background: var(--oat);
	color: var(--ink);
	font: 400 17px/1.65 var(--font-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--persimmon-ink); }
:focus-visible { outline: 3px solid var(--persimmon); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; margin: 0; font-variation-settings: "SOFT" 50, "opsz" 96; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.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 !important; width: 1px; word-wrap: normal !important;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--oat); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--oat); }

.eyebrow {
	font: 500 12px/1.2 var(--font-mono);
	text-transform: uppercase;
	letter-spacing: .16em;
	color: var(--persimmon-ink);
	margin: 0 0 12px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

.btn {
	appearance: none; border: 0; cursor: pointer;
	background: var(--ink); color: var(--oat);
	font: 600 15px/1 var(--font-body);
	padding: 14px 22px; border-radius: 999px; min-height: 48px;
	transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--persimmon-ink); }
.btn:active { transform: translateY(1px); }

/* ---------- Header ---------- */
.almanac-line { background: var(--ink); color: var(--oat); font: 400 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.almanac-line__inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; }
.almanac-line__tag { opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-header { position: relative; z-index: 20; background: var(--oat); border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; gap: 24px; min-height: 84px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand__mark { flex: none; transition: transform .5s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-14deg); }
.brand__word { font: 650 30px/1 var(--font-display); letter-spacing: -0.035em; font-variation-settings: "SOFT" 100, "opsz" 144; }
.brand__img { max-height: 52px; width: auto; }

.primary-nav { margin-left: auto; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.primary-nav .menu-item { position: relative; }
.nav-link, .primary-nav .menu a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
	font: 600 14px/1 var(--font-body); letter-spacing: .02em; text-decoration: none; border-radius: 999px;
	transition: background .2s var(--ease), color .2s var(--ease);
}
.primary-nav .menu a:hover, .primary-nav .menu a[aria-current="page"] { background: var(--ink); color: var(--oat); }
.primary-nav .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 18px 40px -20px rgba(27, 42, 29, .35);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease);
}
.primary-nav .menu-item:hover > .sub-menu, .primary-nav .menu-item:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { width: 100%; border-radius: 8px; }

.masthead__tools { display: flex; gap: 8px; }
.icon-btn {
	width: 46px; height: 46px; display: grid; place-items: center; cursor: pointer;
	border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 50%;
	transition: background .2s var(--ease), border-color .2s var(--ease);
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--ink); color: var(--oat); border-color: var(--ink); }
.menu-btn { display: none; }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { width: 18px; height: 2px; background: currentColor; border-radius: 2px; display: block; position: relative; transition: transform .25s var(--ease), opacity .2s; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -6px; }
.menu-btn__bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }

.search-panel { border-top: 1px solid var(--line); background: var(--oat-deep); padding-block: 20px; }
.search-form { display: flex; gap: 10px; max-width: 720px; }
.search-form__input {
	flex: 1; min-width: 0; min-height: 48px; padding: 0 20px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--paper);
}
.search-form__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--pea-soft); }

/* ---------- Cards ---------- */
.media { display: block; position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--oat-deep); aspect-ratio: 4 / 3; }
.media img, .media__img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.media__tile { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.media__tile .brand__mark { position: absolute; right: 14px; bottom: 14px; opacity: .9; }
.media__letter { font: 600 clamp(64px, 9vw, 120px)/1 var(--font-display); font-style: italic; letter-spacing: -.04em; }
.tone-pea { background: var(--pea); color: var(--ink); }
.tone-beet { background: var(--beet); color: var(--oat); }
.tone-persimmon { background: var(--persimmon); color: var(--ink); }
.tone-oat { background: var(--sage); color: var(--ink); }
.tone-ink { background: var(--ink); color: var(--pea); }

.card { display: flex; flex-direction: column; gap: 16px; position: relative; }
.card:hover .media img { transform: scale(1.045); }
.card__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card__no { font: 500 12px/1 var(--font-mono); letter-spacing: .12em; color: var(--ink-mute); }
.chip {
	display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px;
	background: var(--pea-soft); color: var(--ink); text-decoration: none;
	font: 600 12px/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase;
	transition: background .2s var(--ease);
}
.chip:hover { background: var(--pea); color: var(--ink); }
.card__title { font-size: clamp(21px, 2vw, 25px); }
.card__title a { text-decoration: none; background: linear-gradient(var(--pea), var(--pea)) 0 92% / 0 .32em no-repeat; transition: background-size .35s var(--ease); }
.card__title a:hover { color: var(--ink); background-size: 100% .32em; }
.card__excerpt { color: var(--ink-soft); font-size: 15.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { font: 400 12.5px/1 var(--font-mono); color: var(--ink-mute); margin: 0; display: flex; gap: 8px; letter-spacing: .04em; }

/* Lead card */
.card--lead { gap: 22px; }
.card--lead .media { border-radius: var(--r-lg); aspect-ratio: 5 / 4; }
.card--lead .card__title { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.03em; }
.card--lead .card__excerpt { font-size: 18px; -webkit-line-clamp: 2; max-width: 56ch; }
.card--lead .card__no {
	position: absolute; top: 18px; left: 18px; z-index: 2; background: var(--oat); color: var(--ink);
	padding: 9px 12px; border-radius: 999px;
}

/* Side card */
.card--side { display: grid; grid-template-columns: 42% 1fr; gap: 18px; align-items: start; padding-block: 22px; border-top: 1px solid var(--line); }
.card--side .media { aspect-ratio: 1; border-radius: var(--r-sm); }
.card--side .card__body { display: flex; flex-direction: column; gap: 10px; }
.card--side .card__title { font-size: 21px; }
.card--side .card__excerpt { -webkit-line-clamp: 2; font-size: 14.5px; }

.card__body { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Front ---------- */
.front-hero { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-block: clamp(28px, 5vw, 56px) clamp(48px, 6vw, 80px); }
.front-hero__side { display: flex; flex-direction: column; }
.front-hero__side .eyebrow { margin-bottom: 4px; }

.section-head { display: flex; flex-direction: column; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head__title { font-size: clamp(34px, 5vw, 60px); letter-spacing: -.03em; }
.section-head__title::after { content: "."; color: var(--persimmon); }

.feed { padding-block: clamp(48px, 7vw, 96px); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 44px) clamp(20px, 2.6vw, 34px); }

/* The last row never leaves a hole: a lone card (or a pair) stretches into a wide card. */
.grid > .card:nth-child(3n+1):last-child { grid-column: 1 / -1; }
.grid > .card:nth-child(3n+2):last-child { grid-column: span 2; }
.grid > .card:nth-child(3n+1):last-child,
.grid > .card:nth-child(3n+2):last-child { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.grid > .card:nth-child(3n+1):last-child .card__title { font-size: clamp(26px, 3vw, 40px); }

/* ---------- Page head ---------- */
.page-head { padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 48px); }
.page-head__title { font-size: clamp(40px, 7vw, 92px); letter-spacing: -.04em; line-height: .98; max-width: 16ch; }
.page-head__desc { max-width: 60ch; color: var(--ink-soft); margin-top: 18px; font-size: 18px; }
.page-head__page { font: 500 13px/1 var(--font-mono); color: var(--ink-mute); margin-top: 16px; text-transform: uppercase; letter-spacing: .12em; }
.page-head--404 .search-form { margin-top: 28px; }
.empty { padding-bottom: 64px; }
.empty__lead { font-size: 20px; }

/* ---------- Pagination ---------- */
.pager { margin-top: clamp(40px, 6vw, 72px); }
.pager .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 46px; height: 46px; padding: 0 14px;
	border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font: 500 14px/1 var(--font-mono); background: var(--paper); white-space: nowrap;
}
.page-numbers.current { background: var(--ink); color: var(--oat); border-color: var(--ink); }
a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.page-numbers.dots { border: 0; background: none; }

/* ---------- Popular Topics ---------- */
.topics { position: relative; background: var(--ink); color: var(--oat); padding-block: clamp(64px, 8vw, 112px) clamp(56px, 7vw, 96px); margin-top: 18px; }
.topics::before {
	content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 18px;
	background: radial-gradient(circle at 12px 18px, var(--ink) 11px, transparent 12px) 0 0 / 24px 18px repeat-x;
}
.topics .eyebrow { color: var(--pea); }
.topics__head { display: flex; flex-direction: column; margin-bottom: clamp(28px, 4vw, 48px); }
.topics__title { font-size: clamp(38px, 6vw, 76px); letter-spacing: -.035em; font-style: italic; font-weight: 500; }
.topics__title::after { content: "."; color: var(--persimmon); font-style: normal; }

.topics__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 30px); counter-reset: topics; }
.pop-card { min-width: 0; }
.pop-card__link { display: flex; flex-direction: column; gap: 14px; height: 100%; text-decoration: none; color: inherit; }
.pop-card__link:hover { color: inherit; }
.pop-card__media { aspect-ratio: 1; border-radius: var(--r-md); background: rgba(244, 238, 227, .08); }
.pop-card__link:hover .media img { transform: scale(1.05); }
.pop-card__body { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 6px; align-items: start; }
.pop-card__no { grid-row: 1 / span 2; font: italic 600 40px/0.9 var(--font-display); color: var(--persimmon); font-variation-settings: "SOFT" 100, "opsz" 144; min-width: 1.4em; }
.pop-card__kicker { font: 500 11px/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--pea); }
.pop-card__title { font: 600 18px/1.25 var(--font-display); letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pop-card__link:hover .pop-card__title { text-decoration: underline; text-decoration-color: var(--pea); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Under posts and pages: lighter paper band */
.topics--after { background: var(--sage); color: var(--ink); margin-top: clamp(56px, 8vw, 96px); }
.topics--after::before { background: radial-gradient(circle at 12px 18px, var(--sage) 11px, transparent 12px) 0 0 / 24px 18px repeat-x; }
.topics--after .eyebrow { color: var(--beet); }
.topics--after .pop-card__kicker { color: var(--beet); }
.topics--after .pop-card__media { background: var(--oat-deep); }
.topics--after .pop-card__link:hover .pop-card__title { text-decoration-color: var(--persimmon); }

/* ---------- Single ---------- */
.entry-head { text-align: center; padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 44px); display: flex; flex-direction: column; align-items: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 22px; }
.entry-title { font-size: clamp(38px, 6.4vw, 82px); letter-spacing: -.04em; line-height: 1; max-width: 18ch; text-wrap: balance; }
.entry-dek { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); max-width: 58ch; margin: 22px 0 0; }
.entry-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 26px; font: 400 13px/1 var(--font-mono); color: var(--ink-mute); letter-spacing: .06em; text-transform: uppercase; }
.entry-meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--persimmon); }
.meta-link { text-decoration: none; }
.entry-hero { margin-block: 0 clamp(36px, 5vw, 64px); }
.entry-hero img { width: 100%; max-height: 78vh; object-fit: cover; border-radius: var(--r-lg); }

.entry-body { max-width: calc(720px + var(--gutter) * 2); }
.prose { font-size: 18.5px; line-height: 1.75; }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin: 0; }
.prose > p:first-of-type::first-letter {
	float: left; font: 600 4.4em/0.82 var(--font-display); color: var(--persimmon); padding: .08em .1em 0 0; font-variation-settings: "SOFT" 100, "opsz" 144;
}
.prose h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 2em; letter-spacing: -.025em; }
.prose h3 { font-size: clamp(22px, 2.6vw, 27px); margin-top: 1.7em; }
.prose h4 { font-size: 20px; margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose a { color: var(--persimmon-ink); text-decoration-color: rgba(178, 61, 24, .4); }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose ul li::marker { content: "● "; color: var(--pea); font-size: .8em; }
.prose ol li::marker { font: 600 1em var(--font-display); color: var(--persimmon-ink); }
.prose img, .prose figure img { border-radius: var(--r-md); }
.prose figure { margin-inline: 0; }
.prose figcaption, .prose .wp-element-caption { font: 400 13px/1.5 var(--font-mono); color: var(--ink-mute); margin-top: 10px; text-align: center; }
.prose blockquote {
	margin-inline: 0; padding: 28px 32px; background: var(--paper); border-radius: var(--r-md); border-left: 5px solid var(--pea);
	font: italic 500 22px/1.5 var(--font-display);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; height: 18px; background: radial-gradient(circle, var(--pea) 4px, transparent 5px) center / 26px 18px repeat-x; width: 130px; margin: 2.4em auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--oat-deep); padding: .1em .4em; border-radius: 6px; }
.prose .alignwide { width: min(1100px, 100vw - var(--gutter) * 2); margin-left: 50%; transform: translateX(-50%); }
.prose .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); max-width: none; }
.prose iframe { width: 100%; border-radius: var(--r-md); }
.prose .wp-block-embed__wrapper { border-radius: var(--r-md); overflow: hidden; }

/* Common recipe card plugins get the palette too */
.prose .wprm-recipe-container, .prose .tasty-recipes, .prose .mv-create-card { border-radius: var(--r-lg) !important; overflow: hidden; }

.entry-foot { margin-top: 48px; display: flex; flex-direction: column; gap: 32px; }
.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; min-height: 34px; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font: 400 13px/1 var(--font-mono); }
.tag:hover { border-color: var(--ink); color: var(--ink); }
.after-content { padding: 16px 0; border-block: 1px dashed var(--line); }
.after-content-widget + .after-content-widget { margin-top: 16px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav__item { min-width: 0; }
.post-nav__item:empty { display: none; }
.post-nav__item--next { text-align: right; grid-column: 2; }
.post-nav__label { display: block; font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 10px; }
.post-nav__link { font: 600 20px/1.25 var(--font-display); text-decoration: none; }
.post-nav__link:hover { color: var(--persimmon-ink); }

.page-links { display: flex; gap: 8px; margin-top: 32px; }
.post-page-numbers { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; }
.post-page-numbers.current { background: var(--ink); color: var(--oat); }

/* ---------- Comments ---------- */
.comments { max-width: calc(720px + var(--gutter) * 2); padding-block: clamp(48px, 7vw, 88px); }
.comments__title, .comment-reply-title { font-size: clamp(26px, 3vw, 34px); margin-bottom: 24px; }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { padding-left: clamp(16px, 4vw, 40px); }
.comment-body { background: var(--paper); border-radius: var(--r-md); padding: 22px 24px; margin-bottom: 16px; border: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata, .comment-meta { font: 400 12px/1 var(--font-mono); color: var(--ink-mute); margin: 8px 0 12px; }
.comment-metadata a, .comment-meta a { text-decoration: none; }
.reply a { font: 600 13px/1 var(--font-body); text-decoration: none; color: var(--persimmon-ink); }
.comment-form { display: grid; gap: 16px; }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-sm); padding: 14px 16px; min-height: 48px;
}
.comment-form textarea { min-height: 150px; }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--oat); padding-top: clamp(56px, 8vw, 96px); }
.topics + .site-footer, main:has(> .topics:last-child) + .site-footer { padding-top: 24px; }
.site-footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(244, 238, 227, .16); }
.brand--footer { color: var(--oat); }
.brand--footer:hover { color: var(--oat); }
.brand--footer .brand__word { font-size: clamp(48px, 8vw, 96px); }
.brand--footer .brand__mark { --ink: #1b2a1d; }
.site-footer__line { margin: 18px 0 0; max-width: 36ch; opacity: .8; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-link, .footer-menu a { display: inline-flex; min-height: 40px; align-items: center; text-decoration: none; opacity: .85; }
.footer-menu a:hover { opacity: 1; color: var(--pea); }
.site-footer__base { display: flex; justify-content: space-between; gap: 16px; padding-block: 22px 28px; font: 400 12.5px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.site-footer__base p { margin: 0; }
.to-top { text-decoration: none; }
.to-top:hover { color: var(--pea); }

/* ---------- WordPress core ---------- */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text { font-size: 13px; }
.sticky .card__no::after { content: " ★"; color: var(--persimmon); }
.bypostauthor > .comment-body { border-color: var(--pea); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid > .card:nth-child(n):last-child { grid-column: auto; display: flex; }
	.grid > .card:nth-child(2n+1):last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: center; }
	.topics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.front-hero { grid-template-columns: 1fr; }
	.front-hero__side { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
	.front-hero__side .eyebrow { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
	.menu-btn { display: grid; }
	.masthead { min-height: 72px; gap: 12px; }
	.masthead__tools { margin-left: auto; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px; margin: 0; box-shadow: 0 24px 40px -28px rgba(27, 42, 29, .45); }
	.primary-nav.is-open { display: block; }
	.primary-nav .menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.primary-nav .menu a { width: 100%; font-size: 17px; min-height: 50px; }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; background: none; }
	.brand__word { font-size: 26px; }
	.brand__mark { width: 36px; height: 36px; }
	.almanac-line__tag { display: none; }
}

@media (max-width: 640px) {
	body { font-size: 16.5px; }
	.grid { grid-template-columns: 1fr; }
	.grid > .card:nth-child(n):last-child { grid-column: auto; display: flex; }
	.front-hero__side { grid-template-columns: 1fr; }
	.card--side { grid-template-columns: 38% 1fr; }
	.topics__grid { gap: 22px 14px; }
	.pop-card__body { grid-template-columns: 1fr; }
	.pop-card__no { grid-row: auto; font-size: 28px; }
	.pop-card__title { font-size: 16px; }
	.prose { font-size: 17.5px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav__item--next { grid-column: auto; text-align: left; }
	.site-footer__base { flex-direction: column; }
	.search-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
	.almanac-line, .masthead__tools, .topics, .comments, .site-footer, .post-nav, .after-content { display: none !important; }
	body { background: #fff; }
}
