/*
Theme Name: Maggie
Author: Your name
Description: Digitális kert esszéíróknak: krémszínű papír, nagy szerif főcím, illusztrált esszékártyák, növekedési szakaszok, fehér olvasófelület széljegyzetekkel, bal oldalon pedig archívum, amely minden esszét a teljes címével sorol fel.
Version: 2.8.0
Requires at least: 6.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: maggie
Tags: blog, two-columns, left-sidebar, custom-menu, custom-logo, featured-images, block-styles, block-patterns, translation-ready, threaded-comments
*/

/* ---------------------------------------------------------------
   1. Fonts (bundled with the theme, nothing loads from a third party)
   --------------------------------------------------------------- */

@font-face {
	font-family: "Newsreader";
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("assets/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Newsreader";
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("assets/fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Newsreader";
	font-style: italic;
	font-weight: 200 800;
	font-display: swap;
	src: url("assets/fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Newsreader";
	font-style: italic;
	font-weight: 200 800;
	font-display: swap;
	src: url("assets/fonts/newsreader-latin-ext-opsz-italic.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("assets/fonts/lato-latin-300-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("assets/fonts/lato-latin-ext-300-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/lato-latin-400-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/lato-latin-ext-400-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/lato-latin-700-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/lato-latin-ext-700-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Lato";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/lato-latin-400-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Lato";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/lato-latin-ext-400-italic.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------
   2. Tokens
   --------------------------------------------------------------- */

:root {
	color-scheme: light dark;

	/* Palette. The accent is a light tint of the logo's green. */
	--cream: #f6f5f1;
	--light-cream: #fcfbf7;
	--tinted-cream: #e6e3e1;
	--surface: #ffffff;
	--black: #353534;
	--gray-800: #4a4a46;
	--gray-600: #73706d;
	--gray-400: #afb0b6;
	--gray-300: #d3d3d1;
	--gray-200: #e3e3e0;
	--gray-100: #e9e9e7;
	--green: #aab17c;
	--green-deep: #aab17c;
	--code-bg: #011627;
	--code-text: #d6deeb;

	--green-5: color-mix(in srgb, var(--green) 14%, transparent);
	--green-20: color-mix(in srgb, var(--green) 65%, transparent);
	--green-30: color-mix(in srgb, var(--green) 32%, transparent);

	/* Type */
	--font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--font-sans: "Lato", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	--text-xs: 0.9375rem;
	--text-sm: 1.03rem;
	--text-base: clamp(1.25rem, 1.2rem + 0.23vw, 1.375rem);
	--text-md: clamp(1.5625rem, 1.48rem + 0.41vw, 1.7875rem);
	--text-lg: clamp(1.875rem, 1.74rem + 0.68vw, 2.25rem);
	--text-xl: clamp(2.3rem, 2.15rem + 0.75vw, 2.75rem);
	--text-2xl: clamp(2.6rem, 2.3rem + 1.5vw, 3.5rem);
	--text-3xl: clamp(3rem, 2.3rem + 3.4vw, 5.11rem);

	/* Space (multiples of 5.5px) */
	--space-3xs: 0.34375rem;
	--space-2xs: 0.6875rem;
	--space-xs: 1.03rem;
	--space-s: 1.375rem;
	--space-m: 2.0625rem;
	--space-l: 2.75rem;
	--space-xl: 4.125rem;

	--radius: 0.4rem;
	--page-pad: clamp(1.25rem, 2.5vw, 2.0625rem);
	--page-max: 79.25rem;
	--prose: 50rem;

	--shadow-sm: 0 1px 2px -1px rgba(40, 10, 0, 0.05), 3px 5px 24px -10px rgba(40, 10, 0, 0.08);
	--shadow-lg: 2px 3px 6px -3px rgba(30, 10, 10, 0.06), 8px 9px 20px -6px rgba(30, 10, 10, 0.09), 30px 30px 70px -10px rgba(30, 10, 10, 0.16);

	--ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);
	--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
	:root {
		--cream: #1c1b18;
		--light-cream: #2a2925;
		--tinted-cream: #3a3934;
		--surface: #252420;
		--black: #ebe8e0;
		--gray-800: #d5d2c9;
		--gray-600: #a6a39b;
		--gray-400: #7d7b75;
		--gray-300: #55534e;
		--gray-200: #403f3a;
		--gray-100: #383732;
		--green: #aab17c;
		--green-deep: #c5cb9b;
		--code-bg: #161512;

		--shadow-sm: 0 1px 2px -1px rgba(0, 0, 0, 0.3), 3px 5px 24px -10px rgba(0, 0, 0, 0.4);
		--shadow-lg: 2px 3px 6px -3px rgba(0, 0, 0, 0.3), 8px 9px 20px -6px rgba(0, 0, 0, 0.4), 30px 30px 70px -10px rgba(0, 0, 0, 0.5);
	}
}

/* ---------------------------------------------------------------
   3. Base
   --------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--cream);
	color: var(--black);
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	line-height: 1.5;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
figure,
blockquote,
pre,
table {
	margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 400;
}

img,
video,
iframe,
svg {
	max-width: 100%;
}

img,
video {
	height: auto;
}

a {
	color: var(--green-deep);
	text-decoration: none;
	transition: color 0.18s ease;
}

a:hover {
	color: var(--green);
}

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

::selection {
	background: var(--green-30);
}

[hidden] {
	display: none !important;
}

.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 !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	left: 1rem;
	top: 1rem;
	z-index: 100;
	padding: 0.6rem 1rem;
	border-radius: var(--radius);
	background: var(--green-deep);
	color: #27231e;
}

.icon {
	display: inline-block;
	flex: none;
	width: 1em;
	height: 1em;
	fill: currentColor;
	vertical-align: -0.125em;
}

.icon--stroke {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Small uppercase label, used for eyebrows and back links. */
.eyebrow {
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Underline that draws in from the left on hover. */
.hover-link {
	padding-bottom: 4px;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size 0.3s var(--ease-out), color 0.18s ease;
}

.hover-link:hover,
.hover-link:focus-visible {
	background-size: 100% 1px;
}

/* ---------------------------------------------------------------
   4. Site header and navigation
   --------------------------------------------------------------- */

.site-header {
	position: relative;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-s);
	min-height: 4.8rem;
	padding: var(--space-xs) var(--space-m) var(--space-xs) var(--page-pad);
}

.site-brand {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: var(--space-s);
	min-width: 0;
}

/* The site title beside the logo, kept to the logo's height (3.5rem).
   On the home page it is the h1; elsewhere it is a link. */
.site-brand__title,
.site-brand__name {
	max-width: none;
	margin: 0;
	min-width: 0;
	color: var(--black);
	font-family: var(--font-serif);
	font-size: var(--text-lg);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-decoration: none;
}

.site-brand__title b,
.site-brand__name b {
	font-weight: 700;
}

.site-brand__name:hover {
	color: var(--gray-800);
}

.site-logo {
	display: inline-flex;
	flex: none;
	align-items: center;
	color: var(--black);
}

.site-logo img {
	display: block;
	width: auto;
	height: 3.5rem;
	transition: transform 0.4s var(--ease-spring);
}

.site-logo:hover img {
	transform: scale(1.04);
}

/* The leaves are lifted a little so they stay clear on the dark paper. */
@media (prefers-color-scheme: dark) {
	.site-logo img {
		filter: brightness(1.1);
	}
}

.site-nav__list {
	display: flex;
	align-items: center;
	gap: 0 var(--space-s);
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list > li {
	position: relative;
}

.site-nav__list > li > a {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.1rem;
	color: var(--gray-800);
	font-size: var(--text-xs);
}

.site-nav__list > li > a:hover,
.site-nav__list > .current-menu-item > a,
.site-nav__list > .current_page_item > a {
	color: var(--green-deep);
}

.site-nav__list > .menu-item-has-children > a::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	margin: -0.25rem 0.25rem 0 0.75rem;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.18s ease;
}

.site-nav__list > .menu-item-has-children:hover > a::after,
.site-nav__list > .menu-item-has-children:focus-within > a::after {
	transform: translateY(0.25rem) rotate(225deg);
}

/* Dropdown panel */
.site-nav .sub-menu {
	position: absolute;
	top: 100%;
	right: -1rem;
	display: grid;
	grid-template-columns: repeat(2, minmax(13rem, 1fr));
	gap: 0.25rem;
	width: max-content;
	max-width: min(36rem, 90vw);
	margin: 0;
	padding: 0.6rem;
	list-style: none;
	border: 1px solid var(--gray-100);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.18s ease, transform 0.24s var(--ease-out), visibility 0.18s;
}

.site-nav .menu-item-has-children:hover > .sub-menu,
.site-nav .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.site-nav .sub-menu a {
	display: block;
	padding: var(--space-xs);
	border: 1px solid transparent;
	border-radius: var(--radius);
	color: var(--gray-800);
	font-size: var(--text-sm);
	font-weight: 700;
	transition: transform 0.24s var(--ease-spring), background-color 0.18s, border-color 0.18s;
}

.site-nav .sub-menu a:hover,
.site-nav .sub-menu a:focus-visible {
	border-color: var(--gray-100);
	background: var(--light-cream);
	transform: translateY(-1px);
}

.menu-item__desc {
	display: block;
	margin-top: var(--space-3xs);
	color: var(--gray-600);
	font-size: var(--text-xs);
	font-weight: 400;
	line-height: 1.3;
}

.site-nav__list > li > a .menu-item__desc {
	display: none;
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin-right: -0.5rem;
	padding: 0;
	border: 0;
	border-radius: var(--radius);
	background: none;
	color: var(--black);
	cursor: pointer;
}

.nav-toggle .icon {
	width: 1.6rem;
	height: 1.6rem;
}

@media (max-width: 47.99em) {
	.site-header {
		flex-wrap: wrap;
		padding-right: var(--space-s);
	}

	/* The site title shrinks with the screen so it stays on one line.
	   It is about 9 em wide; the logo, gaps, padding and menu button
	   take about 180px of the row. */
	.site-brand {
		gap: 0.75rem;
	}

	.site-brand__title,
	.site-brand__name {
		font-size: min(var(--text-lg), calc((100vw - 182px) / 9.3));
		white-space: nowrap;
	}

	/* Without a menu button the title can use the whole row:
	   only the logo, the gap and the side padding (about 135px) remain. */
	.site-header--no-menu .site-brand__title,
	.site-header--no-menu .site-brand__name {
		font-size: min(var(--text-lg), calc((100vw - 136px) / 9.1));
	}

	.js .nav-toggle {
		display: inline-flex;
	}

	.site-nav {
		flex-basis: 100%;
	}

	.js .site-nav:not(.is-open) {
		display: none;
	}

	.site-nav__list {
		flex-direction: column;
		align-items: stretch;
		padding: var(--space-2xs) 0 var(--space-s);
	}

	.site-nav__list > li > a {
		padding: 0.6rem 0.25rem;
		font-size: var(--text-base);
		font-family: var(--font-serif);
	}

	.site-nav__list > .menu-item-has-children > a::after {
		display: none;
	}

	.site-nav .sub-menu {
		position: static;
		grid-template-columns: 1fr;
		width: auto;
		max-width: none;
		padding: 0 0 0 var(--space-s);
		border: 0;
		background: none;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.site-nav .sub-menu a {
		padding: 0.45rem 0.25rem;
		font-weight: 400;
	}

	.site-nav .sub-menu .menu-item__desc {
		display: none;
	}
}

/* ---------------------------------------------------------------
   5. Page headers: home hero and listing titles
   --------------------------------------------------------------- */

.container {
	width: 100%;
	max-width: calc(var(--page-max) + 2 * var(--page-pad));
	margin-inline: 0;
	padding-inline: var(--page-pad);
}

.page-header {
	margin-top: var(--space-m);
}

.hero {
	margin-top: var(--space-s);
}

.title1 {
	max-width: 75rem;
	margin-bottom: var(--space-s);
	font-family: var(--font-serif);
	font-size: var(--text-3xl);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.012em;
	text-wrap: balance;
}

.title1 b {
	font-weight: 700;
}

.hero__intro {
	max-width: 62rem;
	margin: var(--space-xs) 0 var(--space-2xs);
	color: var(--gray-800);
	font-size: var(--text-md);
	font-weight: 300;
	line-height: 1.6;
}

.hero__intro a {
	color: var(--green);
	font-weight: 400;
}

.page-header__top {
	display: flex;
	align-items: baseline;
	gap: var(--space-s);
	margin-bottom: 0.15rem;
}

.count {
	color: var(--green);
	font-family: var(--font-serif);
	font-size: 1.19rem;
	font-weight: 400;
	font-variant-numeric: lining-nums;
}

.page-header__desc {
	max-width: 62rem;
	color: var(--gray-800);
	font-family: var(--font-serif);
	font-size: var(--text-lg);
	font-weight: 250;
	line-height: 1.4;
}

.page-header__desc p {
	margin: 0;
}

/* Orchestrated entrance for header content, once per page load. */
@media (prefers-reduced-motion: no-preference) {
	.cascade > * {
		animation: maggie-rise 0.7s var(--ease-out) both;
	}

	.cascade > *:nth-child(2) {
		animation-delay: 0.08s;
	}

	.cascade > *:nth-child(3) {
		animation-delay: 0.16s;
	}

	.cascade > *:nth-child(4) {
		animation-delay: 0.24s;
	}
}

@keyframes maggie-rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

/* ---------------------------------------------------------------
   6. The garden: archive column on the left, essay cards on the right
   --------------------------------------------------------------- */

.garden {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2.17fr);
	gap: var(--space-xl);
	align-items: start;
	margin-top: var(--space-m);
	margin-bottom: var(--space-xl);
}

.section-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: var(--space-3xs);
	color: var(--gray-800);
	font-family: var(--font-sans);
	font-size: var(--text-base);
	font-weight: 700;
	line-height: 1.5;
}

.section-header a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: inherit;
}

.section-header .icon {
	width: 0.95em;
	height: 0.95em;
	transition: transform 0.24s var(--ease-out);
}

.section-header a:hover {
	color: var(--green-deep);
}

.section-header a:hover .icon {
	transform: translateX(4px);
}

.essays-section > .section-header {
	margin-bottom: var(--space-s);
}

/* --- Essay cards --- */

/* One column of cards: cover on the left, text on the right. */
.essays-grid {
	display: flex;
	flex-direction: column;
	gap: var(--space-2xs);
}

.essay-card {
	display: flex;
	align-items: center;
	gap: var(--space-s);
	padding: var(--space-s);
	border: 1px solid var(--tinted-cream);
	border-radius: var(--radius);
	background: var(--light-cream);
	box-shadow: var(--shadow-sm);
	color: var(--gray-800);
	transition: transform 0.24s var(--ease-spring), box-shadow 0.18s ease;
}

.essay-card:hover,
.essay-card:focus-visible {
	box-shadow: var(--shadow-lg);
	color: var(--gray-800);
	transform: translateY(-3px);
}

.essay-card__body {
	flex: 1;
	min-width: 0;
}

.essay-card__image {
	flex: none;
	width: 11rem;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: calc(var(--radius) / 2);
}

.essay-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.24s var(--ease-spring);
}

.essay-card:hover .essay-card__image img {
	transform: scale(1.02);
}

.essay-card__title {
	margin: 0 0 var(--space-2xs);
	font-family: var(--font-serif);
	font-size: var(--text-md);
	line-height: 1.25;
	transition: color 0.18s ease;
}

.essay-card:hover .essay-card__title {
	color: var(--green-deep);
}

.essay-card__desc {
	margin-top: 4px;
	color: var(--gray-600);
	font-size: var(--text-xs);
	line-height: 1.5;
}

.essay-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 6px;
	color: var(--gray-600);
	font-size: var(--text-xs);
	line-height: 1.5;
}

.essay-card__meta .icon {
	margin: 0 var(--space-2xs);
	color: var(--green);
}

.sticky .essay-card {
	border-color: var(--green-30);
}

/* ---------------------------------------------------------------
   7. The essay archive
   One component, two looks:
   .archive--list  wide column on the home page and listings
   .rail           narrow rail beside a single essay
   --------------------------------------------------------------- */

.archive-group > summary {
	list-style: none;
	cursor: pointer;
}

.archive-group > summary::-webkit-details-marker {
	display: none;
}

.archive-group__chevron {
	width: 0.85rem;
	height: 0.85rem;
	transition: transform 0.18s ease;
}

.archive-group:not([open]) .archive-group__chevron {
	transform: rotate(180deg);
}

.archive__filter {
	display: block;
	width: 100%;
	padding: 0.45rem 0;
	border: 0;
	border-bottom: 1px solid var(--gray-200);
	border-radius: 0;
	background: transparent;
	color: var(--black);
	font: inherit;
	font-size: var(--text-xs);
}

.archive__filter::placeholder {
	color: var(--gray-600);
	opacity: 1;
}

.archive__filter:focus-visible {
	outline: none;
	border-bottom-color: var(--green);
}

.archive__year {
	color: var(--gray-600);
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	font-variant-numeric: lining-nums;
}

.archive__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.archive__empty {
	color: var(--gray-600);
	font-size: var(--text-xs);
}

/* --- List look --- */

.archive--list {
	position: sticky;
	top: var(--space-s);
	max-height: calc(100vh - 2 * var(--space-s));
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--gray-300) transparent;
	padding-right: var(--space-2xs);
}

