/*
Theme Name: Nông Nghiệp Miền Tây
Theme URI: https://nongnghiepmientay.com/
Author: Nông Nghiệp Miền Tây
Author URI: https://nongnghiepmientay.com/
Description: Theme cho nongnghiepmientay.com – bảng giá nông sản hằng ngày theo tỉnh và kiến thức canh tác (cây trồng, chăn nuôi, thủy sản, máy móc) cho 13 tỉnh miền Tây. Có loại nội dung "Bảng giá" quản lý trong WP Admin và cập nhật được qua REST API.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.9
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: nongnghiepmientay
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ------------------------------------------------------------
   1. Tokens
------------------------------------------------------------ */
:root {
	--bg: #F5F6F0;
	--surface: #FFFFFF;
	--ink: #16201A;
	--ink-2: #232B25;
	--ink-3: #3E443C;
	--muted: #566055;
	--line: #DDE2D6;
	--line-2: #EEF1EA;
	--green: #1E6A3B;
	--green-d: #154D2B;
	--green-t: #E6EFE3;
	--green-on: #E6EFE3;
	--amber: #E9A23B;
	--amber-t: #FBF0DC;
	--amber-ink: #7A4A0A;
	--up: #1E7A3E;
	--down: #B3401A;
	--dark: #16201A;
	--dark-line: #2E3A31;
	--dark-text: #C9D2C6;
	--dark-muted: #9AA597;
	--tint-1: #DCE8D4; --tint-1-ink: #154D2B;
	--tint-2: #F3E3C7; --tint-2-ink: #7A4A0A;
	--tint-3: #D3E4EA; --tint-3-ink: #1D4E5C;
	--tint-4: #E2E2DA; --tint-4-ink: #3E443C;
	--radius-s: 8px;
	--radius: 14px;
	--radius-l: 18px;
	--radius-xl: 22px;
	--shadow: 0 1px 2px rgba(22, 32, 26, .04), 0 12px 32px rgba(22, 32, 26, .06);
	--font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
	--gutter: 32px;
}

@media (max-width: 640px) {
	:root { --gutter: 16px; }
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-d); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
	outline: 3px solid var(--amber);
	outline-offset: 2px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 700; }

button, input, select, textarea { font: inherit; color: inherit; }

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
	clip: auto !important; clip-path: none; height: auto; width: auto;
	display: block; left: 8px; top: 8px; z-index: 100000;
	padding: 12px 18px; background: var(--surface); color: var(--ink);
	border-radius: var(--radius-s); box-shadow: var(--shadow);
}

.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------
   3. Buttons, chips, badges
------------------------------------------------------------ */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 12px 20px; border-radius: 12px;
	font-weight: 600; font-size: 15px; line-height: 1.2;
	border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
	transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-d); color: #fff; }
