/*
Theme Name: AINews
Theme URI: https://ainews.in.th
Description: Minimal, modern, Thai-first theme for AI News (ainews.in.th). Clean typography with the self-hosted Sarabun font, comfortable Thai reading measure, responsive card layouts, and automatic dark mode.
Author: AI News
Version: 1.0.16
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: ainews
Tags: news, magazine, blog, minimal, custom-menu, featured-images, translation-ready, block-styles
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
	--font-sans: 'Sarabun', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-display: 'Kanit', 'Sarabun', 'Noto Sans Thai', sans-serif;

	--bg: #ffffff;
	--surface: #f7f8fa;
	--surface-2: #eef0f4;
	--text: #16181d;
	--muted: #5b6472;
	--border: #e6e8ec;
	--accent: #4f46e5;
	--accent-hover: #4338ca;
	--accent-soft: rgba(79, 70, 229, 0.08);
	--shadow: 0 1px 2px rgba(16, 18, 27, 0.04), 0 8px 24px rgba(16, 18, 27, 0.06);

	--container: 1120px;
	--reading: 820px;
	--wide: 1040px; /* Medium-style breakout for featured media */
	--radius: 14px;
	--radius-sm: 9px;
	--radius-pill: 999px;

	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.5rem;
	--space-6: 2rem;
	--space-8: 3rem;
	--space-10: 4.5rem;

	--header-h: 64px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0d0f14;
		--surface: #161a22;
		--surface-2: #1e232e;
		--text: #e8eaed;
		--muted: #9aa4b2;
		--border: #262b36;
		--accent: #8b8bff;
		--accent-hover: #a5a5ff;
		--accent-soft: rgba(139, 139, 255, 0.12);
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
	}
}

/* Explicit theme override (data-theme wins over the media query) */
:root[data-theme='dark'] {
	--bg: #0d0f14;
	--surface: #161a22;
	--surface-2: #1e232e;
	--text: #e8eaed;
	--muted: #9aa4b2;
	--border: #262b36;
	--accent: #8b8bff;
	--accent-hover: #a5a5ff;
	--accent-soft: rgba(139, 139, 255, 0.12);
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}
:root[data-theme='light'] {
	--bg: #ffffff;
	--surface: #f7f8fa;
	--surface-2: #eef0f4;
	--text: #16181d;
	--muted: #5b6472;
	--border: #e6e8ec;
	--accent: #4f46e5;
	--accent-hover: #4338ca;
	--accent-soft: rgba(79, 70, 229, 0.08);
	--shadow: 0 1px 2px rgba(16, 18, 27, 0.04), 0 8px 24px rgba(16, 18, 27, 0.06);
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.75; /* generous for Thai */
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.15s ease;
}
a:hover {
	color: var(--accent-hover);
}

h1,
h2,
h3,
h4 {
	line-height: 1.35;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0 0 var(--space-4);
}

/* Kanit as the display face for site chrome and headlines; Sarabun stays for
   body copy and in-article headings so long-form Thai reading stays smooth. */
.site-title,
.section-head h2,
.page-hero__title,
.hero__title,
.card__title,
.article-header__title,
.site-footer__brand {
	font-family: var(--font-display);
	letter-spacing: -0.01em;
}

p {
	margin: 0 0 var(--space-4);
}

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

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--space-5);
}

/* Event landing pages get a wider canvas so multi-column sections and cards
   have room and text wraps less inside boxes. */
.page-template-page-event .site-main > .container {
	max-width: 1320px;
}

/* ==========================================================================
   Event application forms (Speaker / Sponsor)
   ========================================================================== */
