/*
Theme Name: tracyme.
Theme URI: https://tracyme.com
Author: Thuỳ Trang
Description: Theme blog cá nhân tracyme. — Warm Scandinavian Editorial Minimalism. Font Montserrat, ưu tiên trải nghiệm đọc.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: tracyme
License: GPLv2 or later
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
	--background: #FAF8F4;      /* Ivory Paper */
	--surface: #F1EBE3;         /* Warm Oat */
	--surface-accent: #E5D8CA;  /* Soft Sand */
	--brand: #B79B85;           /* Muted Taupe — chỉ dùng trang trí */
	--accent: #876E5C;          /* Soft Coffee — logo, nút, chữ lớn */
	--accent-text: #76604F;     /* Soft Coffee đậm hơn cho chữ nhỏ (đạt WCAG AA) */
	--text-primary: #413B36;    /* Warm Charcoal */
	--text-secondary: #6D645D;
	--text-muted: #81786F;      /* chỉ dùng cho chữ >= 18px hoặc trang trí */
	--border: #DED5CB;
	--hover: #EAE0D5;
	--white: #FFFFFF;
	--muted-green: #61735E;

	--font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--container: 1200px;
	--article: 720px;
	--gutter: 24px;
	--section: 88px;
	--radius: 6px;
	--radius-sm: 4px;
	--header-h: 76px;
}

@media (max-width: 767px) {
	:root {
		--gutter: 20px;
		--section: 48px;
		--header-h: 64px;
	}
}

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

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

body {
	margin: 0;
	background: var(--background);
	color: var(--text-primary);
	font-family: var(--font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text-primary); }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	font-weight: 500;
	line-height: 1.28;
	color: var(--text-primary);
	letter-spacing: -0.01em;
}

p { margin: 0 0 1.1em; }

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

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

.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: 12px; left: 12px; z-index: 1000;
	padding: 10px 16px;
	background: var(--white);
	color: var(--text-primary);
	border: 1px solid var(--border);
}

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

.section { padding: var(--section) 0; }
.section + .section { padding-top: 0; }

/* Eyebrow / labels */
.eyebrow,
.card__cat {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--accent-text);
	text-decoration: none;
}
a.card__cat:hover { color: var(--text-primary); }

.meta {
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.5;
}
.meta span + span::before { content: "·"; margin: 0 .5em; color: var(--brand); }

.badge-demo {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 7px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted-green);
	border: 1px solid currentColor;
	border-radius: 999px;
	vertical-align: 2px;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 26px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .02em;
	line-height: 1.2;
	text-decoration: none;
	color: var(--white);
	background: var(--accent);
	border: 1px solid var(--accent);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--text-primary); border-color: var(--text-primary); color: var(--white); }
.btn--ghost { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn--ghost:hover { background: var(--hover); color: var(--text-primary); border-color: var(--hover); }

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
	text-decoration: none;
	border-bottom: 1px solid var(--border);
	padding-bottom: 3px;
	transition: border-color .2s ease, gap .2s ease;
}
.link-arrow:hover { border-color: var(--accent); gap: 12px; color: var(--text-primary); }

/* Section heading */
.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 40px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--border);
}
.section-head h2 {
	margin: 0;
	font-size: clamp(23px, 2.4vw, 30px);
	font-weight: 500;
}
.section-head .link-arrow { flex-shrink: 0; border-bottom: 0; padding-bottom: 0; }

