/*
Theme Name: Chronicle
Theme URI: https://nopbn.com
Author: Chronicle
Author URI: https://nopbn.com
Description: A WordPress theme for news and blog sites with a modern editorial look: a large hero, a magazine grid, oversized typography and a dark mode. It is built on the standard WordPress template structure (header, footer, index, single, page, archive, search, 404, comments, sidebar) yet ships almost no JavaScript. The mobile menu, search panel, reading progress bar and scroll animations are all pure CSS. No external webfonts and no libraries, so it loads very fast.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
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: chronicle
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, custom-colors, editor-style
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	/* Ink & paper */
	--ink: #100f0e;
	--paper: #f6f5f1;
	--surface: #fffefb;
	--muted: #6b6762;
	--rule: #e2e0d8;
	--rule-strong: #100f0e;

	/* Accent */
	--accent: #1f3df0;
	--accent-soft: #e8ebff;
	--highlight: #ffe14d;
	--pill: #ff5c35;
	--on-accent: #ffffff;

	/* Shape */
	--r-lg: 20px;
	--r: 14px;
	--r-sm: 8px;

	/* Sizing */
	--w-page: 1280px;
	--w-text: 68ch;
	--header-h: 68px;
	--gap: clamp(20px, 3vw, 40px);

	/* Typography: system stack, zero network requests */
	--font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-read: ui-serif, Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
	--font-mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", Menlo, monospace;

	--shadow: 0 10px 30px -12px rgba(16, 15, 14, .18);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #f3f1ec;
		--paper: #0e0e10;
		--surface: #17171a;
		--muted: #9d9a94;
		--rule: #2a2a30;
		--rule-strong: #f3f1ec;
		--accent: #8f9dff;
		--accent-soft: #1c1f3d;
		--highlight: #ffe14d;
		--pill: #ff6a45;
		--on-accent: #0e0e10;
		--shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
	}
}
:root[data-theme="dark"] {
	--ink: #f3f1ec;
	--paper: #0e0e10;
	--surface: #17171a;
	--muted: #9d9a94;
	--rule: #2a2a30;
	--rule-strong: #f3f1ec;
	--accent: #8f9dff;
	--accent-soft: #1c1f3d;
	--highlight: #ffe14d;
	--pill: #ff6a45;
	--on-accent: #0e0e10;
	--shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-ui);
	font-size: 17px;
	line-height: 1.65;
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--font-ui);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -.035em;
	text-wrap: balance;
}

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

hr, .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 3em 0;
}

::selection { background: var(--highlight); color: #100f0e; }

.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;
	word-wrap: normal;
}
.screen-reader-text:focus {
	clip: auto; clip-path: none;
	width: auto; height: auto;
	top: 10px; left: 10px; z-index: 100000;
	padding: 12px 22px;
	background: var(--surface);
	border-radius: var(--r-sm);
	box-shadow: var(--shadow);
	font-weight: 600;
}

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

.wrap {
	width: 100%;
	max-width: var(--w-page);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 48px);
}

/* Small editorial-style label */
.kicker {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
}

/* ==========================================================================
   3. Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: color-mix(in srgb, var(--paper) 82%, transparent);
	backdrop-filter: blur(16px) saturate(170%);
	-webkit-backdrop-filter: blur(16px) saturate(170%);
	border-bottom: 1px solid transparent;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* The header rule appears once the page is scrolled; pure CSS */
@supports (animation-timeline: scroll()) {
	.site-header {
		animation: header-rule steps(2, jump-none) both;
		animation-timeline: scroll(root block);
		animation-range: 4px 60px;
	}
	@keyframes header-rule {
		to { border-bottom-color: var(--rule); }
	}
}

.header-inner {
	display: flex;
	align-items: center;
	gap: clamp(12px, 3vw, 36px);
	height: var(--header-h);
}