.btn--light { background: #fff; color: var(--green-d); font-weight: 700; }
.btn--light:hover { background: var(--green-t); color: var(--green-d); }
.btn--ghost-light { border-color: #A9CBB2; color: #fff; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn--outline { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); color: var(--ink); }
.btn--block { display: flex; width: 100%; }

.chip {
	display: inline-flex; align-items: center; min-height: 40px;
	padding: 8px 14px; border-radius: 999px; font-size: 14px;
	background: var(--surface); border: 1px solid var(--line); color: var(--ink);
	cursor: pointer; line-height: 1.2;
}
.chip:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.chip--link { background: transparent; border-color: transparent; color: var(--green); font-weight: 600; }

.badge {
	display: inline-block; align-self: flex-start;
	font-size: 13px; font-weight: 600; line-height: 1.3;
	color: var(--green-d); background: var(--green-t);
	padding: 6px 12px; border-radius: 999px;
}
.badge--amber { color: var(--amber-ink); background: var(--amber-t); border-radius: 6px; padding: 4px 10px; font-size: 12px; }

.kicker { font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--green); }
.kicker.tint-2 { color: var(--tint-2-ink); }
.kicker.tint-3 { color: var(--tint-3-ink); }
.kicker.tint-4 { color: var(--tint-4-ink); }

.trend { font-weight: 600; white-space: nowrap; }
.trend--up { color: var(--up); }
.trend--down { color: var(--down); }
.trend--flat { color: var(--muted); }

/* ------------------------------------------------------------
   4. Header
------------------------------------------------------------ */
.topbar { background: var(--green-d); color: var(--green-on); font-size: 13px; }
.topbar__inner {
	display: flex; flex-wrap: wrap; gap: 6px 24px;
	justify-content: space-between; align-items: center;
	padding-top: 8px; padding-bottom: 8px;
}
.topbar a { color: #fff; }
.topbar__links { display: flex; gap: 20px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header__inner {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
	padding-top: 14px; padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand__mark { flex: 0 0 auto; width: 40px; height: 40px; }
.brand .custom-logo { max-height: 48px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-size: 19px; font-weight: 700; }
.brand__text { min-width: 0; }
.brand__tagline { font-size: 12px; color: var(--muted); max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.primary-nav .menu {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 4px;
}
.primary-nav .menu a {
	display: block; padding: 10px 14px; border-radius: var(--radius-s);
	color: var(--ink); font-weight: 500; font-size: 15px; white-space: nowrap;
}
.primary-nav .menu a:hover { background: var(--bg); text-decoration: none; }
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-parent > a,
.primary-nav .current-post-ancestor > a,
.primary-nav .current-category-ancestor > a { box-shadow: inset 0 -2px 0 var(--green); font-weight: 600; }
.primary-nav .menu-item--highlight > a,
.primary-nav .nnmt-highlight > a { background: var(--green-t); color: var(--green-d); font-weight: 600; }

.site-search { flex: 0 1 220px; min-width: 190px; }

@media (min-width: 901px) {
	.site-header__inner { flex-wrap: nowrap; gap: 20px; }
	.primary-nav { flex: 0 1 auto; min-width: 0; }
	.primary-nav .menu { flex-wrap: nowrap; }
}
@media (min-width: 901px) and (max-width: 1180px) {
	.brand__tagline { display: none; }
	.primary-nav { overflow-x: auto; scrollbar-width: none; }
	.primary-nav::-webkit-scrollbar { display: none; }
	.primary-nav .menu a { padding: 10px 10px; font-size: 14px; }
}
.search-form {
	display: flex; align-items: center; gap: 8px;
	background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
	padding: 0 6px 0 14px;
}
.search-form:focus-within { border-color: var(--green); }
.search-form input[type="search"] {
	flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
	padding: 10px 0; font-size: 15px; color: var(--ink); outline: none;
}
.search-form button {
	flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: var(--radius-s);
	background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.search-form button:hover { background: var(--green-d); }

.icon-btn {
	display: none; width: 44px; height: 44px; flex: 0 0 auto;
	border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
	align-items: center; justify-content: center; cursor: pointer;
}

@media (max-width: 900px) {
	.site-header__inner { gap: 10px; padding-top: 10px; padding-bottom: 0; }
	.brand__tagline { display: none; }
	.brand__name { font-size: 16px; }
	.brand__mark { width: 34px; height: 34px; }
	.icon-btn { display: inline-flex; }
	.site-search { display: none; flex: 1 1 100%; order: 3; }
	.site-search.is-open { display: block; }
	.primary-nav {
		order: 4; flex: 1 1 100%;
		margin: 0 calc(var(--gutter) * -1); padding: 8px var(--gutter) 10px;
		border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
	}
	.primary-nav::-webkit-scrollbar { display: none; }
	.primary-nav .menu { flex-wrap: nowrap; gap: 8px; }
	.primary-nav .menu a { padding: 9px 14px; border-radius: 999px; background: var(--bg); font-size: 14px; }
	.primary-nav .menu-item--highlight > a, .primary-nav .nnmt-highlight > a { background: var(--green); color: #fff; }
	.primary-nav .current-menu-item > a { box-shadow: none; background: var(--ink); color: #fff; }
}

/* ------------------------------------------------------------
   5. Sections & generic blocks
------------------------------------------------------------ */
.section { padding-top: 56px; padding-bottom: 56px; }
.section--tight { padding-top: 24px; padding-bottom: 48px; }
.section--white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section__title { font-size: 30px; letter-spacing: -.01em; }
.section__title--s { font-size: 22px; margin-bottom: 16px; }
.section__lead { margin: 6px 0 0; font-size: 16px; color: var(--muted); }

.card {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
	padding: 24px;
}
.card__title { font-size: 20px; }

@media (max-width: 640px) {
	.section { padding-top: 36px; padding-bottom: 36px; }
	.section__title { font-size: 24px; }
	.card { padding: 18px; }
}

/* Thumbnails & placeholders */
.thumb { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: var(--tint-1); }
.thumb-ph {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 100%; border-radius: inherit;
	background: var(--tint-1); color: var(--tint-1-ink);
}
.thumb-ph svg { width: 36px; height: 36px; opacity: .55; }
.tint-1 .thumb-ph, .thumb-ph.tint-1 { background: var(--tint-1); color: var(--tint-1-ink); }
.tint-2 .thumb-ph, .thumb-ph.tint-2 { background: var(--tint-2); color: var(--tint-2-ink); }
.tint-3 .thumb-ph, .thumb-ph.tint-3 { background: var(--tint-3); color: var(--tint-3-ink); }
.tint-4 .thumb-ph, .thumb-ph.tint-4 { background: var(--tint-4); color: var(--tint-4-ink); }

/* ------------------------------------------------------------
   6. Home – hero & quick price card
------------------------------------------------------------ */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; padding-top: 56px; padding-bottom: 32px; }
.hero__copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; justify-content: center; min-width: 0; }
.hero__title { font-size: 54px; line-height: 1.08; letter-spacing: -.02em; }
.hero__text { margin: 0; font-size: 18px; color: var(--muted); max-width: 520px; }
.hero__label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.price-card {
	flex: 1 1 480px; min-width: 0;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
	padding: 24px 28px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow);
}
.price-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.price-card__head h2 { font-size: 20px; }
.price-card__time { font-size: 13px; color: var(--muted); }
.price-card .btn { margin-top: 8px; align-self: flex-start; }
.price-card__empty { margin: 8px 0; color: var(--muted); font-size: 15px; }
.price-card__posts { display: flex; flex-direction: column; }
.price-card__posts a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); color: var(--ink); font-weight: 600; }
.price-card__posts a:hover { color: var(--green-d); text-decoration: none; }
.price-card__posts small { font-weight: 400; font-size: 13px; color: var(--muted); white-space: nowrap; }
.price-card__admin { font-size: 13px; }

.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; padding: 10px 12px 10px 0; white-space: nowrap; }
.ptable td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line-2); vertical-align: middle; }
.ptable th:last-child, .ptable td:last-child { padding-right: 0; }
.ptable .r { text-align: right; }
.ptable__name { font-weight: 600; }
.ptable__name a { color: var(--ink); }
.ptable__sub { font-size: 13px; color: var(--muted); }
.ptable__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ptable tr[hidden] { display: none; }