.admin-bar .archive--list,
.admin-bar .rail {
	top: calc(32px + var(--space-s));
	max-height: calc(100vh - 32px - 2 * var(--space-s));
}

.archive--list .archive-group > summary {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	margin-bottom: var(--space-s);
	color: var(--gray-800);
	font-size: var(--text-base);
	font-weight: 700;
	line-height: 1.5;
}

.archive--list .archive-group__dot,
.archive--list .archive-group__chevron {
	display: none;
}

.archive--list .archive__filter {
	margin-bottom: var(--space-2xs);
}

.archive--list .archive__year {
	margin-top: var(--space-s);
}

.archive--list .archive__group:first-of-type .archive__year {
	margin-top: var(--space-2xs);
}

.archive--list .archive__list li {
	border-bottom: 1px solid var(--gray-200);
}

.archive--list .archive__list a {
	display: flex;
	gap: var(--space-xs);
	padding: var(--space-xs) 0 1.2rem;
	color: var(--black);
	font-family: var(--font-serif);
	font-size: var(--text-base);
	line-height: 1.3;
	transition: color 0.18s ease, transform 0.3s var(--ease-out);
}

.archive--list .archive__list a:hover {
	color: var(--green-deep);
	transform: translateX(3px);
}

.archive--list .archive__list .icon {
	width: 1.375rem;
	height: 1.375rem;
	margin-top: 0.15rem;
	color: var(--green);
}