.cmap-form {
	display: grid;
	gap: 14px;
	max-width: 680px;
	margin: 1.4em auto 0.5em;
}
.cmap-form .cmap-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.cmap-form label {
	display: block;
	margin-bottom: 6px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.9rem;
}
.cmap-form input,
.cmap-form select,
.cmap-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg);
	color: var(--text);
	font-family: inherit;
	font-size: 1rem;
}
.cmap-form input:focus,
.cmap-form select:focus,
.cmap-form textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
.cmap-form textarea {
	min-height: 120px;
	resize: vertical;
}
.cmap-required {
	color: #dc2626;
}
.cmap-hp {
	position: absolute !important;
	left: -9999px;
	height: 1px;
	overflow: hidden;
}
.cmap-submit {
	justify-self: start;
	border: none;
	cursor: pointer;
	padding: 13px 30px;
	border-radius: var(--radius-pill);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1rem;
	color: #fff;
	transition: filter 0.15s ease;
}
.cmap-submit:hover {
	filter: brightness(1.08);
}
.cmap-submit--speaker {
	background: linear-gradient(135deg, #4fc3f7, #2196f3);
}
.cmap-submit--sponsor {
	background: linear-gradient(135deg, #ec1e79, #7b2ff7);
}
.cmap-success {
	max-width: 680px;
	margin: 0 auto 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid #16a34a;
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	font-weight: 500;
}
@media (max-width: 560px) {
	.cmap-form .cmap-row {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Home promo banner (AI Party event)
   ========================================================================== */
.event-banner {
	display: flex;
	align-items: center;
	gap: 26px;
	position: relative;
	overflow: hidden;
	margin: 0 0 var(--space-8);
	padding: 12px 28px;
	border-radius: 20px;
	background: radial-gradient(120% 150% at 12% 0%, #1c1430 0%, #0b0b14 58%, #000 100%);
	border: 1px solid #2a2440;
	color: #fff;
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.event-banner:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 44px rgba(236, 30, 121, 0.28);
	color: #fff;
}
.event-banner__glow {
	position: absolute;
	top: -45%;
	right: -8%;
	width: 360px;
	height: 360px;
	background: radial-gradient(circle, rgba(236, 30, 121, 0.38), transparent 66%);
	pointer-events: none;
}
.event-banner__logo {
	flex: 0 0 auto;
	width: auto;
	max-height: 140px;
	border-radius: 10px;
	z-index: 1;
}
.event-banner__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	z-index: 1;
}
.event-banner__badge {
	align-self: flex-start;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.78rem;
	background: linear-gradient(135deg, #f9a825, #ec1e79);
	color: #fff;
	padding: 4px 12px;
	border-radius: var(--radius-pill);
}
.event-banner__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.15rem, 2.6vw, 1.5rem);
	line-height: 1.25;
	background: linear-gradient(135deg, #4fc3f7, #ec1e79 55%, #f9a825);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.event-banner__tagline {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.95rem;
	color: #e8e8ef;
}
.event-banner__meta {
	color: #c9c9d6;
	font-size: 0.92rem;
}
.event-banner__cta {
	flex: 0 0 auto;
	margin-left: auto;
	z-index: 1;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.98rem;
	color: #0a0a12;
	background: #fff;
	padding: 11px 22px;
	border-radius: var(--radius-pill);
	white-space: nowrap;
}
@media (max-width: 720px) {
	.event-banner {
		flex-direction: column;
		text-align: center;
		gap: 14px;
		padding: 22px 20px;
	}
	.event-banner__body {
		align-items: center;
	}
	.event-banner__badge {
		align-self: center;
	}
	.event-banner__cta {
		margin-left: 0;
	}
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--accent);
	color: #fff;
	padding: var(--space-2) var(--space-4);
	border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
	left: 0;
	color: #fff;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: var(--space-5);
	height: var(--header-h);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-right: auto;
}

.site-logo img {
	max-height: 36px;
	width: auto;
}

.site-title {
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0;
	line-height: 1;
}
.site-title a {
	color: var(--text);
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.site-title .mark {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--accent), #8b5cf6);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
}
.site-description {
	margin: 0;
	color: var(--muted);
	font-size: 0.85rem;
}

.main-nav ul {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}
.main-nav a {
	display: block;
	color: var(--text);
	font-weight: 500;
	font-size: 0.98rem;
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-pill);
	transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
	background: var(--accent-soft);
	color: var(--accent);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover {
	background: var(--surface-2);
	border-color: var(--accent);
	color: var(--accent);
}
.icon-btn svg {
	width: 19px;
	height: 19px;
}

.theme-toggle .icon-moon {
	display: none;
}
:root[data-theme='dark'] .theme-toggle .icon-sun {
	display: none;
}
:root[data-theme='dark'] .theme-toggle .icon-moon {
	display: block;
}

.nav-toggle {
	display: none;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.site-main {
	padding-block: var(--space-8);
	min-height: 60vh;
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-4);
	margin-bottom: var(--space-5);
}
.section-head h2 {
	font-size: 1.4rem;
	margin: 0;
	position: relative;
	padding-left: 0.75rem;
}
.section-head h2::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.15em;
	bottom: 0.15em;
	width: 4px;
	border-radius: 4px;
	background: var(--accent);
}

/* ==========================================================================
   Post grid & cards
   ========================================================================== */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: var(--space-6) var(--space-5);
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--surface-2);
	overflow: hidden;
}
.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.card:hover .card__media img {
	transform: scale(1.04);
}
.card__media--placeholder {
	display: grid;
	place-items: center;
	color: var(--muted);
	background: linear-gradient(135deg, var(--surface), var(--surface-2));
}