@media (max-width: 640px) {
	.hero { padding-top: 28px; gap: 24px; }
	.hero__title { font-size: 34px; }
	.hero__text { font-size: 16px; }
	.price-card { padding: 16px 18px; }
	.ptable { font-size: 14px; }
}

/* Commodity tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile {
	display: flex; flex-direction: column; gap: 6px; padding: 18px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	color: var(--ink);
}
.tile:hover { border-color: var(--green); color: var(--ink); text-decoration: none; }
.tile strong { font-size: 17px; }
.tile span { font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.tile { padding: 14px; }
}

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.cat-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: var(--surface); }
.cat-card__media { height: 140px; }
.cat-card__media img, .cat-card__media .thumb-ph { border-radius: 0; }
.cat-card__body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
.cat-card__title { font-size: 20px; }
.cat-card__title a { color: var(--ink); }
.cat-card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cat-card__list a { color: var(--ink); font-size: 15px; line-height: 1.45; }
.cat-card__more { margin-top: auto; font-size: 14px; font-weight: 600; }

/* Latest posts */
.latest { display: flex; flex-wrap: wrap; gap: 32px; }
.latest__feature { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; color: var(--ink); }
.latest__feature:hover { color: var(--ink); text-decoration: none; }
.latest__feature:hover h3 { text-decoration: underline; }
.latest__feature-media, .mini-post__media, .related__media, .cat-card__media { display: block; }
.latest__feature-media { aspect-ratio: 16 / 9; border-radius: var(--radius-l); overflow: hidden; }
.latest__feature h3 { font-size: 28px; line-height: 1.25; }
.latest__feature p { margin: 0; color: var(--muted); }
.latest__list { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; }