/* --- Rail look --- */

.rail {
	position: sticky;
	top: 1rem;
	align-self: start;
	width: min(100% - 3.2rem, 17.6rem);
	max-height: calc(100vh - 2rem);
	margin-left: 1.2rem;
	padding: 0.5rem 0.5rem 2rem 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--gray-200) transparent;
}

.rail .archive-group + .archive-group {
	margin-top: var(--space-xs);
}

.rail .archive-group > summary {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.6rem var(--space-s) 0.6rem 0.55rem;
	border-radius: 0.2rem;
	color: var(--gray-800);
	font-size: 0.96rem;
	font-weight: 700;
	line-height: 1.5;
}

.rail .archive-group > summary:hover {
	color: var(--green-deep);
}

.archive-group__dot {
	flex: none;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: var(--green);
}

.rail .count {
	margin-left: auto;
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	font-weight: 400;
}

.rail .archive__body {
	padding-left: 1.4rem;
}

.rail .archive__filter {
	margin-bottom: var(--space-2xs);
}

.rail .archive__year {
	margin: var(--space-xs) 0 var(--space-3xs);
}

.rail .archive__group:first-of-type .archive__year {
	margin-top: var(--space-3xs);
}

.rail .archive__list a {
	display: block;
	position: relative;
	padding: 0.3rem 0;
	color: var(--gray-600);
	font-size: var(--text-sm);
	line-height: 1.4;
}