/* ==========================================================================
   3. Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(250, 248, 244, .94);
	-webkit-backdrop-filter: saturate(1.2) blur(8px);
	backdrop-filter: saturate(1.2) blur(8px);
	border-bottom: 1px solid transparent;
	transition: border-color .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.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; } }

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-h);
	gap: 24px;
}

.logo {
	font-size: 30px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1;
	color: var(--accent);
	text-decoration: none;
	white-space: nowrap;
}
.logo:hover { color: var(--text-primary); }
@media (max-width: 767px) { .logo { font-size: 26px; } }

.nav { display: flex; align-items: center; gap: 8px; }
.nav__list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav__list > li { position: relative; }
.nav__list a,
.nav__toggle-sub {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
	text-decoration: none;
	background: none;
	border: 0;
	cursor: pointer;
	border-radius: var(--radius-sm);
}
.nav__list a:hover, .nav__toggle-sub:hover { color: var(--accent-text); }
.nav__list .is-current > a,
.nav__list .is-current > .nav__toggle-sub { color: var(--accent-text); }
.nav__list .is-current > a::after,
.nav__list .is-current > .nav__toggle-sub::after {
	content: "";
	position: absolute;
	left: 14px; right: 14px; bottom: 4px;
	height: 1px;
	background: var(--accent);
}
.nav__toggle-sub svg { width: 10px; height: 10px; transition: transform .2s ease; }
.nav__toggle-sub[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav__sub {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 270px;
	margin: 0;
	padding: 10px;
	list-style: none;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: 0 12px 32px -18px rgba(65, 59, 54, .35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-sub:hover > .nav__sub,
.has-sub:focus-within > .nav__sub,
.nav__toggle-sub[aria-expanded="true"] + .nav__sub {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.nav__sub a {
	display: flex;
	width: 100%;
	padding: 10px 12px;
	font-weight: 500;
}
.nav__sub a:hover { background: var(--surface); color: var(--text-primary); }
.nav__sub .nav__num { font-size: 11px; color: var(--text-secondary); font-weight: 600; letter-spacing: .06em; min-width: 22px; }

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	color: var(--text-primary);
	background: none;
	border: 1px solid transparent;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 19px; height: 19px; }

.menu-toggle { display: none; }

/* Search panel */
.search-panel {
	border-top: 1px solid var(--border);
	background: var(--background);
}
.search-panel[hidden] { display: none; }
.search-panel__inner { padding-top: 20px; padding-bottom: 20px; }

.search-form { display: flex; gap: 10px; max-width: 720px; }
.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 13px 16px;
	font-family: inherit;
	font-size: 15px;
	color: var(--text-primary);
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}
.search-form input[type="search"]::placeholder { color: var(--text-secondary); }
.search-form input[type="search"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--hover); }

/* Mobile nav */
@media (max-width: 899px) {
	/* backdrop-filter tạo khung chứa cho phần tử fixed → menu bị kẹt trong header. */
	.site-header { background: var(--background); -webkit-backdrop-filter: none; backdrop-filter: none; }
	.menu-toggle { display: inline-flex; }
	.nav__panel {
		position: fixed;
		inset: var(--header-h) 0 0 0;
		z-index: 99;
		padding: 16px var(--gutter) 40px;
		overflow-y: auto;
		background: var(--background);
		border-top: 1px solid var(--border);
		visibility: hidden;
		opacity: 0;
		transition: opacity .2s ease, visibility .2s;
	}
	.admin-bar .nav__panel { top: calc(var(--header-h) + 46px); }
	.nav__panel.is-open { visibility: visible; opacity: 1; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__list > li { border-bottom: 1px solid var(--border); }
	.nav__list a, .nav__toggle-sub {
		width: 100%;
		justify-content: space-between;
		padding: 16px 4px;
		font-size: 17px;
	}
	.nav__list .is-current > a::after,
	.nav__list .is-current > .nav__toggle-sub::after { display: none; }
	.nav__sub {
		position: static;
		display: none;
		min-width: 0;
		padding: 0 0 12px;
		background: none;
		border: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	.has-sub:hover > .nav__sub { display: none; }
	.nav__toggle-sub[aria-expanded="true"] + .nav__sub { display: block; }
	.nav__sub a { padding: 10px 4px; font-size: 15px; justify-content: flex-start; gap: 10px; }
	body.nav-open { overflow: hidden; }
}
@media (min-width: 900px) {
	.nav__panel { display: block; }
}

/* ==========================================================================
   4. Placeholder (ảnh tạm)
   ========================================================================== */
.ph {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	background: var(--surface);
	border-radius: var(--radius);
}
.ph svg { width: 100%; height: 100%; }
.ph__note {
	position: absolute;
	left: 16px; bottom: 14px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .06em;
	color: var(--text-secondary);
}

.media {
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface);
}
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
a:hover .media img, .card:hover .media img { transform: scale(1.03); }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media .ph { height: 100%; border-radius: 0; }

/* ==========================================================================
   5. Homepage — Hero
   ========================================================================== */
.hero { padding: 64px 0 var(--section); }
.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 72px;
	align-items: center;
}
.hero__title {
	margin: 18px 0 26px;
	font-size: clamp(32px, 4.2vw, 50px);
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: -0.025em;
}
.hero__text {
	max-width: 560px;
	margin-bottom: 36px;
	font-size: 17px;
	line-height: 1.8;
	color: var(--text-secondary);
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.hero__portrait { position: relative; }
.hero__portrait .media { aspect-ratio: 4 / 5; }

@media (max-width: 1023px) {
	.hero__grid { gap: 40px; }
}
@media (max-width: 767px) {
	.hero { padding-top: 36px; }
	.hero__grid { grid-template-columns: 1fr; gap: 44px; }
	.hero__portrait { max-width: 420px; }
}

/* ==========================================================================
   6. Cards
   ========================================================================== */
.card { position: relative; display: flex; flex-direction: column; }
.card__media { margin-bottom: 20px; }
.card__body { display: flex; flex-direction: column; flex: 1; }
.card__title {
	margin: 10px 0 10px;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.38;
}
.card__title a { color: var(--text-primary); text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s ease; }
.card__title a:hover { background-size: 100% 1px; }
.card__excerpt {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--border);
}
.card__more { font-size: 13px; font-weight: 500; color: var(--text-primary); text-decoration: none; white-space: nowrap; }
.card__more:hover { color: var(--accent-text); }