.mini-post { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.mini-post:last-child { border-bottom: 0; }
.mini-post:hover { color: var(--ink); text-decoration: none; }
.mini-post:hover strong { text-decoration: underline; }
.mini-post__media { width: 112px; height: 80px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; }
.mini-post__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mini-post__body strong { font-size: 16px; line-height: 1.35; }

@media (max-width: 640px) {
	.latest { gap: 8px; }
	.latest__feature h3 { font-size: 21px; }
	.mini-post { gap: 12px; padding: 14px 0; }
	.mini-post__media { width: 92px; height: 68px; }
	.mini-post__body strong { font-size: 15px; }
}

/* Provinces */
.province-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.province-grid a { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 500; }
.province-grid a:hover { border-color: var(--green); text-decoration: none; }
@media (max-width: 640px) { .province-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Zalo band */
.cta-band {
	background: var(--green); color: #fff; border-radius: var(--radius-xl);
	padding: 44px 48px; display: flex; flex-wrap: wrap; gap: 24px 48px;
	align-items: center; justify-content: space-between;
}
.cta-band__copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 10px; }
.cta-band h2 { font-size: 30px; letter-spacing: -.01em; }
.cta-band p { margin: 0; font-size: 17px; color: var(--green-on); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band--compact { padding: 28px; border-radius: var(--radius-l); }
.cta-band--compact h2 { font-size: 20px; }
.cta-band--compact p { font-size: 15px; }
.cta-band--compact .cta-band__copy { flex-basis: 300px; }
@media (max-width: 640px) {
	.cta-band { padding: 24px 20px; border-radius: var(--radius-l); }
	.cta-band h2 { font-size: 22px; }
	.cta-band__actions, .cta-band__actions .btn { width: 100%; }
}

/* ------------------------------------------------------------
   7. Breadcrumb & two-column layout
------------------------------------------------------------ */
.breadcrumb { padding-top: 24px; font-size: 14px; color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "/"; margin-right: 4px; color: var(--line); }

.layout { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; padding-top: 20px; padding-bottom: 64px; }
.layout__main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.layout__aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.layout--price { gap: 40px; }

.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px 24px; display: flex; flex-direction: column; }
.box__title { font-size: 17px; margin-bottom: 8px; }
.box__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.box__head .box__title { margin: 0; }
.box__row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; color: var(--ink); }
.box__row:last-of-type { border-bottom: 0; }
a.box__row:hover { color: var(--green-d); text-decoration: none; }
.box__more { padding-top: 12px; font-size: 14px; font-weight: 600; }
.box .widget-title, .layout__aside .widget-title { font-size: 17px; margin: 0 0 8px; }
.layout__aside .widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px 24px; }
.layout__aside .widget ul { margin: 0; padding-left: 18px; }