/* Branding */
.site-branding { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.site-branding .custom-logo { max-height: 36px; width: auto; }
.site-title {
	margin: 0;
	font-size: 1.22rem;
	font-weight: 800;
	letter-spacing: -.045em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.site-title a::after {
	content: "";
	display: inline-block;
	width: 6px; height: 6px;
	margin-left: 3px;
	border-radius: 50%;
	background: var(--pill);
	vertical-align: baseline;
}
.site-description { display: none; }

/* Nav */
.main-navigation > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.main-navigation li { position: relative; }
.main-navigation a {
	display: block;
	padding: 7px 13px;
	border-radius: 999px;
	font-size: .94rem;
	font-weight: 550;
	color: var(--muted);
	transition: color .18s, background-color .18s;
}
.main-navigation a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a { color: var(--ink); background: var(--accent-soft); }

.main-navigation .sub-menu {
	list-style: none;
	margin: 0;
	padding: 6px;
	position: absolute;
	top: calc(100% + 6px); left: 0;
	min-width: 212px;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--r);
	box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .18s, transform .18s, visibility .18s;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-navigation .sub-menu a { border-radius: var(--r-sm); }
.main-navigation .sub-menu .sub-menu { top: -6px; left: calc(100% + 4px); }
.main-navigation .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: .34em; height: .34em;
	margin-left: .45em;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

/* Icon buttons */
.header-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 38px; height: 38px;
	padding: 0;
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
	transition: border-color .18s, color .18s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

/* Hidden checkboxes that drive the menu and search (still keyboard focusable) */
.toggle-input {
	position: absolute;
	width: 38px; height: 38px;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}
.toggle-input:focus-visible + .icon-btn { outline: 2px solid var(--accent); outline-offset: 3px; }
.toggle-wrap { position: relative; display: inline-grid; }

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
/* The theme toggle is only useful when JS runs */
.no-js .theme-toggle { display: none; }

/* Search panel: opened by a checkbox, no JS */
.header-search {
	position: absolute;
	inset-inline: 0;
	top: 100%;
	padding: 18px 0 22px;
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
	box-shadow: var(--shadow);
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	visibility: hidden;
	transition: grid-template-rows .22s, opacity .18s, visibility .22s, padding .22s;
}
.header-search > * { overflow: hidden; }
.site-header:has(#chronicle-search-toggle:checked) .header-search {
	grid-template-rows: 1fr;
	opacity: 1;
	visibility: visible;
}

/* Lock page scrolling while the full-screen menu is open */
body:has(#chronicle-nav-toggle:checked) { overflow: hidden; }
@media (min-width: 961px) {
	body:has(#chronicle-nav-toggle:checked) { overflow: visible; }
}

/* Mobile menu */
.menu-toggle-wrap { display: none; }

@media (max-width: 960px) {
	.menu-toggle-wrap { display: inline-grid; }

	/* Note: .site-header uses backdrop-filter, which makes it the containing
	   block for positioned children. The panel uses absolute, not fixed. */
	.main-navigation {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		height: calc(100dvh - var(--header-h));
		z-index: 55;
		padding: 20px clamp(16px, 4vw, 48px) 60px;
		background: var(--paper);
		overflow-y: auto;
		overscroll-behavior: contain;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity .2s, transform .2s, visibility .2s;
	}
	.admin-bar .main-navigation { height: calc(100dvh - var(--header-h) - 46px); }

	.site-header:has(#chronicle-nav-toggle:checked) .main-navigation {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.main-navigation > ul { flex-direction: column; align-items: stretch; gap: 0; }
	.main-navigation li { border-bottom: 1px solid var(--rule); }
	.main-navigation a {
		padding: 14px 2px;
		border-radius: 0;
		font-size: 1.18rem;
		font-weight: 700;
		letter-spacing: -.02em;
		color: var(--ink);
	}
	.main-navigation a:hover { background: none; }
	.main-navigation .current-menu-item > a { background: none; color: var(--accent); }
	.main-navigation .sub-menu {
		position: static;
		opacity: 1; visibility: visible; transform: none;
		border: 0; box-shadow: none; background: none;
		min-width: 0; padding: 0 0 8px 16px;
	}
	.main-navigation .sub-menu a { font-size: 1rem; font-weight: 500; color: var(--muted); padding: 9px 2px; }
	.main-navigation .sub-menu li { border: 0; }
	.main-navigation .menu-item-has-children > a::after { display: none; }
}

/* Fallback where :has() is unsupported: the menu becomes a scrollable row */
@supports not (selector(:has(*))) {
	@media (max-width: 960px) {
		.menu-toggle-wrap { display: none; }
		.main-navigation {
			position: static; inset: auto;
			opacity: 1; visibility: visible; transform: none;
			padding: 0; overflow-x: auto; background: none;
		}
		.main-navigation > ul { flex-direction: row; }
		.main-navigation a { font-size: .94rem; padding: 7px 13px; white-space: nowrap; }
		.main-navigation li { border: 0; }
	}
	.header-search { position: static; opacity: 1; visibility: visible; grid-template-rows: 1fr; box-shadow: none; }
	.search-toggle-wrap { display: none; }
}

/* Reading progress bar: scroll-driven, no JS */
.reading-progress { display: none; }
@supports (animation-timeline: scroll()) {
	body.single .reading-progress {
		display: block;
		position: fixed;
		top: 0; left: 0;
		height: 3px;
		width: 100%;
		transform-origin: 0 50%;
		scale: 0 1;
		z-index: 70;
		background: linear-gradient(90deg, var(--accent), var(--pill));
		animation: progress linear both;
		animation-timeline: scroll(root block);
	}
	.admin-bar .reading-progress { top: 32px; }
	@keyframes progress { to { scale: 1 1; } }
}

/* ==========================================================================
   4. Page frame
   ========================================================================== */
.site-content { display: block; }
.site-main { padding-block: clamp(32px, 5vw, 64px) clamp(56px, 8vw, 104px); }

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 312px;
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}
.no-sidebar .layout { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1080px) { .layout { grid-template-columns: minmax(0, 1fr); } }

/* Editorial-style section heading */
.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-top: 14px;
	margin-bottom: 28px;
	border-top: 2px solid var(--rule-strong);
}
.section-head h2 { font-size: clamp(1.1rem, 2vw, 1.45rem); letter-spacing: -.03em; }
.section-head .more-link { font-size: .88rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.section-head .more-link:hover { color: var(--accent); }

/* ==========================================================================
   5. Hero (homepage)
   ========================================================================== */
.hero {
	position: relative;
	margin-bottom: clamp(48px, 7vw, 88px);
}
.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

.hero-lead { position: relative; }
.hero-figure {
	display: block;
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--r-lg);
	background:
		radial-gradient(90% 120% at 12% 10%, var(--accent-soft), transparent 60%),
		linear-gradient(140deg, color-mix(in srgb, var(--pill) 18%, transparent), transparent 55%),
		var(--surface);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-kicker { margin: 18px 0 0; }
.hero-kicker a:hover { color: var(--accent); }
.hero-lead .entry-title {
	margin: 14px 0 16px;
	font-size: clamp(2rem, 4.6vw, 3.4rem);
}
.hero-post > .hero-figure + .entry-title { margin-top: 22px; }
.hero-lead .entry-title a:hover { color: var(--accent); }
.hero-lead .excerpt { font-size: 1.08rem; color: var(--muted); max-width: 60ch; margin-bottom: 18px; }

/* Numbered list beside the hero */
.hero-list { display: grid; gap: 0; }
.hero-list .section-head { margin-bottom: 4px; }
.hero-item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 14px;
	padding: 18px 0;
	border-bottom: 1px solid var(--rule);
	counter-increment: hero;
}
.hero-item:last-child { border-bottom: 0; }
.hero-item::before {
	content: counter(hero, decimal-leading-zero);
	font-size: .82rem;
	font-weight: 800;
	letter-spacing: .04em;
	color: var(--pill);
	padding-top: 2px;
}
.hero-list { counter-reset: hero; }
.hero-item h3 { font-size: 1.04rem; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 6px; }
.hero-item h3 a:hover { color: var(--accent); }

/* ==========================================================================
   6. Post cards
   ========================================================================== */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: clamp(28px, 3.2vw, 44px) var(--gap);
}

.card { display: flex; flex-direction: column; min-width: 0; }

.card-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }

.card-figure {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--r);
	background: linear-gradient(140deg, var(--accent-soft), color-mix(in srgb, var(--pill) 14%, transparent));
	margin-bottom: 16px;
}
.card-figure img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: scale .5s cubic-bezier(.2, .7, .3, 1);
}
.card:hover .card-figure img { scale: 1.045; }