/* Featured layout */
.featured {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 56px;
}
.featured .card--lead .card__title { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.3; margin-top: 14px; }
.featured .card--lead .card__excerpt { font-size: 16px; -webkit-line-clamp: 4; }
.featured__side { display: flex; flex-direction: column; gap: 32px; }
.featured__side .card { flex-direction: row; gap: 24px; align-items: flex-start; }
.featured__side .card + .card { padding-top: 32px; border-top: 1px solid var(--border); }
.featured__side .card__media { flex: 0 0 44%; margin: 0; }
.featured__side .card__title { font-size: 18px; margin-top: 8px; }
.featured__side .card__excerpt { font-size: 14px; -webkit-line-clamp: 3; margin-bottom: 10px; }
.featured__side .card__foot { border-top: 0; padding-top: 0; }

@media (max-width: 1023px) {
	.featured { grid-template-columns: 1fr; gap: 40px; }
	.featured .card--lead .media { aspect-ratio: 16 / 9; }
	.featured__side .card__media { flex-basis: 40%; }
}
@media (max-width: 599px) {
	.featured__side { gap: 24px; }
	.featured__side .card { gap: 16px; }
	.featured__side .card + .card { padding-top: 24px; }
	.featured__side .card__media { flex: 0 0 112px; }
	.featured__side .card__title { font-size: 17px; margin: 6px 0 0; }
	.featured__side .card__excerpt, .featured__side .badge-demo { display: none; }
	.featured__side .card__foot { margin-top: 8px; }
}

/* Archive lead */
.archive-lead { margin-bottom: 72px; padding-bottom: 72px; border-bottom: 1px solid var(--border); }
.archive-lead .card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.archive-lead .card__media { margin: 0; }
.archive-lead .card__title { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.28; margin-top: 14px; }
.archive-lead .card__excerpt { font-size: 16px; -webkit-line-clamp: 4; }
@media (max-width: 899px) {
	.archive-lead { margin-bottom: 48px; padding-bottom: 48px; }
	.archive-lead .card { grid-template-columns: 1fr; gap: 20px; }
}

/* Grid */
.grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 56px 40px;
}
@media (max-width: 1023px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; } }
@media (max-width: 639px) { .grid { grid-template-columns: 1fr; gap: 44px; } }

/* ==========================================================================
   7. Categories (Những điều mình viết)
   ========================================================================== */