.rail .archive__list .icon {
	display: none;
}

.rail .archive__list a:hover {
	color: var(--green-deep);
}

.rail .archive__list a[aria-current] {
	color: var(--green-deep);
}

.rail .archive__list a[aria-current]::before {
	content: "";
	position: absolute;
	left: -0.95rem;
	top: 0.78rem;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: var(--green);
}

/* ---------------------------------------------------------------
   8. Single essay
   --------------------------------------------------------------- */

.essay-grid {
	display: grid;
	grid-template-columns: minmax(16.5rem, 1fr) minmax(0, var(--prose)) minmax(0, 1fr);
}

.essay-grid > * {
	grid-column: 2;
	min-width: 0;
}

.essay-grid > .rail {
	grid-column: 1;
	grid-row: 1 / span 20;
}

.essay-header {
	margin-top: var(--space-m);
	padding-bottom: var(--space-l);
}

.essay-title {
	margin-bottom: var(--space-s);
	font-family: var(--font-serif);
	font-size: var(--text-2xl);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.012em;
	text-wrap: balance;
}

.essay-dek {
	margin-top: var(--space-s);
	color: var(--gray-600);
	font-size: var(--text-md);
	font-weight: 300;
	line-height: 1.4;
}

.essay-dek p {
	margin: 0;
}