.card__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding: var(--space-5);
	flex: 1;
}
.card__title {
	font-size: 1.15rem;
	margin: 0;
	line-height: 1.4;
}
.card__title a {
	color: var(--text);
}
.card__title a:hover {
	color: var(--accent);
}
.card__excerpt {
	color: var(--muted);
	font-size: 0.97rem;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.card__meta {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: var(--space-3);
	color: var(--muted);
	font-size: 0.85rem;
}

/* Category pill */
.cat-pill {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--accent);
	background: var(--accent-soft);
	padding: 0.2rem 0.65rem;
	border-radius: var(--radius-pill);
	align-self: flex-start;
	transition: background 0.15s ease;
}
.cat-pill:hover {
	background: color-mix(in srgb, var(--accent) 18%, transparent);
	color: var(--accent);
}

/* ==========================================================================
   Featured hero
   ========================================================================== */
.hero {
	margin-bottom: var(--space-10);
}
.hero__card {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(360px, 44vw, 520px);
	border-radius: calc(var(--radius) + 4px);
	overflow: hidden;
	background: var(--surface-2);
	isolation: isolate;
}
.hero__media {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
}
.hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.hero__card:hover .hero__media img {
	transform: scale(1.03);
}
/* Readability scrim — always dark so white text reads on any image / theme. */
.hero__card::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	background: linear-gradient(
		to top,
		rgba(8, 9, 14, 0.9) 0%,
		rgba(8, 9, 14, 0.62) 32%,
		rgba(8, 9, 14, 0.15) 64%,
		rgba(8, 9, 14, 0) 100%
	);
}
.hero__body {
	position: relative;
	z-index: 3;
	max-width: 760px;
	padding: var(--space-8) var(--space-6) var(--space-6);
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}
.hero__body .cat-pill {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	backdrop-filter: blur(4px);
}
.hero__body .cat-pill:hover {
	background: rgba(255, 255, 255, 0.3);
	color: #fff;
}
.hero__title {
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	margin: 0;
	line-height: 1.28;
	text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}
.hero__title a {
	color: #fff;
}
.hero__title a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 4px;
}
.hero__excerpt {
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.05rem;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}
.hero__meta {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.9rem;
}

/* ==========================================================================
   Single article
   ========================================================================== */
.article-header {
	max-width: var(--reading);
	margin-inline: auto;
	margin-bottom: var(--space-6);
	text-align: center;
}
.article-header__title {
	font-size: clamp(1.9rem, 4vw, 2.7rem);
	line-height: 1.25;
	margin: var(--space-4) 0;
}
.article-header__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--space-3);
	color: var(--muted);
	font-size: 0.92rem;
}
.article-hero-media {
	max-width: var(--wide);
	margin: 0 auto var(--space-8);
	border-radius: var(--radius);
	overflow: hidden;
}
.article-hero-media img {
	width: 100%;
}

.article-body {
	max-width: var(--reading);
	margin-inline: auto;
	font-size: 1.16rem;
	line-height: 1.9; /* extra breathing room for Thai reading */
}
.article-body > * {
	margin-bottom: 1.5em;
}
.article-body h2 {
	font-size: 1.6rem;
	margin-top: 2em;
}
.article-body h3 {
	font-size: 1.3rem;
	margin-top: 1.6em;
}
.article-body img,
.article-body figure {
	border-radius: var(--radius-sm);
}
.article-body figure {
	margin-inline: 0;
}
.article-body figcaption {
	color: var(--muted);
	font-size: 0.9rem;
	text-align: center;
	margin-top: var(--space-2);
}
.article-body blockquote {
	margin: 2em 0;
	padding: var(--space-2) 0 var(--space-2) var(--space-5);
	border-left: 4px solid var(--accent);
	color: var(--text);
	font-size: 1.2rem;
}
.article-body pre {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: var(--space-4);
	overflow-x: auto;
	font-size: 0.95rem;
}
.article-body code {
	font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
	background: var(--surface-2);
	padding: 0.1em 0.4em;
	border-radius: 5px;
	font-size: 0.9em;
}
.article-body pre code {
	background: none;
	padding: 0;
}
.article-body a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-footer {
	max-width: var(--reading);
	margin: var(--space-8) auto 0;
	padding-top: var(--space-5);
	border-top: 1px solid var(--border);
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	align-items: center;
}
.tag-link {
	font-size: 0.85rem;
	color: var(--muted);
	background: var(--surface);
	border: 1px solid var(--border);
	padding: 0.25rem 0.7rem;
	border-radius: var(--radius-pill);
}
.tag-link:hover {
	color: var(--accent);
	border-color: var(--accent);
}