.topics { background: var(--surface); padding: var(--section) 0; }
.section + .topics { margin-top: 0; }
.topics + .section { padding-top: var(--section); }
.topics .section-head { border-bottom-color: var(--surface-accent); }
.topics__intro { max-width: 520px; margin: -20px 0 44px; color: var(--text-secondary); font-size: 15px; }

.topics__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
}
.topic {
	display: flex;
	flex-direction: column;
	color: var(--text-primary);
	text-decoration: none;
}
.topic .media { aspect-ratio: 3 / 4; margin-bottom: 22px; }
.topic__num { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--accent-text); }
.topic__name { margin: 8px 0 10px; font-size: 19px; font-weight: 500; line-height: 1.35; }
.topic__desc { margin: 0 0 18px; font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.topic__link { margin-top: auto; font-size: 13px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; transition: gap .2s ease; }
.topic:hover .topic__link { gap: 12px; color: var(--accent-text); }
.topic:hover .topic__name { color: var(--accent-text); }

@media (max-width: 1023px) {
	.topics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 28px; }
	.topic .media { aspect-ratio: 4 / 3; }
}
@media (max-width: 539px) {
	.topics__grid { grid-template-columns: 1fr; gap: 36px; }
	.topic { display: grid; grid-template-columns: 120px 1fr; column-gap: 20px; align-items: start; }
	.topic .media { grid-row: 1 / span 4; aspect-ratio: 3 / 4; margin: 0; }
	.topic__name { font-size: 18px; margin: 4px 0 6px; }
	.topic__desc { margin-bottom: 10px; font-size: 14px; }
}

/* ==========================================================================
   8. About preview
   ========================================================================== */
.about-preview__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 72px;
	align-items: center;
	padding: 56px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}
.about-preview .media { aspect-ratio: 1 / 1; }
.about-preview h2 { margin: 14px 0 20px; font-size: clamp(24px, 2.6vw, 32px); }
.about-preview__text { color: var(--text-secondary); font-size: 16px; line-height: 1.8; margin-bottom: 28px; }
.about-preview__sign { font-size: 15px; font-weight: 500; color: var(--accent-text); margin-bottom: 28px; }
@media (max-width: 899px) {
	.about-preview__grid { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
	.about-preview .media { max-width: 280px; }
}

/* Newsletter */
.newsletter {
	text-align: center;
	padding: 56px 24px;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.newsletter h2 { font-size: clamp(22px, 2.2vw, 28px); }
.newsletter p { color: var(--text-secondary); max-width: 520px; margin: 0 auto 24px; }
.newsletter .search-form { margin: 0 auto; max-width: 480px; }

/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-main { padding-bottom: var(--section); }
.site-main > .section:last-child,
.site-main > section:last-child { padding-bottom: 0; }
.site-footer {
	margin-top: 0;
	padding: 72px 0 32px;
	background: var(--surface);
	color: var(--text-secondary);
	font-size: 14px;
}
.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr));
	gap: 48px;
	padding-bottom: 48px;
	border-bottom: 1px solid var(--surface-accent);
}
.site-footer .logo { font-size: 28px; display: inline-block; margin-bottom: 18px; }
.site-footer__about { max-width: 340px; line-height: 1.75; margin: 0; }
.site-footer h2 {
	margin: 0 0 18px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--text-primary);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 10px; }
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text-primary); text-decoration: underline; }
.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	padding-top: 28px;
	font-size: 13px;
}
@media (max-width: 899px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
	.site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
	.site-footer { padding-top: 56px; }
	.site-footer__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   10. Page header, breadcrumb, archive, pagination
   ========================================================================== */
.page-hero { padding: 56px 0 48px; }
.page-hero__title { margin: 14px 0 16px; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.2; letter-spacing: -0.02em; }
.page-hero__desc { max-width: 640px; margin: 0; font-size: 17px; line-height: 1.75; color: var(--text-secondary); }

.breadcrumb { font-size: 13px; color: var(--text-secondary); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--brand); }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-primary); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--text-primary); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chip {
	display: inline-flex;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-primary);
	text-decoration: none;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 999px;
	transition: background-color .2s ease, border-color .2s ease;
}
.chip:hover { background: var(--hover); border-color: var(--hover); color: var(--text-primary); }
.chip.is-active { background: var(--text-primary); border-color: var(--text-primary); color: var(--white); }