.essay-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-2xs) var(--space-m);
	margin-top: var(--space-m);
	padding-top: var(--space-xs);
	border-top: 1px solid var(--gray-200);
	font-size: var(--text-xs);
	line-height: 1.5;
}

.essay-dates {
	color: var(--gray-600);
	letter-spacing: 0.01em;
}

.essay-dates span {
	display: block;
}

/* White reading surface that fades in from the cream header. */
.prose-wrapper {
	background: linear-gradient(to bottom, var(--cream), var(--surface) 7rem);
	padding-bottom: calc(var(--space-xl) + var(--space-l));
}

.essay-cover {
	margin-bottom: var(--space-m);
}

.essay-cover img {
	display: block;
	width: 100%;
	border: 1px solid var(--tinted-cream);
	border-radius: var(--radius);
}

/* --- Long-form prose --- */

.prose {
	color: var(--black);
	font-family: var(--font-serif);
	font-size: var(--text-base);
	line-height: 1.85;
	font-variant-numeric: oldstyle-nums;
}

.prose > * {
	margin-bottom: var(--space-m);
}

.prose > *:last-child {
	margin-bottom: 0;
}

.single-post.has-drop-cap .prose > p:first-of-type::first-letter {
	float: left;
	margin: 0.13em 0.09em 0 0;
	font-size: 3.75em;
	font-weight: 500;
	line-height: 0.72;
	color: var(--gray-800);
}

.prose a {
	position: relative;
	padding-bottom: 1px;
	border-bottom: 1px solid var(--green-20);
	color: var(--green);
	transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.prose a:hover {
	border-bottom-color: var(--green);
	background: var(--green-5);
}

.prose h2 {
	margin: var(--space-xl) 0 var(--space-m);
	color: var(--gray-800);
	font-size: var(--text-xl);
	font-weight: 250;
	line-height: 1.3;
	letter-spacing: -0.005em;
	text-wrap: balance;
	scroll-margin-top: 1.5rem;
}

.prose h3 {
	margin: var(--space-l) 0 var(--space-s);
	color: var(--gray-800);
	font-size: var(--text-md);
	font-weight: 400;
	line-height: 1.3;
	scroll-margin-top: 1.5rem;
}

.prose h4,
.prose h5,
.prose h6 {
	margin: var(--space-m) 0 var(--space-2xs);
	color: var(--gray-800);
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.prose ul,
.prose ol {
	padding-left: 1.5em;
}

.prose li {
	margin-bottom: var(--space-2xs);
	padding-left: 0.2em;
}

.prose li > ul,
.prose li > ol {
	margin-top: var(--space-2xs);
}

.prose li::marker {
	color: var(--green);
	font-family: var(--font-sans);
	font-size: 0.8em;
}

.prose strong,
.prose b {
	font-weight: 650;
}

/* Quotes: a quiet literary indent. A large green quotation mark hangs in
   the indent; the quoted words are set in the serif italic, a touch larger
   and softer than the essay text; the source follows a short green rule. */
.prose blockquote {
	position: relative;
	margin-block: var(--space-l);
	padding: 0 0 0 3rem;
	border: 0;
	color: var(--gray-800);
	font-size: 1.06em;
	font-style: italic;
	line-height: 1.7;
	font-variant-numeric: oldstyle-nums;
}

.prose blockquote::before {
	content: "\201C";
	position: absolute;
	top: -0.08em;
	left: -0.06em;
	color: var(--green);
	font-family: var(--font-serif);
	font-size: 5.2em;
	font-style: normal;
	font-weight: 400;
	line-height: 1;
	pointer-events: none;
}

/* Emphasis inside an italic quote turns upright, as in print. */
.prose blockquote em,
.prose blockquote i {
	font-style: normal;
}

/* "Kártya" quote style and the callout group: a white card. */
.prose blockquote.is-style-maggie-card,
.prose .is-style-maggie-callout {
	margin-inline: -1.6rem;
	padding: 1.75rem 2.1rem;
	border: 1px solid var(--gray-100);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
	color: var(--black);
	font-size: 1em;
	font-style: normal;
	line-height: 1.5;
}

.prose blockquote.is-style-maggie-card::before,
.prose blockquote.is-style-maggie-card cite::before,
.prose blockquote.is-style-maggie-card footer::before {
	content: none;
}

.prose blockquote.is-style-maggie-card em,
.prose blockquote.is-style-maggie-card i {
	font-style: italic;
}

.prose blockquote > * + *,
.prose .is-style-maggie-callout > * + *,
.prose .is-style-maggie-callout > .wp-block-group__inner-container > * + * {
	margin-top: var(--space-xs);
}

.prose blockquote cite,
.prose blockquote footer,
.prose figcaption,
.wp-caption-text,
.gallery-caption {
	display: block;
	color: var(--gray-600);
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	font-style: normal;
	line-height: 1.5;
	font-variant-numeric: lining-nums;
}

.prose blockquote cite,
.prose blockquote footer {
	display: block;
	margin-top: var(--space-xs);
	font-size: var(--text-xs);
	letter-spacing: 0.01em;
}

/* The source follows a short green rule; titles inside it stay italic. */
.prose blockquote cite::before,
.prose blockquote footer::before {
	content: "";
	display: inline-block;
	width: 1.5em;
	height: 1px;
	margin-right: 0.65em;
	background: var(--green);
	vertical-align: 0.32em;
}

.prose blockquote cite em,
.prose blockquote cite i {
	font-style: italic;
}

/* Label style: small green capitals, for callouts and exhibits. */
.prose .is-style-maggie-label {
	color: var(--green);
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	line-height: 1.6;
	letter-spacing: 0.055em;
	text-transform: uppercase;
	font-variant-numeric: lining-nums;
}

.prose blockquote .is-style-maggie-label {
	color: var(--gray-800);
	font-weight: 700;
}

@media (min-width: 68.75em) {
	.prose > .is-style-maggie-callout:first-child {
		margin-top: calc(-1 * var(--space-m));
	}
}

/* Pullquote: a sentence lifted from the essay, set large between two
   hairlines. Upright, so it reads as a statement, not a citation. */
.prose .wp-block-pullquote {
	margin-block: var(--space-l);
	padding: var(--space-m) 0;
	border-block: 1px solid var(--gray-200);
	text-align: left;
}

.prose .wp-block-pullquote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--black);
	font-size: var(--text-lg);
	font-style: normal;
	font-weight: 300;
	line-height: 1.35;
	letter-spacing: -0.005em;
}