/* Prev / next post navigation — aligned to the reading column. */
.post-navigation {
	max-width: var(--reading);
	margin: var(--space-8) auto 0;
	padding-top: var(--space-5);
	border-top: 1px solid var(--border);
}
.post-navigation .nav-links {
	display: flex;
	gap: var(--space-4);
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
	flex: 1;
	min-width: 0;
}
.post-navigation .nav-next {
	text-align: right;
}
.post-navigation a {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	height: 100%;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	transition: border-color 0.15s ease, color 0.15s ease;
}
.post-navigation a:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.post-navigation .nav-subtitle {
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--muted);
}
.post-navigation .nav-title {
	font-weight: 600;
	line-height: 1.4;
}

/* Comments — same reading column as the article body. */
.comments-area {
	max-width: var(--reading);
	margin-inline: auto;
	margin-top: var(--space-8);
}
.comments-title {
	font-size: 1.4rem;
}
.comments-area .comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Archive / page headers */
.page-hero {
	text-align: center;
	margin-bottom: var(--space-8);
}
.page-hero__eyebrow {
	color: var(--accent);
	font-weight: 600;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.page-hero__title {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	margin: var(--space-2) 0;
}
.page-hero__desc {
	color: var(--muted);
	max-width: 640px;
	margin: 0 auto;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
	margin-top: var(--space-8);
}
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-2);
}
.pagination a,
.pagination span {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding-inline: var(--space-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-weight: 500;
}
.pagination a:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.pagination .current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	margin-top: var(--space-10);
	border-top: 1px solid var(--border);
	background: var(--surface);
}
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-5);
	justify-content: space-between;
	align-items: center;
	padding-block: var(--space-6);
}
.site-footer__brand {
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--text);
}
.site-footer__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-footer__nav a {
	color: var(--muted);
	font-size: 0.95rem;
}
.site-footer__nav a:hover {
	color: var(--accent);
}
.site-footer__copy {
	color: var(--muted);
	font-size: 0.88rem;
	width: 100%;
	padding-bottom: var(--space-6);
}

/* ==========================================================================
   Empty state
   ========================================================================== */
.empty-state {
	text-align: center;
	padding: var(--space-10) var(--space-5);
	color: var(--muted);
}
.empty-state h2 {
	color: var(--text);
}

/* Search form */
.search-form {
	display: flex;
	gap: var(--space-2);
	max-width: 520px;
	margin: 0 auto;
}
.search-form input[type='search'] {
	flex: 1;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	background: var(--bg);
	color: var(--text);
	font-family: inherit;
	font-size: 1rem;
}
.search-form input[type='search']:focus {
	outline: none;
	border-color: var(--accent);
}
.btn {
	display: inline-grid;
	place-items: center;
	padding: var(--space-3) var(--space-5);
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: var(--radius-pill);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}
.btn:hover {
	background: var(--accent-hover);
	color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
	.hero__card {
		min-height: clamp(320px, 70vw, 440px);
	}
	.hero__body {
		padding: var(--space-6) var(--space-5) var(--space-5);
	}
}

@media (max-width: 720px) {
	body {
		font-size: 16px;
	}
	.main-nav,
	.header-actions .search-link {
		display: none;
	}
	.nav-toggle {
		display: inline-grid;
	}
	.main-nav.is-open {
		display: block;
		position: absolute;
		top: var(--header-h);
		left: 0;
		right: 0;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		padding: var(--space-3) var(--space-5);
		box-shadow: var(--shadow);
	}
	.main-nav.is-open ul {
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-1);
	}
	.post-grid {
		grid-template-columns: 1fr;
	}
	.article-body {
		font-size: 1.08rem;
		line-height: 1.85;
	}
}