.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 48px; }
.filters select {
	padding: 9px 34px 9px 14px;
	font-family: inherit;
	font-size: 13px;
	color: var(--text-primary);
	background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23413B36' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 12px center / 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	-webkit-appearance: none;
	appearance: none;
}
.filters__count { font-size: 13px; color: var(--text-secondary); }

.pagination { margin-top: 72px; }
.pagination .nav-links,
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
	text-decoration: none;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}
.pagination a.page-numbers:hover { background: var(--hover); border-color: var(--hover); }
.pagination .page-numbers.current { background: var(--text-primary); border-color: var(--text-primary); color: var(--white); }
.pagination .page-numbers.dots { border: 0; }

.empty-state {
	padding: 64px 24px;
	text-align: center;
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	color: var(--text-secondary);
}
.empty-state h2 { font-size: 22px; }

/* ==========================================================================
   11. Single article
   ========================================================================== */
.article-head { max-width: 820px; margin: 0 auto; padding: 48px 0 40px; text-align: center; }
.article-head .breadcrumb ol { justify-content: center; }
.article-head__cat { margin-top: 36px; }
.article-head__title { margin: 16px 0 20px; font-size: clamp(30px, 4vw, 46px); line-height: 1.2; letter-spacing: -0.025em; }
.article-head__excerpt { max-width: 680px; margin: 0 auto 24px; font-size: 18px; line-height: 1.75; color: var(--text-secondary); }
.article-cover { max-width: 1040px; margin: 0 auto 64px; }
.article-cover figcaption { margin-top: 12px; font-size: 13px; color: var(--text-secondary); text-align: center; }

.article-layout { max-width: var(--article); margin: 0 auto; }

.toc {
	margin: 0 0 48px;
	padding: 22px 26px;
	background: var(--surface);
	border-radius: var(--radius);
}
.toc summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 18px; font-weight: 400; letter-spacing: 0; }
.toc[open] summary::after { content: "–"; }
.toc ol { margin: 16px 0 0; padding: 0 0 0 18px; font-size: 15px; line-height: 1.6; }
.toc li { margin: 8px 0; }
.toc li.toc--h3 { margin-left: 16px; list-style: circle; font-size: 14px; }
.toc a { color: var(--text-primary); text-decoration: none; }
.toc a:hover { color: var(--accent-text); text-decoration: underline; }