.prose .wp-block-pullquote blockquote::before {
	content: none;
}

.prose .wp-block-pullquote blockquote p {
	font-size: inherit;
}

.prose .wp-block-pullquote cite {
	margin-top: var(--space-s);
	font-size: var(--text-xs);
}

.prose hr,
.prose .wp-block-separator {
	width: 100%;
	height: 0;
	margin: var(--space-xl) 0;
	border: 0;
	border-top: 1px solid var(--gray-200);
}

.prose figure {
	margin-inline: 0;
}

.prose img {
	border: 1px solid var(--tinted-cream);
	border-radius: var(--radius);
}

.prose figcaption {
	margin-top: var(--space-2xs);
}

.prose code,
.prose kbd {
	padding: 0.12em 0.38em;
	border-radius: 0.2rem;
	background: color-mix(in srgb, var(--green) 9%, transparent);
	color: var(--gray-800);
	font-family: var(--font-mono);
	font-size: 0.78em;
	font-variant-numeric: lining-nums;
}

.prose pre {
	margin-inline: -1.6rem;
	padding: 1.4rem 1.6rem;
	border-radius: var(--radius);
	background: var(--code-bg);
	color: var(--code-text);
	font-family: var(--font-mono);
	font-size: 0.825em;
	line-height: 1.6;
	overflow-x: auto;
}

.prose pre code {
	padding: 0;
	background: none;
	color: inherit;
	font-size: inherit;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	line-height: 1.5;
	font-variant-numeric: tabular-nums lining-nums;
}

.prose .wp-block-table {
	overflow-x: auto;
}

.prose th,
.prose td {
	padding: var(--space-2xs) var(--space-xs) var(--space-2xs) 0;
	border: 0;
	border-bottom: 1px solid var(--gray-200);
	text-align: left;
	vertical-align: top;
}

.prose th {
	border-bottom-color: var(--gray-400);
	color: var(--gray-800);
	font-weight: 700;
}

.prose sup,
.prose sub {
	line-height: 0;
}

.prose sup.fn a,
.prose .sidenote__number {
	padding: 0 0.3em;
	border: 0;
	color: var(--green);
	font-family: var(--font-sans);
	font-size: 0.8em;
	font-weight: 700;
	font-variant-numeric: lining-nums;
}

.prose .wp-block-footnotes {
	margin-top: var(--space-xl);
	padding-top: var(--space-s);
	border-top: 1px solid var(--gray-200);
	color: var(--gray-600);
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	line-height: 1.5;
}

/* Footnotes become margin notes on wide screens (set up by maggie.js). */
.sidenote {
	display: none;
}