.rank-list { display: flex; flex-direction: column; }
.rank-list a { display: flex; gap: 12px; padding: 10px 0; color: var(--ink); font-size: 15px; line-height: 1.45; }
.rank-list a:hover { color: var(--green-d); }
.rank-list b { color: var(--green); font-size: 18px; width: 20px; flex: 0 0 auto; }

/* ------------------------------------------------------------
   8. Price board page
------------------------------------------------------------ */
.page-title { font-size: 44px; line-height: 1.1; letter-spacing: -.02em; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted); margin-top: 12px; align-items: center; }
.page-meta strong { color: var(--ink); }
@media (max-width: 640px) { .page-title { font-size: 30px; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.stat__label { font-size: 14px; color: var(--muted); }
.stat__value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat__value small { font-size: 14px; font-weight: 500; color: var(--muted); }
.stat .trend { font-size: 14px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.table-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .ptable { min-width: 560px; }
.note { margin: 0; font-size: 13px; color: var(--muted); }

.chart-tabs { display: flex; gap: 6px; }
.chart-tabs .chip { min-height: 36px; padding: 6px 12px; border-radius: var(--radius-s); font-size: 13px; }
.chart { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.chart[hidden] { display: none; }
.chart svg { width: 100%; height: 220px; display: block; }
.chart figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.chart__range { font-size: 13px; color: var(--muted); }
.chart-empty { margin: 0; padding: 32px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 15px; }

.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.faq summary { font-weight: 600; font-size: 16px; cursor: pointer; }
.faq details p { margin: 10px 0 0; font-size: 15px; color: var(--ink-3); }

.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 640px) { .board-grid { grid-template-columns: minmax(0, 1fr); } }
.board-card { display: flex; flex-direction: column; gap: 10px; }
.board-card__title { font-size: 20px; }
.board-card__title a { color: var(--ink); }

/* ------------------------------------------------------------
   9. Article
------------------------------------------------------------ */
.article { max-width: 760px; }
.article__head { display: flex; flex-direction: column; gap: 16px; }
.article__title { font-size: 42px; line-height: 1.18; letter-spacing: -.02em; }
.article__lead { margin: 0; font-size: 19px; color: var(--ink-3); }
.article__meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
	padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.author { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; font-size: 14px; }
.author__avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; overflow: hidden; }
.author__avatar img { width: 40px; height: 40px; }
.author__info { display: flex; flex-direction: column; gap: 2px; }
.author__info span { color: var(--muted); }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.share .btn { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.share .btn--icon { width: 40px; padding: 0; }

.article__figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.article__figure img { width: 100%; border-radius: var(--radius-l); }
.article__figure figcaption { font-size: 13px; color: var(--muted); }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.toc__title { font-size: 16px; font-weight: 700; margin-bottom: 8px; display: block; }
.toc ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.toc .toc__sub { margin-left: 16px; }

.entry-content { font-size: 18px; line-height: 1.75; color: var(--ink-2); overflow-wrap: break-word; }
.entry-content > * { margin-top: 0; margin-bottom: 18px; }
.entry-content h2 { font-size: 28px; line-height: 1.3; color: var(--ink); margin-top: 36px; scroll-margin-top: 16px; }
.entry-content h3 { font-size: 22px; line-height: 1.35; color: var(--ink); margin-top: 28px; scroll-margin-top: 16px; }
.entry-content ul, .entry-content ol { padding-left: 24px; }
.entry-content li + li { margin-top: 8px; }
.entry-content img { border-radius: var(--radius); height: auto; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .entry-content .wp-caption-text { font-size: 13px; color: var(--muted); margin-top: 8px; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content blockquote { margin-left: 0; margin-right: 0; padding: 20px 24px; background: var(--amber-t); border-radius: var(--radius); color: #3E2A0A; font-size: 17px; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry-content .table-wrap, .entry-content .wp-block-table { overflow-x: auto; margin-bottom: 18px; }
.entry-content .table-wrap table { margin: 0; }
@media (max-width: 640px) { .entry-content table { font-size: 14px; } .entry-content th, .entry-content td { padding: 8px 10px; } }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--green-t); }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.entry-content .alignleft { float: left; margin: 0 20px 12px 0; }
.entry-content .alignright { float: right; margin: 0 0 12px 20px; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { padding: 7px 12px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.tags a:hover { border-color: var(--green); text-decoration: none; }

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.related a { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.related a:hover { text-decoration: none; }
.related a:hover strong { text-decoration: underline; }
.related__media { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; }
.related strong { font-size: 16px; line-height: 1.4; }

@media (max-width: 640px) {
	.article__title { font-size: 28px; }
	.article__lead { font-size: 17px; }
	.entry-content { font-size: 17px; }
	.entry-content h2 { font-size: 23px; }
	.entry-content .alignleft, .entry-content .alignright { float: none; margin: 0 0 12px; }
}

/* Simple page */
.page-narrow { max-width: 820px; margin: 0 auto; padding-top: 24px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }

/* ------------------------------------------------------------
   10. Archive / search
------------------------------------------------------------ */
.archive-head { padding-top: 24px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.archive-head .page-title { font-size: 38px; }
.archive-head__desc { color: var(--muted); max-width: 720px; }
.archive-head__desc p { margin: 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 24px; }
.post-card { display: flex; flex-direction: column; gap: 10px; }
.post-card__media { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; display: block; }
.post-card__title { font-size: 19px; line-height: 1.35; }
.post-card__title a { color: var(--ink); }
.post-card__excerpt { margin: 0; color: var(--muted); font-size: 15px; }
.post-card__meta { font-size: 13px; color: var(--muted); }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-top: 40px; }
.page-numbers {
	min-width: 44px; height: 44px; padding: 0 14px; border-radius: 10px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 500;
}
.page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
a.page-numbers:hover { border-color: var(--green); text-decoration: none; }

.empty-state { padding: 48px 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; max-width: 560px; }
.empty-state .search-form { width: 100%; }

/* ------------------------------------------------------------
   11. Comments
------------------------------------------------------------ */
.comments { display: flex; flex-direction: column; gap: 20px; padding-top: 16px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.comment-list .children { list-style: none; padding-left: 24px; margin-top: 16px; }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.comment-meta { font-size: 14px; color: var(--muted); }
.comment-author .avatar { float: left; margin-right: 10px; border-radius: 999px; }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.comment-form .submit { background: var(--green); color: #fff; border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 600; cursor: pointer; min-height: 46px; }

/* ------------------------------------------------------------
   12. Footer
------------------------------------------------------------ */
.site-footer { background: var(--dark); color: var(--dark-text); }
.site-footer a { color: var(--dark-text); }
.site-footer a:hover { color: #fff; }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 24px; }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer__title { color: #fff; font-size: 15px; font-weight: 700; }
.site-footer__brand { color: #fff; font-size: 18px; font-weight: 700; }
.site-footer__col p { margin: 0; line-height: 1.6; }
.site-footer__bottom { border-top: 1px solid var(--dark-line); padding-top: 16px; padding-bottom: 32px; font-size: 13px; color: var(--dark-muted); }

/* ------------------------------------------------------------
   13. WordPress core classes
------------------------------------------------------------ */
.alignnone { margin: 0 0 18px; }
.wp-caption { max-width: 100%; }
.sticky, .gallery-caption, .bypostauthor { }
.wp-block-image img { border-radius: var(--radius); }

@media print {
	.topbar, .site-header, .layout__aside, .cta-band, .share, .site-footer, .related { display: none !important; }
	body { background: #fff; }
}