.entry-content {
	font-size: 18px;
	line-height: 1.82;
	color: var(--text-primary);
	text-align: left;
	overflow-wrap: break-word;
}
.entry-content > * { margin-top: 0; margin-bottom: 1.35em; }
.entry-content h2 { margin-top: 2.2em; margin-bottom: .7em; font-size: clamp(23px, 2.4vw, 29px); line-height: 1.3; }
.entry-content h3 { margin-top: 1.8em; margin-bottom: .6em; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.35; }
.entry-content h4 { margin-top: 1.6em; font-size: 18px; font-weight: 600; }
.entry-content a { color: var(--accent-text); text-decoration: underline; }
.entry-content a:hover { color: var(--text-primary); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .5em; }
.entry-content li::marker { color: var(--accent); }
.entry-content blockquote,
.entry-content .wp-block-quote {
	margin: 2em 0;
	padding: 4px 0 4px 28px;
	border-left: 2px solid var(--brand);
	font-size: 20px;
	line-height: 1.7;
	color: var(--text-primary);
}
.entry-content blockquote cite,
.entry-content .wp-block-quote cite { display: block; margin-top: 12px; font-size: 14px; font-style: normal; color: var(--text-secondary); }
.entry-content .wp-block-pullquote { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 32px 0; text-align: center; }
.entry-content .wp-block-pullquote blockquote { border: 0; padding: 0; margin: 0; font-size: 23px; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content figcaption,
.entry-content .wp-element-caption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--text-secondary); text-align: center; }
.entry-content .alignwide { width: min(1040px, calc(100vw - var(--gutter) * 2)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull img { border-radius: 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content .wp-block-table thead { border-bottom: 0; }
.entry-content .wp-block-table th,
.entry-content .wp-block-table td,
.entry-content th, .entry-content td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.entry-content th { font-weight: 600; background: var(--surface); }
.entry-content code { padding: 2px 6px; font-size: .86em; background: var(--surface); border-radius: 3px; }
.entry-content pre { padding: 20px 22px; overflow-x: auto; font-size: 14px; line-height: 1.65; background: var(--text-primary); color: var(--background); border-radius: var(--radius); }
.entry-content pre code { padding: 0; background: none; color: inherit; }
.entry-content hr, .entry-content .wp-block-separator { margin: 3em auto; width: 80px; border: 0; border-top: 1px solid var(--brand); }
.entry-content .source,
.entry-content .has-small-font-size { font-size: 14px; color: var(--text-secondary); }
.entry-content sup a { text-decoration: none; font-weight: 600; }

@media (max-width: 767px) {
	.article-head { padding-top: 28px; }
	.article-head__excerpt { font-size: 16px; }
	.article-cover { margin-bottom: 40px; }
	.entry-content { font-size: 17px; line-height: 1.8; }
	.entry-content blockquote, .entry-content .wp-block-quote { font-size: 18px; padding-left: 20px; }
}

.article-foot { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { font-size: 13px; color: var(--text-secondary); text-decoration: none; padding: 5px 12px; background: var(--surface); border-radius: 999px; }
.tags a:hover { background: var(--hover); color: var(--text-primary); }
.share { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.share a, .share button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; color: var(--text-primary); background: none; border: 1px solid var(--border); border-radius: 50%; cursor: pointer; font-family: inherit; }
.share a:hover, .share button:hover { background: var(--hover); border-color: var(--hover); }
.share svg { width: 16px; height: 16px; }

.author-bio { display: flex; gap: 24px; align-items: flex-start; margin-top: 48px; padding: 32px; background: var(--surface); border-radius: var(--radius); }
.author-bio .media { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 50%; }
.author-bio .media .ph { border-radius: 50%; }
.author-bio h2 { margin: 4px 0 8px; font-size: 18px; }
.author-bio p { margin: 0 0 12px; font-size: 15px; color: var(--text-secondary); line-height: 1.7; }
@media (max-width: 539px) { .author-bio { flex-direction: column; padding: 24px; } }

/* Static page */
.page-content { max-width: var(--article); margin: 0 auto; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
.contact__info .entry-content { font-size: 17px; }
.contact__item { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.contact__item .eyebrow { display: block; margin-bottom: 8px; }
.contact__item a { font-size: 17px; color: var(--text-primary); }
.contact__item ul { list-style: none; margin: 0; padding: 0; }
.contact__item li + li { margin-top: 6px; }
.contact__form { padding: 40px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.contact__form h2 { font-size: 22px; margin-bottom: 24px; }
@media (max-width: 899px) {
	.contact { grid-template-columns: 1fr; gap: 40px; }
	.contact__form { padding: 24px; }
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 539px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.field { margin: 0 0 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.field input,
.field textarea {
	width: 100%;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.6;
	color: var(--text-primary);
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--hover); background: var(--white); }
.field textarea { resize: vertical; min-height: 140px; }
.field-note { margin: 0 0 20px; font-size: 13px; color: var(--text-secondary); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { margin: 0 0 24px; padding: 14px 16px; font-size: 14px; border-radius: var(--radius-sm); }
.form-notice--success { background: #EEF1EA; color: #3F4D3C; border-left: 3px solid var(--muted-green); }
.form-notice--error { background: #F6ECE6; color: #6B3F2E; border-left: 3px solid #A5664C; }

/* 404 */
.error-404 { text-align: center; padding-top: 96px; padding-bottom: 96px; }
.error-404__code { font-size: 14px; font-weight: 600; letter-spacing: .2em; color: var(--accent-text); }
.error-404 h1 { margin: 16px 0; font-size: clamp(28px, 3.6vw, 40px); }
.error-404 p { color: var(--text-secondary); max-width: 480px; margin: 0 auto 32px; }
.error-404 .search-form { margin: 0 auto 32px; }

/* ==========================================================================
   12. Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