@media (min-width: 87.5em) {
	.has-sidenotes .sidenote {
		display: block;
		float: right;
		clear: right;
		width: 14.5rem;
		margin: 0.4rem -17.5rem var(--space-xs) 0;
		color: var(--gray-600);
		font-family: var(--font-sans);
		font-size: var(--text-xs);
		font-weight: 400;
		font-style: normal;
		line-height: 1.45;
		letter-spacing: 0;
		text-transform: none;
		font-variant-numeric: lining-nums;
	}

	.has-sidenotes .sidenote .sidenote__number {
		padding-left: 0;
		font-size: 0.85em;
	}

	.has-sidenotes .wp-block-footnotes {
		display: none;
	}
}

@media (min-width: 75em) {
	.prose > .alignwide,
	.prose > .alignfull {
		width: calc(100% + 6rem);
		max-width: none;
		margin-inline: -3rem;
	}
}

.alignleft {
	float: left;
	max-width: 50%;
	margin: 0.4rem var(--space-s) var(--space-xs) 0;
}

.alignright {
	float: right;
	max-width: 50%;
	margin: 0.4rem 0 var(--space-xs) var(--space-s);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.prose::after {
	content: "";
	display: block;
	clear: both;
}

.page-links {
	font-family: var(--font-sans);
	font-size: var(--text-sm);
}

/* --- Neighbouring essays --- */

.essay-neighbours {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-2xs);
	margin-top: var(--space-xl);
	margin-inline: -1.6rem;
}

.note-card {
	display: block;
	padding: var(--space-s);
	border: 1px solid var(--tinted-cream);
	border-radius: var(--radius);
	background: var(--light-cream);
	box-shadow: var(--shadow-sm);
	color: var(--gray-800);
	transition: transform 0.24s var(--ease-spring), box-shadow 0.18s ease;
}

.note-card:hover {
	box-shadow: var(--shadow-lg);
	transform: translateY(-3px);
}

.note-card__label {
	display: block;
	color: var(--gray-600);
	font-size: var(--text-xs);
}

.note-card__title {
	display: block;
	margin-top: var(--space-3xs);
	font-family: var(--font-serif);
	font-size: var(--text-base);
	line-height: 1.3;
	transition: color 0.18s ease;
}

.note-card:hover .note-card__title {
	color: var(--green-deep);
}

.essay-neighbours__next {
	grid-column: 2;
}

/* ---------------------------------------------------------------
   9. Responses (comments): a white card that straddles the footer
   --------------------------------------------------------------- */

.responses {
	position: relative;
	z-index: 1;
	width: min(100% - 2 * var(--space-s), 55rem);
	margin: calc(-1 * var(--space-l)) auto calc(-1 * var(--space-l));
	padding: var(--space-l) clamp(1.25rem, 5vw, 5rem);
	border: 1px solid var(--gray-100);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-lg);
}

.responses + .site-footer {
	padding-top: calc(var(--space-xl) + var(--space-l));
}

.responses__title,
.comment-reply-title {
	color: var(--gray-800);
	font-size: var(--text-md);
	font-weight: 300;
	line-height: 1.5;
}

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list {
	margin-top: var(--space-s);
}

.comment-list .children {
	padding-left: var(--space-s);
	border-left: 1px solid var(--gray-200);
}

.comment-body {
	padding: var(--space-xs) 0;
	font-size: var(--text-xs);
	line-height: 1.6;
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 var(--space-xs);
	margin-bottom: var(--space-3xs);
}

.comment-author .avatar {
	display: none;
}

.comment-author .fn {
	color: var(--green);
	font-style: normal;
	font-weight: 700;
}

.comment-author .fn a {
	color: inherit;
}

.comment-author .says {
	display: none;
}

.comment-metadata,
.comment-metadata a,
.reply a,
.comment-awaiting-moderation,
.logged-in-as,
.logged-in-as a,
.comment-notes {
	color: var(--gray-600);
	font-size: 0.8125rem;
}

.comment-content > * + * {
	margin-top: var(--space-2xs);
}

.comment-respond {
	margin-top: var(--space-m);
}

.comment-list + .comment-respond {
	padding-top: var(--space-m);
	border-top: 1px solid var(--gray-200);
}

.comment-form > p {
	margin-top: var(--space-xs);
}

.comment-form label {
	display: block;
	margin-bottom: var(--space-3xs);
	color: var(--gray-800);
	font-size: var(--text-xs);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-field {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--gray-200);
	border-radius: var(--radius);
	background: var(--light-cream);
	color: var(--black);
	font: inherit;
	font-size: var(--text-sm);
}

.comment-form-cookies-consent {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}

.comment-form-cookies-consent label {
	margin: 0;
}

.button,
.search-submit,
.form-submit .submit {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.9rem;
	border: 1px solid var(--gray-200);
	border-radius: 2rem;
	background: var(--light-cream);
	color: var(--gray-800);
	font: inherit;
	font-size: var(--text-xs);
	cursor: pointer;
	transition: border-color 0.18s ease, color 0.18s ease, transform 0.24s var(--ease-spring);
}

.button:hover,
.search-submit:hover,
.form-submit .submit:hover {
	border-color: var(--green-20);
	color: var(--green-deep);
	transform: translateY(-1px);
}

/* ---------------------------------------------------------------
   10. Pagination, search, empty states
   --------------------------------------------------------------- */

.pagination {
	margin-top: var(--space-l);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-3xs) var(--space-xs);
	font-size: var(--text-sm);
	font-variant-numeric: tabular-nums;
}