.card-cat {
	position: absolute;
	top: 12px; left: 12px;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	background: var(--pill);
	color: #fff;
}

.card-title {
	font-size: 1.22rem;
	line-height: 1.22;
	margin-bottom: 9px;
}
.card-title a { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.card:hover .card-title a { text-decoration-color: var(--accent); }

.card .excerpt { color: var(--muted); font-size: .95rem; margin-bottom: 14px; }
.card .entry-meta { margin-top: auto; }

/* Sticky post */
.card.sticky .card-title::before {
	content: "★";
	color: var(--pill);
	margin-right: .35em;
}

/* List variant (compact archive / search results) */
.post-list { display: grid; gap: 0; }
.post-list .card {
	flex-direction: row;
	gap: var(--gap);
	align-items: start;
	padding: clamp(22px, 3vw, 32px) 0;
	border-bottom: 1px solid var(--rule);
}
.post-list .card:first-child { padding-top: 0; }
.post-list .card-figure { flex: 0 0 clamp(120px, 24%, 260px); aspect-ratio: 4 / 3; margin-bottom: 0; }
.post-list .card-body { flex: 1 1 auto; min-width: 0; }
.post-list .card-title { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
@media (max-width: 560px) {
	.post-list .card { flex-direction: column; gap: 14px; }
	.post-list .card-figure { flex: none; width: 100%; aspect-ratio: 16 / 9; }
}

/* Meta */
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px 10px;
	font-size: .82rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.entry-meta a { color: inherit; }
.entry-meta a:hover { color: var(--accent); }
.entry-meta .sep { opacity: .45; }
.meta-author { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); }
.meta-author img { width: 24px; height: 24px; border-radius: 50%; }

/* ==========================================================================
   7. Archive header
   ========================================================================== */
.page-head {
	padding: clamp(28px, 4vw, 48px) 0 clamp(24px, 3vw, 36px);
	margin-bottom: clamp(32px, 4vw, 52px);
	border-bottom: 1px solid var(--rule);
}
.page-head .kicker { display: block; margin-bottom: 12px; }
.page-head .page-title { font-size: clamp(2rem, 5vw, 3.4rem); }
.page-head .page-title span { color: var(--muted); }
.archive-description { margin-top: 16px; max-width: 62ch; color: var(--muted); font-size: 1.02rem; }

/* ==========================================================================
   8. Single post & page
   ========================================================================== */
.entry-header-single { max-width: var(--w-text); margin: 0 auto clamp(28px, 4vw, 44px); }
.entry-header-single .cat-links { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.entry-header-single .cat-links a {
	padding: 5px 12px;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	background: var(--accent-soft);
	color: var(--accent);
}
.entry-header-single .entry-title {
	font-size: clamp(2.1rem, 5.4vw, 3.6rem);
	margin-bottom: 20px;
}
.entry-header-single .entry-subtitle {
	font-family: var(--font-read);
	font-size: 1.2rem;
	line-height: 1.5;
	color: var(--muted);
	margin-bottom: 22px;
	max-width: 56ch;
}
.entry-header-single .entry-meta { padding-top: 16px; border-top: 1px solid var(--rule); font-size: .88rem; }

.featured-media {
	margin: 0 auto clamp(36px, 5vw, 60px);
	max-width: 1060px;
}
.featured-media img { width: 100%; border-radius: var(--r-lg); }
.featured-media figcaption { margin-top: 12px; text-align: center; }

/* Body copy: serif, for comfortable long-form reading */
.entry-content {
	max-width: var(--w-text);
	margin-inline: auto;
	font-family: var(--font-read);
	font-size: 1.18rem;
	line-height: 1.72;
	letter-spacing: -.003em;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.1em 0 .7em; }
.entry-content h3 { font-size: clamp(1.25rem, 2.3vw, 1.5rem); margin: 1.9em 0 .6em; }
.entry-content h4 { font-size: 1.15rem; margin: 1.7em 0 .5em; }

.entry-content a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.entry-content a:hover { text-decoration-color: currentColor; }

.entry-content ul, .entry-content ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.entry-content li { margin-bottom: .45em; }
.entry-content li::marker { color: var(--pill); }

.entry-content img, .entry-content .wp-block-image img { border-radius: var(--r); }
.entry-content figure { margin: 2.2em 0; }
figcaption, .wp-caption-text, .wp-element-caption {
	font-family: var(--font-ui);
	font-size: .85rem;
	color: var(--muted);
	margin-top: 10px;
}

blockquote, .wp-block-quote {
	margin: 2.2em 0;
	padding-left: 24px;
	border-left: 3px solid var(--pill);
	font-size: 1.3rem;
	line-height: 1.45;
	font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite, .wp-block-quote cite {
	display: block;
	margin-top: 12px;
	font-family: var(--font-ui);
	font-size: .86rem;
	font-style: normal;
	color: var(--muted);
}
.wp-block-pullquote {
	border: 0;
	border-top: 3px solid var(--rule-strong);
	border-bottom: 3px solid var(--rule-strong);
	padding: 1.8em 0;
	text-align: center;
	font-size: 1.5rem;
}

code, kbd, samp, pre { font-family: var(--font-mono); }
:not(pre) > code {
	font-size: .88em;
	padding: .15em .4em;
	border-radius: 5px;
	background: color-mix(in srgb, var(--ink) 7%, transparent);
}
pre, .wp-block-code {
	background: #121217;
	color: #e7e5e1;
	padding: 22px 24px;
	border-radius: var(--r);
	overflow-x: auto;
	font-size: .9rem;
	line-height: 1.62;
	margin: 0 0 1.6em;
	tab-size: 2;
}
.wp-block-code code { background: none; padding: 0; font-size: inherit; }

table, .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.6em;
	font-family: var(--font-ui);
	font-size: .95rem;
}
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--rule); }
th { font-weight: 700; border-bottom-color: var(--rule-strong); }

