/*
Theme Name: Iheft Almanac
Theme URI: https://iheft.com/
Author: iheft.com
Description: A field-notebook theme for iheft.com: plant-forward recipes and slow travel. Arched "market window" imagery, a seasonal almanac strip, random Popular Topics cached server-side (no ORDER BY RAND), a raw "Header" widget area printed right after </header> for Analytics/AdSense code, and self-hosted fonts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
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: iheft
Tags: blog, food-and-drink, travel, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/* ---------- Fonts (bundled, SIL OFL) ---------- */
@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces-latin-opsz-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Karla"; src: url("assets/fonts/karla-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Karla"; src: url("assets/fonts/karla-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Karla"; src: url("assets/fonts/karla-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Karla"; src: url("assets/fonts/karla-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("assets/fonts/dm-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("assets/fonts/dm-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
	/* primitives */
	--c-paper: #F5F0E6;
	--c-paper-2: #ECE4D3;
	--c-card: #FBF8F2;
	--c-ink: #1F2A24;
	--c-ink-2: #46534B;
	--c-ink-3: #6B776F;
	--c-line: #D9CFBB;
	--c-tomato: #B8402A;
	--c-tomato-2: #9C3220;
	--c-saffron: #E2A63F;
	--c-sage: #8DB57A;
	--c-forest: #22382D;
	--c-forest-2: #2C4638;
	--c-night: #17211B;
	--c-plum: #6E3B4E;

	/* semantic */
	--bg: var(--c-paper);
	--fg: var(--c-ink);
	--muted: var(--c-ink-2);
	--accent: var(--c-tomato);
	--ring: var(--c-saffron);

	--f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--f-body: "Karla", "Helvetica Neue", Arial, sans-serif;
	--f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--r-s: 10px;
	--r-m: 18px;
	--r-l: 28px;
	--arch: 999px 999px var(--r-m) var(--r-m);

	--ease: cubic-bezier(.2, .7, .2, 1);
	--shadow: 0 1px 0 rgba(31, 42, 36, .06), 0 14px 30px -18px rgba(31, 42, 36, .35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
	margin: 0;
	background-color: var(--bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	color: var(--fg);
	font: 400 1.0625rem/1.65 var(--f-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .5em; font-optical-sizing: auto; }
p { margin: 0 0 1.1em; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--c-saffron); color: var(--c-ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { clip: auto; clip-path: none; width: auto; height: auto; z-index: 1000; top: 10px; left: 10px; padding: 10px 16px; background: var(--c-ink); color: var(--c-paper); border-radius: var(--r-s); }
.icon { width: 22px; height: 22px; flex: none; }

.eyebrow, .kicker, .card__no, .meta, .strip, .topic__no, .topic__cat, .section-rule__title, .postnav__label, .tags {
	font-family: var(--f-mono);
	font-size: .75rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.eyebrow { color: var(--accent); margin: 0 0 .9rem; display: inline-flex; gap: .6em; align-items: center; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 44px; padding: 0 1.15em; border-radius: 999px; border: 1.5px solid transparent;
	font: 500 .95rem/1 var(--f-body); text-decoration: none; cursor: pointer;
	transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--c-ink); color: var(--c-paper); }
.btn--ink:hover { background: var(--c-tomato); }
.btn--tomato { background: var(--c-tomato); color: #fff; }
.btn--tomato:hover { background: var(--c-tomato-2); }
.btn--ghost { border-color: var(--c-ink); color: var(--c-ink); background: transparent; }
.btn--ghost:hover { background: var(--c-ink); color: var(--c-paper); }
.iconbtn {
	width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%;
	border: 1.5px solid transparent; background: transparent; cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.iconbtn:hover, .iconbtn[aria-expanded="true"] { border-color: var(--c-ink); background: var(--c-card); }

/* ---------- Top strip ---------- */
.strip { background: var(--c-night); color: #CFC6B2; font-size: .7rem; }
.strip__inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; }
.strip__line::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .7em; border-radius: 50%; background: var(--c-sage); vertical-align: 1px; }
.strip__tag { color: #9FA79E; text-align: right; }

/* ---------- Masthead ---------- */
.masthead {
	position: sticky; top: 0; z-index: 50;
	background: rgba(245, 240, 230, .92);
	-webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--c-ink);
	box-shadow: 0 3px 0 -2px var(--c-paper), 0 4px 0 -2px var(--c-ink);
}
.admin-bar .masthead { top: 32px; }
.masthead__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand__img { height: 46px; width: auto; }
.mainnav { margin-left: auto; }
.mainnav__list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.mainnav__list li { position: relative; }
.mainnav .menu-link { display: block; padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; transition: background-color .2s var(--ease); }
.mainnav .menu-link:hover, .mainnav .current-menu-item > .menu-link { background: var(--c-paper-2); }
.mainnav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 6px 0 0; padding: 8px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-m); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(4px); transition: .2s var(--ease); }
.mainnav li:hover > .sub-menu, .mainnav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.masthead__tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.mainnav + .masthead__tools { margin-left: 8px; }
.menubtn { display: none; }
.searchpanel { border-top: 1px solid var(--c-line); background: var(--c-paper); padding-block: 18px; }
.progress { position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; overflow: hidden; pointer-events: none; }
.progress__bar { display: block; height: 100%; background: var(--c-tomato); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- Search form ---------- */
.searchform { display: flex; gap: 8px; max-width: 640px; }
.searchform__input {
	flex: 1; min-width: 0; min-height: 48px; padding: 0 18px; border-radius: 999px;
	border: 1.5px solid var(--c-ink); background: var(--c-card);
}
.searchform__input:focus { outline: none; box-shadow: 0 0 0 4px rgba(226, 166, 63, .45); }

/* ---------- Page head ---------- */
.pagehead { padding-block: clamp(40px, 7vw, 84px) clamp(24px, 4vw, 40px); }
.pagehead__title { font-size: clamp(2.2rem, 5.5vw, 4.2rem); max-width: 18ch; }
.pagehead__desc { max-width: 60ch; color: var(--muted); font-size: 1.125rem; }

/* ---------- Cards ---------- */
.card { position: relative; display: flex; flex-direction: column; }
.card__media { display: block; position: relative; overflow: hidden; border-radius: var(--r-m); background: var(--c-paper-2); aspect-ratio: 4 / 3; }
.card__media .media__img, .card__media .media__plate { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .media__img { transform: scale(1.035); }
.card__body { padding: 18px 2px 4px; display: flex; flex-direction: column; gap: 10px; }
.card__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card__no { color: var(--c-ink-3); }
.kicker { color: var(--accent); text-decoration: none; font-weight: 500; }
a.kicker:hover { text-decoration: underline; }
.card__title { font-size: 1.35rem; margin: 0; font-variation-settings: "opsz" 36; }
.card__title a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s var(--ease); }
.card__title a:hover { background-size: 100% 1.5px; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__top .kicker { position: relative; z-index: 2; }
.card__excerpt { color: var(--muted); margin: 0; font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: var(--c-ink-3); display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta__dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }

/* typographic plate for posts without an image */
.media__plate { display: grid; place-items: center; width: 100%; height: 100%; background: var(--c-forest); color: var(--c-paper); position: relative; overflow: hidden; }
.media__plate::before { content: ""; position: absolute; inset: 12%; border: 1.5px solid currentColor; border-radius: var(--arch); opacity: .35; }
.media__letter { font: italic 600 clamp(3rem, 8vw, 6rem)/1 var(--f-display); position: relative; }
.media__plate--tomato { background: var(--c-tomato); }
.media__plate--sage { background: #5E8A4F; }
.media__plate--saffron { background: var(--c-saffron); color: var(--c-ink); }
.media__plate--plum { background: var(--c-plum); }

/* lead story: arched window */
.lead { padding-block: clamp(28px, 5vw, 64px) clamp(24px, 4vw, 48px); }
.card--lead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.card--lead .card__media { order: 2; aspect-ratio: 5 / 4; border-radius: var(--arch); box-shadow: var(--shadow); }
.card--lead .card__media::after { content: ""; position: absolute; inset: 14px; border: 1.5px solid rgba(245, 240, 230, .75); border-radius: var(--arch); pointer-events: none; }
.card--lead .card__body { order: 1; gap: 18px; padding: 0; }
.card--lead .card__title { font-size: clamp(2.3rem, 5.2vw, 4.4rem); font-variation-settings: "opsz" 144; letter-spacing: -.025em; line-height: 1.02; }
.card--lead .card__excerpt { font-size: 1.15rem; -webkit-line-clamp: 4; max-width: 46ch; }
.card--lead .card__no { color: var(--c-paper); background: var(--c-ink); padding: 4px 10px; border-radius: 999px; }

.section-rule { display: flex; align-items: center; gap: 18px; margin: clamp(16px, 3vw, 28px) 0 clamp(24px, 3vw, 36px); }
.section-rule::before, .section-rule::after { content: ""; flex: 1; height: 1px; background: var(--c-ink); }
.section-rule__title { margin: 0; font-size: .78rem; font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.5vw, 48px) clamp(20px, 3vw, 36px); padding-bottom: clamp(32px, 5vw, 56px); }
.home:not(.paged) .grid .card:nth-child(3n + 2) { transform: translateY(28px); }
.home:not(.paged) .grid { padding-bottom: calc(clamp(32px, 5vw, 56px) + 28px); }


/* ---------- Pagination ---------- */
.pagination { padding-bottom: clamp(40px, 6vw, 72px); }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0; padding: 0; }
.pagination li > .page-numbers { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--c-line); text-decoration: none; font-family: var(--f-mono); font-size: .85rem; transition: .2s var(--ease); }
.pagination a.page-numbers:hover { border-color: var(--c-ink); background: var(--c-card); }
.pagination .current { background: var(--c-tomato); border-color: var(--c-tomato); color: #fff; }
.pagination .dots { border-color: transparent; }

/* ---------- Popular Topics band ---------- */
.topics { background: var(--c-forest); color: var(--c-paper); padding-block: clamp(56px, 8vw, 104px); position: relative; overflow: hidden; }
.topics::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -220px; border-radius: 50%; border: 1.5px solid rgba(141, 181, 122, .25); box-shadow: 0 0 0 40px rgba(141, 181, 122, .05), 0 0 0 80px rgba(141, 181, 122, .035); pointer-events: none; }
.topics__head { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 6px 40px; margin-bottom: clamp(32px, 5vw, 56px); }
.topics__head .eyebrow { grid-column: 1 / -1; color: var(--c-saffron); margin: 0; }
.topics__title { font-size: clamp(2.4rem, 6vw, 4.6rem); margin: 0; font-variation-settings: "opsz" 144; font-weight: 500; }
.topics__title::first-letter { font-style: italic; color: var(--c-sage); }
.topics__lede { margin: 0 0 .6em; color: #C9D2C3; max-width: 34ch; justify-self: end; text-align: right; }
.topics__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.topic { display: flex; }
.topic__link { display: flex; flex-direction: column; width: 100%; text-decoration: none; color: inherit; background: var(--c-forest-2); border-radius: var(--r-l) var(--r-l) var(--r-m) var(--r-m); padding: 10px 10px 18px; transition: background-color .25s var(--ease), transform .25s var(--ease); }
.topic__link:hover { background: #355343; transform: translateY(-3px); }
.topic__media { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--arch); background: var(--c-forest); }
.topic__media .media__img, .topic__media .media__plate { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.topic__link:hover .media__img { transform: scale(1.05); }
.topic__body { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: baseline; padding: 16px 6px 0; }
.topic__no { color: var(--c-saffron); }
.topic__cat { color: #A9B8A4; justify-self: end; text-align: right; font-size: .68rem; }
.topic__title { grid-column: 1 / -1; font: 600 1.12rem/1.22 var(--f-display); font-variation-settings: "opsz" 24; text-wrap: balance; }
.topic__link:hover .topic__title { text-decoration: underline; text-decoration-color: var(--c-sage); text-decoration-thickness: 1.5px; }

/* ---------- Single entry ---------- */
.entry__head { padding-block: clamp(36px, 6vw, 80px) clamp(20px, 3vw, 36px); max-width: 980px; text-align: center; }
.entry__kicker { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.entry__title { font-size: clamp(2.3rem, 6vw, 4.8rem); font-variation-settings: "opsz" 144; letter-spacing: -.028em; line-height: 1.02; text-wrap: balance; margin-inline: auto; }
.entry__standfirst { font: italic 400 clamp(1.15rem, 2vw, 1.4rem)/1.5 var(--f-display); color: var(--muted); max-width: 52ch; margin: 18px auto 0; }
.entry__hero { margin: 0 auto clamp(32px, 5vw, 60px); }
.entry__hero-img { width: 100%; max-height: 78vh; object-fit: cover; border-radius: clamp(120px, 26vw, 420px) clamp(120px, 26vw, 420px) var(--r-m) var(--r-m); }
.entry__hero figcaption { margin-top: 12px; text-align: center; color: var(--c-ink-3); font-size: .9rem; }
.entry--page .entry__head { padding-bottom: clamp(24px, 4vw, 48px); }

.postnav { margin-block: clamp(32px, 5vw, 56px); }
.postnav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-block: 1px solid var(--c-ink); }
.postnav a { display: flex; flex-direction: column; gap: 6px; padding: 22px 4px; text-decoration: none; height: 100%; }
.postnav .nav-next { text-align: right; grid-column: 2; }
.postnav__label { color: var(--accent); }
.postnav__title { font: 600 1.2rem/1.25 var(--f-display); }
.postnav a:hover .postnav__title { text-decoration: underline; text-decoration-thickness: 1.5px; }

/* ---------- Prose ---------- */
.prose { max-width: 740px; margin-inline: auto; padding-inline: var(--gutter); box-sizing: content-box; font-size: 1.125rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.2em; }
.prose p { margin: 0; }
.prose > p:first-child::first-letter { float: left; font: 600 4.6em/.82 var(--f-display); color: var(--c-tomato); margin: .06em .1em 0 0; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-top: 2em; }
.prose h3 { font-size: clamp(1.35rem, 2.4vw, 1.6rem); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--c-tomato-2); text-decoration-color: rgba(184, 64, 42, .45); text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose ul li::marker { color: var(--c-tomato); }
.prose ol li::marker { font-family: var(--f-mono); color: var(--c-tomato); font-size: .9em; }
.prose blockquote { margin-inline: 0; padding: 8px 0 8px 28px; border-left: 3px solid var(--c-sage); font: italic 400 1.3rem/1.5 var(--f-display); color: var(--c-ink); }
.prose blockquote cite { display: block; margin-top: 10px; font: 400 .8rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--c-ink-3); font-style: normal; }
.prose img { border-radius: var(--r-m); }
.prose figure { margin-inline: 0; }
.prose figcaption, .wp-caption-text { font-size: .88rem; color: var(--c-ink-3); text-align: center; margin-top: 10px; }
.prose hr { border: 0; height: 12px; background: radial-gradient(circle, var(--c-ink-3) 1.5px, transparent 2px) center / 18px 12px repeat-x; max-width: 120px; margin: 2.4em auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--c-line); text-align: left; }
.prose th { font-family: var(--f-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.prose code { font-family: var(--f-mono); font-size: .9em; background: var(--c-paper-2); padding: .1em .35em; border-radius: 6px; }
.prose pre { background: var(--c-night); color: var(--c-paper); padding: 18px; border-radius: var(--r-m); overflow-x: auto; }
.prose .alignwide { max-width: min(1100px, calc(100vw - 2 * var(--gutter))); margin-inline: calc((min(1100px, 100vw - 2 * var(--gutter)) - 740px) / -2); }
.prose .alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.prose .alignfull img { border-radius: 0; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.aligncenter { margin-inline: auto; }
.wp-block-image { margin-block: 1.6em; }
.wp-block-pullquote { border-block: 2px solid var(--c-ink); padding: 1.4em 0; text-align: center; }
.wp-block-pullquote blockquote { border: 0; padding: 0; font-size: 1.6rem; }
.wp-block-button__link { border-radius: 999px; background: var(--c-ink); color: var(--c-paper); padding: .8em 1.4em; text-decoration: none; }
.wp-block-separator { border: 0; border-top: 1px solid var(--c-line); }
.sticky .card__title::before { content: "\2605  "; color: var(--c-saffron); }

.entry__foot { padding-top: 32px; }
.tags li { margin: 0 !important; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags .tag { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--c-paper-2); text-decoration: none; letter-spacing: .04em; transition: .2s var(--ease); }
.tags .tag:hover { background: var(--c-ink); color: var(--c-paper); }
.page-links { font-family: var(--f-mono); display: flex; gap: 8px; }

/* Recipe card plugins (WP Recipe Maker, Tasty, Create) */
.wprm-recipe-container, .tasty-recipes, .mv-create-card { margin-block: 2.4em !important; }
.prose .wprm-recipe, .prose .tasty-recipes, .prose .mv-create-card {
	background: var(--c-card) !important; border: 1.5px solid var(--c-ink) !important; border-radius: var(--r-l) !important;
	padding: clamp(18px, 3vw, 32px) !important; box-shadow: 6px 6px 0 var(--c-saffron) !important; font-family: var(--f-body) !important;
}
.prose .wprm-recipe-name, .prose .tasty-recipes-title, .prose .mv-create-title { font-family: var(--f-display) !important; font-weight: 600 !important; }
.prose .wprm-recipe-header, .prose .tasty-recipes h3 { font-family: var(--f-mono) !important; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem !important; color: var(--c-tomato) !important; }

/* ---------- Comments ---------- */
.notes { padding-block: clamp(48px, 7vw, 88px); }
.notes__inner { max-width: 740px; margin-inline: auto; }
.notes__title, .comment-reply-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.notes__list, .notes__list .children { list-style: none; margin: 0; padding: 0; }
.notes__list .children { padding-left: clamp(16px, 4vw, 40px); border-left: 1px dashed var(--c-line); }
.note__body { padding: 20px 0; border-bottom: 1px solid var(--c-line); }
.note__head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.note__avatar { border-radius: 50%; }
.note__author { display: block; font-weight: 700; }
.note__author a { text-decoration: none; }
.note__date { font-family: var(--f-mono); font-size: .75rem; color: var(--c-ink-3); }
.note__reply a, .comment-cancel-link { font-family: var(--f-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.comment-respond { margin-top: 48px; }
.comment-form { display: grid; gap: 14px; margin-top: 18px; }
.comment-form label { display: block; font-weight: 500; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 16px; border-radius: var(--r-s); border: 1.5px solid var(--c-line); background: var(--c-card); min-height: 48px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 4px rgba(226, 166, 63, .35); }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }

/* ---------- Empty / 404 ---------- */
.empty { padding-block: clamp(48px, 8vw, 110px); max-width: 720px; }
.empty__title { font-size: clamp(2rem, 5vw, 3.6rem); }

/* ---------- Footer ---------- */
.colophon { background: var(--c-night); color: #D9D1BF; position: relative; padding-top: clamp(56px, 7vw, 88px); }
.perforation { position: absolute; top: -9px; left: 0; right: 0; height: 18px; background: radial-gradient(circle at 9px 9px, var(--c-paper) 5px, transparent 5.5px) 0 0 / 22px 18px repeat-x; }
.colophon__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding-bottom: 48px; }
.colophon__brand .brand__img { height: 58px; }
.colophon__blurb { max-width: 40ch; margin-top: 20px; color: #B9B4A6; font: italic 400 1.2rem/1.5 var(--f-display); }
.colophon__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.colophon__nav { justify-self: end; }
.colophon .menu-link { display: inline-block; padding: 6px 0; text-decoration: none; color: #E8E1D0; border-bottom: 1px solid transparent; transition: border-color .2s var(--ease), color .2s var(--ease); }
.colophon .menu-link:hover { color: var(--c-saffron); border-color: currentColor; }
.colophon__widgets { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 32px; }
.colophon__widgets ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.colophon__widgets a { color: #E8E1D0; text-decoration: none; }
.colophon__widgets a:hover { color: var(--c-saffron); }
.footer-widget__title { font-size: 1.1rem; color: #fff; }
.colophon__base { display: flex; justify-content: space-between; gap: 16px; padding-block: 20px 28px; background: linear-gradient(rgba(255, 255, 255, .12), rgba(255, 255, 255, .12)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: #9FA79E; }
.to-top { text-decoration: none; color: #E8E1D0; }
.to-top:hover { color: var(--c-saffron); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.topics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.home:not(.paged) .grid .card:nth-child(3n + 2) { transform: none; }
	.home:not(.paged) .grid .card:nth-child(2n) { transform: translateY(28px); }
}
@media (max-width: 900px) {
	.menubtn { display: inline-grid; }
	.mainnav { position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--c-paper); border-bottom: 1px solid var(--c-ink); padding: 8px var(--gutter) 16px; display: none; }
	.mainnav.is-open { display: block; }
	.mainnav__list { flex-direction: column; }
	.mainnav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 16px; margin: 0; }
	.mainnav + .masthead__tools { margin-left: auto; }
	.card--lead { grid-template-columns: 1fr; }
	.card--lead .card__media { order: 0; }
	.topics__head { grid-template-columns: 1fr; }
	.topics__lede { justify-self: start; text-align: left; }
	.colophon__grid { grid-template-columns: 1fr; }
	.colophon__nav { justify-self: start; }
}
@media (max-width: 782px) { .admin-bar .masthead { top: 46px; } }
@media (max-width: 640px) {
	.strip__tag { display: none; }
	.masthead__inner { min-height: 64px; gap: 12px; }
	.brand__img { height: 38px; }
	.surprise span { display: none; }
	.surprise { width: 44px; padding: 0; }
	.grid { grid-template-columns: 1fr; }
	.home:not(.paged) .grid .card:nth-child(n) { transform: none; }
	.topics__grid { gap: 12px; }
	.topic__link { padding: 6px 6px 14px; border-radius: var(--r-m); }
	.topic__body { padding: 12px 4px 0; }
	.topic__cat { display: none; }
	.topic__title { font-size: 1rem; }
	.prose { font-size: 1.0625rem; }
	.alignleft, .alignright { float: none; margin: 1em auto; max-width: 100%; }
	.postnav .nav-links { grid-template-columns: 1fr; }
	.postnav .nav-next { grid-column: auto; }
	.colophon__base { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
	.strip, .masthead__tools, .topics, .colophon, .notes, .postnav { display: none !important; }
	.masthead { position: static; box-shadow: none; }
}