.pagination .page-numbers {
	color: var(--gray-800);
}

.pagination a.page-numbers:hover {
	color: var(--green-deep);
}

.pagination .page-numbers.current {
	color: var(--green);
	font-weight: 700;
}

.search-form {
	display: flex;
	align-items: center;
	gap: var(--space-2xs);
	max-width: 30rem;
}

.search-form label {
	flex: 1;
}

.notice {
	max-width: 40rem;
	color: var(--gray-800);
	font-size: var(--text-base);
	font-weight: 300;
	line-height: 1.5;
}

.notice > * + * {
	margin-top: var(--space-s);
}

/* ---------------------------------------------------------------
   11. Site footer
   --------------------------------------------------------------- */

.site-footer {
	padding: var(--space-xl) 0;
	background: var(--cream);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
	gap: var(--space-l);
	padding-inline: clamp(1.25rem, 4.5vw, 4rem);
}

.site-footer__heading {
	margin-bottom: var(--space-xs);
	color: var(--black);
	font-family: var(--font-serif);
	font-size: var(--text-md);
	font-weight: 300;
	line-height: 1.5;
}

.social-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-xs) var(--space-s);
	list-style: none;
	margin: var(--space-m) 0 0;
	padding: 0;
}

.social-links a {
	display: block;
	color: var(--gray-400);
	font-size: var(--text-xs);
	transition: color 0.18s ease, transform 0.24s var(--ease-spring);
}

.social-links a:hover {
	color: var(--green-deep);
	transform: translateY(-2px);
}

.social-links .icon {
	display: block;
	width: 1.7rem;
	height: 1.7rem;
}

.site-footer__copyright {
	margin-top: var(--space-xs);
	color: var(--gray-600);
	font-size: var(--text-xs);
}

.footer-menu {
	columns: 2;
	column-gap: var(--space-l);
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menu li {
	break-inside: avoid;
	margin-bottom: var(--space-xs);
}

.footer-menu a {
	color: var(--gray-800);
	font-size: var(--text-sm);
}

.footer-menu a:hover {
	color: var(--green-deep);
}

/* ---------------------------------------------------------------
   12. Smaller screens
   --------------------------------------------------------------- */

/* Essay pages: on tablets and phones the archive list is hidden so the
   essay starts right away. The wide-screen sidebar is unchanged, and the
   home page still shows the list above the cards. */
@media (max-width: 68.74em) {
	.essay-grid > .rail {
		display: none;
	}
}

/* Essay pages: the rail becomes a fold-out row above the text. */
@media (max-width: 68.74em) {
	.essay-grid {
		grid-template-columns: minmax(0, 1fr);
		padding-inline: var(--space-s);
	}

	.essay-grid > *,
	.essay-grid > .rail {
		grid-column: 1;
		grid-row: auto;
		width: 100%;
		max-width: var(--prose);
		margin-inline: auto;
	}

	.rail {
		position: static;
		max-height: none;
		margin-bottom: var(--space-s);
		padding: 0;
		overflow: visible;
	}

	.admin-bar .rail {
		max-height: none;
	}

	.rail .archive-group {
		border-bottom: 1px solid var(--gray-200);
	}

	.rail .archive-group + .archive-group {
		margin-top: 0;
	}

	.rail .archive-group > summary {
		padding: var(--space-xs) 0.25rem;
		font-size: var(--text-sm);
	}

	.rail .archive__body {
		padding: 0 0.25rem var(--space-s) 1.25rem;
	}

	.prose blockquote.is-style-maggie-card,
	.prose .is-style-maggie-callout,
	.prose pre,
	.essay-neighbours {
		margin-inline: 0;
	}

	.prose blockquote.is-style-maggie-card,
	.prose .is-style-maggie-callout {
		padding: var(--space-s);
	}

	.prose blockquote {
		padding-left: 2.2rem;
	}

	.prose blockquote::before {
		font-size: 4em;
	}
}

/* Listings: archive folds away above the cards. */
@media (max-width: 61.99em) {
	.garden {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--space-m);
	}

	.archive--list {
		position: static;
		max-height: none;
		padding: 0;
		overflow: visible;
		border-block: 1px solid var(--gray-200);
	}

	.admin-bar .archive--list {
		max-height: none;
	}

	.archive--list .archive-group > summary {
		margin: 0;
		padding: var(--space-xs) 0;
	}

	.archive--list .archive-group__chevron {
		display: block;
		margin-left: auto;
		align-self: center;
	}

	.archive--list .archive__list li:last-child {
		border-bottom: 0;
	}

	.site-footer__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 35.99em) {
	.essay-card {
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-2xs);
	}

	.essay-card__image {
		width: 100%;
	}

	.essay-neighbours {
		grid-template-columns: minmax(0, 1fr);
	}

	.essay-neighbours__next {
		grid-column: 1;
	}

	.prose {
		line-height: 1.7;
	}

	.hero {
		margin-top: var(--space-l);
	}
}

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

@media print {
	.site-header,
	.rail,
	.archive--list,
	.site-footer,
	.essay-neighbours,
	.responses {
		display: none;
	}

	.essay-grid {
		display: block;
	}

	.prose-wrapper {
		background: none;
	}
}