.responsive-embed { position: relative; aspect-ratio: 16 / 9; margin: 2.2em 0; }
.responsive-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--r); }

/* WordPress alignment classes */
.alignleft { float: left; margin: .4em 1.8em 1.2em 0; max-width: 50%; }
.alignright { float: right; margin: .4em 0 1.2em 1.8em; max-width: 50%; }
.aligncenter { margin-inline: auto; }
.alignwide { width: min(1060px, 92vw); margin-inline: calc(50% - min(530px, 46vw)); }
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.alignfull img { border-radius: 0; }
.wp-block-button__link, .wp-element-button {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent) !important;
	font-family: var(--font-ui);
	font-weight: 600;
	text-decoration: none !important;
}
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); margin: 2.2em 0; }
.gallery-columns-1 { --cols: 1; } .gallery-columns-2 { --cols: 2; } .gallery-columns-4 { --cols: 4; } .gallery-columns-5 { --cols: 5; }
.gallery-item { margin: 0; }
.gallery img { border-radius: var(--r-sm); width: 100%; }
.bypostauthor { display: block; }
.page-links { font-family: var(--font-ui); display: flex; gap: 6px; align-items: center; margin: 2.5em 0 0; font-size: .9rem; }
.page-links .post-page-numbers {
	display: inline-grid; place-items: center;
	min-width: 36px; height: 36px; padding: 0 10px;
	border: 1px solid var(--rule); border-radius: 999px;
}
.page-links .post-page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Simple inline note */
.entry-content .wp-block-group.is-style-note,
.entry-content .note {
	padding: 20px 22px;
	border-radius: var(--r);
	background: var(--accent-soft);
	border-left: 3px solid var(--accent);
	font-size: 1.02rem;
}

