/*
Theme Name: eSIMRoamly Blog
Theme URI: https://esimroamly.com/blog/
Author: eSIMRoamly
Author URI: https://esimroamly.com/
Description: Custom theme for the eSIMRoamly blog. Matches the esimroamly.com app (Geist, neutral palette, sky accent) and shares its header and footer navigation. Posts without a featured image get generated cover art per category.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: esimroamly

Geist font (assets/fonts) © Vercel, SIL Open Font License 1.1.
*/

/* ---------- Fonts (self-hosted, same files as the Next.js app) ---------- */
@font-face {
	font-family: "Geist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/geist-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: "Geist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/geist-latin.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;
}

/* ---------- Tokens (mirror apps/web/src/app/globals.css) ---------- */
:root {
	--bg: #ffffff;
	--fg: #0a0a0a;
	--text: #404040;
	--muted: #f5f5f5;
	--muted-fg: #737373;
	--border: #e5e5e5;
	--border-strong: #d4d4d4;
	--primary: #171717;
	--primary-fg: #fafafa;
	--sky-50: #f0f9ff;
	--sky-100: #e0f2fe;
	--sky-200: #bae6fd;
	--sky-600: #0284c7;
	--sky-700: #0369a1;
	--sky-900: #0c4a6e;
	--radius: 0.625rem;
	--radius-md: 0.5rem;
	--radius-xl: 0.875rem;
	--container: 72rem;
	--measure: 44rem;
	--shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px rgba(0, 0, 0, 0.07);
	--font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid #a3a3a3; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--fg); text-wrap: balance; }
p { text-wrap: pretty; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link {
	position: absolute;
	left: 0.5rem; top: 0.5rem;
	z-index: 100;
	padding: 0.5rem 0.75rem;
	border-radius: var(--radius-md);
	background: var(--bg);
	color: var(--fg);
	text-decoration: none;
	transform: translateY(-200%);
}
.skip-link:focus { transform: none; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.container--measure { max-width: calc(var(--measure) + 2rem); }
.container--wide { max-width: calc(56rem + 2rem); }
.site-main { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	height: 2.25rem;
	padding: 0 1rem;
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--sm { height: 2rem; padding: 0 0.75rem; }
.btn--primary { background: var(--primary); color: var(--primary-fg); }
.btn--primary:hover { background: #2a2a2a; }
.btn--outline { background: var(--bg); border-color: var(--border); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.btn--outline:hover { background: var(--muted); }
.btn--ghost { background: transparent; color: var(--fg); }
.btn--ghost:hover { background: var(--muted); }
.btn--icon { width: 2.25rem; padding: 0; }
.btn svg { width: 1.125rem; height: 1.125rem; flex: none; }

/* ---------- Header (mirrors the app's site header) ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.95);
}
@supports ((-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px))) {
	.site-header { background: rgba(255, 255, 255, 0.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.header-row { position: relative; display: flex; align-items: center; gap: 1rem; height: 3.5rem; }
.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	color: var(--fg);
	text-decoration: none;
	white-space: nowrap;
}
.brand svg { width: 1rem; height: 1rem; color: var(--sky-600); }

.main-nav { display: none; }
.main-nav ul { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.main-nav a {
	display: block;
	padding: 0.5rem;
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
	color: var(--muted-fg);
	white-space: nowrap;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--muted); color: var(--fg); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.header-actions > .btn { display: none; }
@media (min-width: 640px) { .header-actions > .btn { display: inline-flex; } }

.mobile-nav summary { list-style: none; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav .icon-close { display: none; }
.mobile-nav[open] .icon-close { display: block; }
.mobile-nav[open] .icon-menu { display: none; }
.mobile-nav__panel {
	position: absolute;
	right: 0;
	top: calc(100% + 0.25rem);
	width: min(18rem, calc(100vw - 2rem));
	padding: 0.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--bg);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}
.mobile-nav__panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.125rem; }
.mobile-nav__panel a {
	display: block;
	padding: 0.5rem 0.75rem;
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
}
.mobile-nav__panel a:hover, .mobile-nav__panel a[aria-current="page"] { background: var(--muted); }
.mobile-nav__panel hr { margin: 0.375rem 0.25rem; border: 0; border-top: 1px solid var(--border); }

@media (min-width: 1280px) {
	.main-nav { display: block; }
	.mobile-nav { display: none; }
}

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--sky-600);
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Blog hero ---------- */
.blog-hero {
	padding: 4rem 0 2.75rem;
	text-align: center;
	background: linear-gradient(to bottom, var(--sky-50), var(--bg));
	border-bottom: 1px solid var(--border);
}
.blog-hero h1 {
	margin: 0 auto;
	max-width: 18ch;
	font-size: clamp(2.125rem, 3.2vw + 1.25rem, 3.25rem);
	line-height: 1.08;
	font-weight: 700;
	letter-spacing: -0.035em;
}
.blog-hero .lead {
	max-width: 38rem;
	margin: 1.125rem auto 0;
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--muted-fg);
}
.archive-hero { text-align: left; padding: 3rem 0 2.25rem; }
.archive-hero h1 { margin: 0; max-width: none; font-size: clamp(1.875rem, 2vw + 1.25rem, 2.5rem); }
.archive-hero .lead { margin-left: 0; }
.archive-hero .pill-list { justify-content: flex-start; }

/* Search */
.search-form { display: flex; gap: 0.5rem; width: 100%; max-width: 28rem; margin: 1.75rem auto 0; }
.archive-hero .search-form { margin-left: 0; }
.search-form__field { position: relative; flex: 1; }
.search-form__field svg {
	position: absolute; left: 0.75rem; top: 50%;
	width: 1rem; height: 1rem;
	transform: translateY(-50%);
	color: var(--muted-fg);
	pointer-events: none;
}
.search-form input[type="search"] {
	width: 100%;
	height: 2.5rem;
	padding: 0 0.75rem 0 2.25rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--bg);
	color: var(--fg);
	font: inherit;
	font-size: 0.9375rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.search-form input[type="search"]::placeholder { color: #a3a3a3; }
.search-form input[type="search"]:focus { outline: none; border-color: #a3a3a3; box-shadow: 0 0 0 3px rgba(163, 163, 163, 0.25); }
.search-form .btn { height: 2.5rem; }

/* Category pills */
.pill-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	height: 2rem;
	padding: 0 0.875rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--bg);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--fg);
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s;
}
.pill:hover { background: var(--muted); }
.pill__count { font-size: 0.75rem; color: var(--muted-fg); }
.pill[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.pill[aria-current="page"] .pill__count { color: #a3a3a3; }

/* ---------- Sections ---------- */
/* Vertical padding only — these sit on .container elements, whose side padding must survive. */
.section { padding-top: 3rem; padding-bottom: 4rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 3rem 0 1.25rem; }
.section-heading:first-child { margin-top: 0; }
.section-heading h2 { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.section-heading a { font-size: 0.875rem; color: var(--fg); text-underline-offset: 3px; }

/* ---------- Cover art ---------- */
.cover {
	position: relative;
	display: grid;
	place-items: center;
	overflow: hidden;
	background: var(--cover-bg, var(--muted));
	color: var(--cover-fg, var(--text));
}
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 3.75rem;
	height: 3.75rem;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px var(--cover-glow, rgba(0, 0, 0, 0.08));
}
.cover__icon svg { width: 1.75rem; height: 1.75rem; }
.cover--sky     { --cover-bg: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%); --cover-fg: #0369a1; --cover-glow: rgba(2, 132, 199, 0.22); }
.cover--violet  { --cover-bg: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #ddd6fe 100%); --cover-fg: #6d28d9; --cover-glow: rgba(109, 40, 217, 0.2); }
.cover--emerald { --cover-bg: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%); --cover-fg: #047857; --cover-glow: rgba(4, 120, 87, 0.2); }
.cover--amber   { --cover-bg: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%); --cover-fg: #b45309; --cover-glow: rgba(180, 83, 9, 0.2); }
.cover--neutral { --cover-bg: linear-gradient(135deg, #fafafa 0%, #f5f5f5 50%, #e5e5e5 100%); --cover-fg: #404040; }

/* ---------- Featured post ---------- */
.featured {
	position: relative;
	display: grid;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--bg);
	transition: border-color 0.15s, box-shadow 0.15s;
}
.featured:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.featured:focus-within { outline: 2px solid #a3a3a3; outline-offset: 2px; }
.featured .cover { aspect-ratio: 16 / 9; }
.featured .cover__icon { width: 4.5rem; height: 4.5rem; border-radius: 1.25rem; }
.featured .cover__icon svg { width: 2.125rem; height: 2.125rem; }
.featured__body { display: flex; flex-direction: column; justify-content: center; gap: 0.75rem; padding: 1.5rem; }
.featured__body .eyebrow { margin: 0; }
.featured__title { margin: 0; font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.featured__title a { color: var(--fg); text-decoration: none; }
.featured__title a::after { content: ""; position: absolute; inset: 0; }
.featured__title a:focus-visible { outline: none; }
.featured__excerpt { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--muted-fg); }
.read-more { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 500; color: var(--fg); }
.read-more svg { width: 1rem; height: 1rem; transition: transform 0.15s; }
.featured:hover .read-more svg { transform: translateX(3px); }
@media (min-width: 768px) {
	.featured { grid-template-columns: 1.15fr 1fr; }
	.featured .cover { aspect-ratio: auto; min-height: 20rem; }
	.featured__body { padding: 2.5rem; }
}

/* ---------- Post cards ---------- */
.post-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--bg);
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card:focus-within { outline: 2px solid #a3a3a3; outline-offset: 2px; }
.card .cover { aspect-ratio: 16 / 9; border-bottom: 1px solid var(--border); }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 0.5rem; padding: 1.25rem; }
.card__body .eyebrow { margin: 0; font-size: 0.6875rem; }
.card__title { margin: 0; font-size: 1.125rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.card__title a { color: var(--fg); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:focus-visible { outline: none; }
.card__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--muted-fg);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; margin: 0; font-size: 0.8125rem; color: var(--muted-fg); }
.meta > * + *::before { content: "·"; margin-right: 0.5rem; color: #a3a3a3; }
.card .meta { margin-top: auto; padding-top: 0.5rem; }
@media (prefers-reduced-motion: reduce) { .card, .card:hover, .read-more svg { transition: none; transform: none; } }

/* Empty state */
.empty-state { max-width: 32rem; margin: 0 auto; padding: 3rem 1.5rem; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-xl); }
.empty-state h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.empty-state p { margin: 0 0 1.25rem; color: var(--muted-fg); }

/* Pagination */
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 2.25rem; height: 2.25rem; padding: 0 0.75rem;
	border: 1px solid var(--border); border-radius: var(--radius-md);
	font-size: 0.875rem; font-weight: 500; text-decoration: none;
}
.pagination a.page-numbers:hover { background: var(--muted); }
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.pagination .page-numbers.dots { border-color: transparent; }

/* ---------- Single post ---------- */
.post-header { padding: 2.5rem 0 2rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0 0 1.75rem; padding: 0; list-style: none; font-size: 0.875rem; color: var(--muted-fg); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.375rem; color: #d4d4d4; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.post-title { margin: 0; font-size: clamp(2rem, 2.4vw + 1.25rem, 2.875rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.035em; }
.post-lead { margin: 1rem 0 0; font-size: 1.1875rem; line-height: 1.6; color: var(--muted-fg); }
.post-header .meta { margin-top: 1.25rem; font-size: 0.875rem; }
.post-cover { margin-bottom: 2.75rem; }
.post-cover .cover { aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius-xl); }
@media (min-width: 768px) {
	.post-cover .cover { aspect-ratio: 21 / 9; }
	.post-cover .cover__icon { width: 5rem; height: 5rem; border-radius: 1.375rem; }
	.post-cover .cover__icon svg { width: 2.375rem; height: 2.375rem; }
}

/* Article typography */
.entry-content { font-size: 1.0625rem; line-height: 1.75; color: var(--text); }
.entry-content > * { margin-top: 0; margin-bottom: 1.25rem; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2 { margin: 2.75rem 0 0.75rem; font-size: 1.5rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.entry-content h3 { margin: 2rem 0 0.5rem; font-size: 1.1875rem; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }
.entry-content h4 { margin: 1.75rem 0 0.5rem; font-size: 1rem; font-weight: 600; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }
.entry-content a { color: var(--sky-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-thickness: 2px; }
.entry-content strong { color: var(--fg); font-weight: 600; }
.entry-content ul, .entry-content ol { padding-left: 1.375rem; }
.entry-content li { margin: 0.5rem 0; padding-left: 0.25rem; }
.entry-content li::marker { color: #a3a3a3; }
.entry-content ol li::marker { color: var(--muted-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.entry-content blockquote { margin: 2rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 3px solid var(--sky-600); font-size: 1.125rem; color: var(--fg); }
.entry-content blockquote p { margin: 0 0 0.75rem; }
.entry-content blockquote cite { font-size: 0.875rem; font-style: normal; color: var(--muted-fg); }
.entry-content code { padding: 0.125rem 0.375rem; border-radius: 0.375rem; background: var(--muted); font-family: var(--mono); font-size: 0.875em; color: var(--fg); }
.entry-content pre { overflow-x: auto; padding: 1rem 1.25rem; border-radius: var(--radius); background: #0a0a0a; color: #fafafa; font-size: 0.875rem; line-height: 1.6; }
.entry-content pre code { padding: 0; background: none; color: inherit; }
.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption, .entry-content .wp-element-caption { margin-top: 0.5rem; font-size: 0.875rem; text-align: center; color: var(--muted-fg); }
.entry-content hr { margin: 2.75rem 0; border: 0; border-top: 1px solid var(--border); }
.entry-content .wp-block-table { margin: 2rem 0; }
.entry-content .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.55; }
.entry-content .wp-block-table thead { border-bottom: 0; }
.entry-content .wp-block-table th,
.entry-content .wp-block-table td { padding: 0.75rem 0.75rem 0.75rem 0; border: 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.entry-content .wp-block-table th { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--fg); border-bottom-color: var(--border-strong); }
.entry-content .wp-block-table td:first-child { font-weight: 600; color: var(--fg); }
.entry-content .alignwide { margin-left: auto; margin-right: auto; }
@media (min-width: 1024px) { .entry-content .alignwide { margin-left: -6rem; margin-right: -6rem; } }

/* Callout (core/group block style "Callout") */
.is-style-callout {
	margin: 2.25rem 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--sky-200);
	border-radius: var(--radius-xl);
	background: var(--sky-50);
	color: var(--sky-900);
	font-size: 1rem;
	line-height: 1.7;
}
.is-style-callout > * { margin-top: 0; margin-bottom: 0.75rem; }
.is-style-callout > :last-child { margin-bottom: 0; }
.entry-content .is-style-callout strong { color: var(--sky-900); }
.entry-content .is-style-callout a { color: var(--sky-700); }

/* Post footer */
.post-footer { margin-top: 3rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.tag-list a { display: inline-flex; height: 1.75rem; align-items: center; padding: 0 0.625rem; border-radius: 999px; background: var(--muted); font-size: 0.8125rem; color: var(--text); text-decoration: none; }
.tag-list a:hover { background: #ebebeb; color: var(--fg); }
.cta-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-xl); background: linear-gradient(to bottom right, var(--sky-50), var(--bg) 60%); }
.cta-card h2 { margin: 0 0 0.375rem; font-size: 1.125rem; font-weight: 600; }
.cta-card p { margin: 0 0 1.25rem; font-size: 0.9375rem; line-height: 1.6; color: var(--muted-fg); }
.cta-card .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.post-nav { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: block; height: 100%; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-xl); text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.post-nav a:hover { border-color: var(--border-strong); background: #fcfcfc; }
.post-nav span { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-fg); }
.post-nav strong { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.post-nav .next { text-align: right; }
@media (max-width: 639px) { .post-nav .next { text-align: left; } }

.related { margin-top: 4rem; padding: 3rem 0 4rem; border-top: 1px solid var(--border); background: #fcfcfc; }
.related .section-heading { margin-top: 0; }

/* Comments */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comments-title, .comment-reply-title { margin: 0 0 1.25rem; font-size: 1.25rem; font-weight: 600; }
.comment-list { margin: 0 0 2rem; padding: 0; list-style: none; }
.comment-list .children { margin: 0; padding-left: 1.5rem; list-style: none; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--border); font-size: 0.9375rem; color: var(--text); }
.comment-author { display: flex; align-items: center; gap: 0.625rem; font-weight: 600; color: var(--fg); }
.comment-author .avatar { border-radius: 999px; }
.comment-author .says { display: none; }
.comment-metadata { margin: 0.125rem 0 0.5rem 3.125rem; font-size: 0.8125rem; }
.comment-metadata a { color: var(--muted-fg); text-decoration: none; }
.comment-content { margin-left: 3.125rem; }
.reply { margin-left: 3.125rem; font-size: 0.8125rem; }
.comment-form { display: grid; gap: 1rem; }
.comment-form label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 500; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 0.625rem 0.75rem;
	border: 1px solid var(--border); border-radius: var(--radius-md);
	font: inherit; font-size: 0.9375rem; background: var(--bg); color: var(--fg);
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: #a3a3a3; box-shadow: 0 0 0 3px rgba(163, 163, 163, 0.25); }
.comment-form .comment-notes, .comment-form .logged-in-as { margin: 0; font-size: 0.875rem; color: var(--muted-fg); }
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.875rem; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* Pages + 404 */
.page-header { padding: 3rem 0 1.5rem; }
.not-found { padding: 6rem 0; text-align: center; }
.not-found h1 { margin: 0 0 0.75rem; font-size: clamp(2rem, 2vw + 1.5rem, 2.75rem); font-weight: 700; letter-spacing: -0.03em; }
.not-found p { max-width: 32rem; margin: 0 auto; color: var(--muted-fg); }
.not-found .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.75rem; }

/* ---------- Footer (mirrors the app's site footer) ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: #fcfcfc; }
.footer-grid { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-brand { margin: 0 0 0.5rem; font-weight: 600; }
.footer-blurb { margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--muted-fg); }
.footer-title { margin: 0 0 0.5rem; font-size: 0.875rem; font-weight: 600; }
.footer-links { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.footer-links a { font-size: 0.875rem; color: var(--muted-fg); text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--fg); }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .container { padding-top: 1rem; padding-bottom: 1rem; font-size: 0.75rem; line-height: 1.6; color: var(--muted-fg); }
.footer-bottom p { margin: 0 0 0.5rem; }
.footer-bottom p:last-child { margin-bottom: 0; }