/* ==========================================================================
   9. Post footer
   ========================================================================== */
.entry-footer-single { max-width: var(--w-text); margin: clamp(40px, 5vw, 60px) auto 0; }

.tag-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-links a {
	padding: 6px 13px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	font-size: .84rem;
	color: var(--muted);
}
.tag-links a:hover { border-color: var(--ink); color: var(--ink); }

.author-card {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	max-width: var(--w-text);
	margin: clamp(40px, 5vw, 60px) auto 0;
	padding: 26px;
	border: 1px solid var(--rule);
	border-radius: var(--r-lg);
	background: var(--surface);
}
.author-card img { border-radius: 50%; flex: none; }
.author-card h2 { font-size: 1.08rem; margin-bottom: 6px; }
.author-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.author-card .author-link { font-size: .86rem; font-weight: 600; color: var(--accent); display: inline-block; margin-top: 8px; }

.post-nav { max-width: var(--w-text); margin: clamp(40px, 5vw, 60px) auto 0; }
.post-nav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-nav a {
	display: block;
	height: 100%;
	padding: 20px 22px;
	border: 1px solid var(--rule);
	border-radius: var(--r);
	background: var(--surface);
	transition: border-color .2s, translate .2s;
}
.post-nav a:hover { border-color: var(--ink); translate: 0 -2px; }
.post-nav .nav-next { grid-column: 2; text-align: right; }
.post-nav .meta-nav { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.post-nav .post-title { font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
@media (max-width: 620px) {
	.post-nav .nav-links { grid-template-columns: 1fr; }
	.post-nav .nav-next { grid-column: 1; text-align: left; }
}

.related { margin-top: clamp(56px, 8vw, 96px); }

/* ==========================================================================
   10. Pagination
   ========================================================================== */
.pagination, .comments-pagination { margin-top: clamp(40px, 5vw, 64px); }
.pagination .nav-links, .comments-pagination .nav-links {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.page-numbers {
	display: inline-grid; place-items: center;
	min-width: 42px; height: 42px; padding: 0 14px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	font-size: .94rem; font-weight: 600;
	font-variant-numeric: tabular-nums;
	transition: border-color .18s, background-color .18s, color .18s;
}
a.page-numbers:hover { border-color: var(--ink); }
.page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.page-numbers.dots { border-color: transparent; }

/* ==========================================================================
   11. Sidebar & widgets
   ========================================================================== */
.sidebar { display: grid; gap: 34px; position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 1080px) {
	.sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

.widget { font-size: .96rem; }
.widget-title, .widget .wp-block-heading {
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	padding-top: 12px;
	margin: 0 0 16px;
	border-top: 2px solid var(--rule-strong);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.widget li:last-child { border-bottom: 0; }
.widget li a:hover { color: var(--accent); }
.widget li ul { padding-left: 14px; margin-top: 9px; border-top: 1px solid var(--rule); }
.widget .tagcloud, .wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.widget .tagcloud a, .wp-block-tag-cloud a {
	font-size: .82rem !important;
	padding: 5px 12px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	color: var(--muted);
	text-decoration: none;
}
.widget .tagcloud a:hover, .wp-block-tag-cloud a:hover { border-color: var(--ink); color: var(--ink); }
.widget img { border-radius: var(--r-sm); }
.widget_calendar table { font-size: .86rem; }
.widget_calendar td, .widget_calendar th { padding: 6px; text-align: center; }

/* ==========================================================================
   12. Forms
   ========================================================================== */
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], input[type="date"],
textarea, select {
	width: 100%;
	padding: 12px 16px;
	font-family: inherit;
	font-size: .98rem;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--r-sm);
	transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 150px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

button, input[type="submit"], input[type="button"], .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-family: var(--font-ui);
	font-size: .96rem;
	font-weight: 600;
	color: var(--on-accent);
	background: var(--accent);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: filter .18s, translate .18s;
}
button:hover, input[type="submit"]:hover, .button:hover { filter: brightness(1.08); translate: 0 -1px; }
.icon-btn { background: var(--surface); color: var(--ink); }
.icon-btn:hover { filter: none; translate: 0; }

.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1 1 auto; margin: 0; }
.search-form .search-submit { flex: none; }
.header-search .search-form { max-width: 620px; }

/* ==========================================================================
   13. Comments
   ========================================================================== */
.comments-area {
	max-width: var(--w-text);
	margin: clamp(56px, 7vw, 88px) auto 0;
	padding-top: clamp(32px, 4vw, 48px);
	border-top: 2px solid var(--rule-strong);
}
.comments-title, .comment-reply-title { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 28px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list > li { margin-bottom: 18px; }
.comment-list .children { margin-left: 22px; padding-left: 20px; border-left: 2px solid var(--rule); margin-top: 18px; }
.comment-body {
	padding: 22px;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--r);
}
.comment-author { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: .96rem; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-meta { margin-bottom: 14px; }
.comment-metadata { font-size: .8rem; color: var(--muted); margin: 5px 0 0 51px; }
.comment-metadata a { color: inherit; }
.comment-content { font-size: .99rem; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: 12px; }
.reply a { font-size: .84rem; font-weight: 700; color: var(--accent); }
.comment-awaiting-moderation { display: block; font-size: .85rem; color: var(--pill); margin-bottom: 10px; }
.comment-respond { margin-top: 40px; }
.comment-form { display: grid; gap: 16px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 7px; }
.comment-notes, .comment-form .form-submit { margin: 0; }
.comment-notes { font-size: .88rem; color: var(--muted); }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; }
.comment-form-cookies-consent input { width: auto; flex: none; margin-top: 4px; }
.comment-form-cookies-consent label { font-weight: 400; font-size: .88rem; color: var(--muted); margin: 0; }
.no-comments { color: var(--muted); }
@media (min-width: 620px) {
	.comment-form { grid-template-columns: 1fr 1fr; }
	.comment-form-comment, .comment-notes, .comment-form-cookies-consent, .form-submit { grid-column: 1 / -1; }
}

/* ==========================================================================
   14. Empty states & 404
   ========================================================================== */
.no-results, .error-404 { max-width: 620px; margin: clamp(32px, 6vw, 72px) auto; text-align: center; }
.no-results .page-title, .error-404 .page-title { margin-bottom: 14px; }
.no-results p, .error-404 p { color: var(--muted); }
.no-results .search-form, .error-404 .search-form { margin-top: 26px; text-align: left; }
.error-404 .code {
	font-size: clamp(5.5rem, 20vw, 11rem);
	font-weight: 800;
	line-height: .9;
	letter-spacing: -.06em;
	background: linear-gradient(135deg, var(--accent), var(--pill));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin-bottom: 12px;
}
.error-404 .helpful { margin-top: 36px; text-align: left; }

/* ==========================================================================
   15. Footer
   ========================================================================== */
.site-footer {
	background: var(--ink);
	color: color-mix(in srgb, var(--paper) 72%, transparent);
	padding: clamp(48px, 7vw, 84px) 0 28px;
	font-size: .95rem;
}
.site-footer a { color: color-mix(in srgb, var(--paper) 88%, transparent); }
.site-footer a:hover { color: var(--highlight); }
.site-footer .widget-title { color: var(--paper); border-top-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.site-footer .widget li { border-bottom-color: color-mix(in srgb, var(--paper) 14%, transparent); }
.site-footer input, .site-footer textarea, .site-footer select {
	background: color-mix(in srgb, var(--paper) 10%, transparent);
	border-color: color-mix(in srgb, var(--paper) 22%, transparent);
	color: var(--paper);
}
.site-footer .tagcloud a { border-color: color-mix(in srgb, var(--paper) 22%, transparent); color: color-mix(in srgb, var(--paper) 72%, transparent); }

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: clamp(28px, 4vw, 52px);
	margin-bottom: clamp(40px, 5vw, 64px);
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-top: 26px;
	border-top: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
	font-size: .88rem;
}
.footer-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 22px; }
.site-credit p { margin: 0; }

.to-top {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 0;
	background: none;
	color: inherit;
	font-size: .86rem;
	font-weight: 600;
}
.to-top:hover { background: none; filter: none; color: var(--highlight); }
.to-top svg { width: 15px; height: 15px; }

/* ==========================================================================
   16. Entry animations (scroll-driven, no JS)
   ========================================================================== */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.post-grid > .card, .post-list > .card, .hero-item {
			animation: enter .5s ease-out both;
			animation-timeline: view();
			animation-range: entry 0% cover 22%;
		}
	}
	@keyframes enter {
		from { opacity: 0; translate: 0 18px; }
		to { opacity: 1; translate: 0 0; }
	}
}

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

/* ==========================================================================
   17. Print
   ========================================================================== */
@media print {
	.site-header, .site-footer, .sidebar, .post-nav, .comments-area, .related, .reading-progress { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	.entry-content { max-width: none; }
	a { text-decoration: underline; }
}
