/*
Theme Name: Kadence Child - Wenyangtao
Template: kadence
Author: Wenyangtao Local Migration
Description: Local-only templates for migration validation.
Version: 0.2.0
*/

:root {
	--wyt-green: #173d35;
	--wyt-ink: #1f2a2a;
	--wyt-muted: #667085;
	--wyt-bg: #f7f5ef;
	--wyt-soft: #eef4f1;
	--wyt-line: #e3e7e4;
	--wyt-gold: #b98b2d;
}

body {
	background: var(--wyt-bg);
	color: var(--wyt-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.wyt-shell {
	width: min(1120px, calc(100% - 40px));
	margin: 0 auto;
}

.wyt-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: center;
	padding: 16px 0;
}

.wyt-nav a {
	color: var(--wyt-green);
	font-weight: 700;
	text-decoration: none;
}

.wyt-hero {
	padding: 64px 0 44px;
	border-bottom: 1px solid var(--wyt-line);
	background: linear-gradient(135deg, rgba(23, 61, 53, 0.08), rgba(185, 139, 45, 0.08)), var(--wyt-bg);
}

.wyt-hero h1 {
	max-width: 760px;
	margin: 0;
	color: var(--wyt-green);
	font-size: clamp(36px, 5vw, 58px);
	line-height: 1.14;
	letter-spacing: 0;
}

.wyt-hero p {
	max-width: 720px;
	margin: 18px 0 0;
	color: #3b4743;
	font-size: 18px;
	line-height: 1.8;
}

.wyt-actions,
.wyt-cat-grid,
.wyt-post-grid,
.wyt-related-grid {
	display: grid;
	gap: 16px;
}

.wyt-actions {
	grid-template-columns: repeat(2, max-content);
	margin-top: 28px;
}

.wyt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 11px 16px;
	border: 1px solid var(--wyt-green);
	border-radius: 6px;
	color: var(--wyt-green);
	font-weight: 700;
	text-decoration: none;
}

.wyt-btn-primary {
	background: var(--wyt-green);
	color: #fff;
}

.wyt-section {
	padding: 52px 0;
}

.wyt-section-soft {
	background: var(--wyt-soft);
}

.wyt-section-head {
	display: flex;
	gap: 20px;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 24px;
}

.wyt-eyebrow {
	margin: 0 0 8px;
	color: var(--wyt-gold);
	font-size: 13px;
	font-weight: 800;
}

.wyt-section h2,
.wyt-archive-title {
	margin: 0;
	color: var(--wyt-green);
	font-size: 30px;
	line-height: 1.3;
}

.wyt-section-head p,
.wyt-archive-desc {
	max-width: 580px;
	margin: 8px 0 0;
	color: var(--wyt-muted);
	line-height: 1.75;
}

.wyt-cat-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wyt-post-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wyt-related-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wyt-card {
	display: flex;
	flex-direction: column;
	min-height: 220px;
	padding: 22px;
	border: 1px solid var(--wyt-line);
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
}

.wyt-card h3 {
	margin: 12px 0 0;
	color: var(--wyt-green);
	font-size: 20px;
	line-height: 1.42;
}

.wyt-card p {
	display: -webkit-box;
	margin: 10px 0 0;
	overflow: hidden;
	color: var(--wyt-muted);
	line-height: 1.7;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.wyt-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	color: var(--wyt-muted);
	font-size: 13px;
}

.wyt-pill {
	display: inline-flex;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--wyt-soft);
	color: var(--wyt-green);
	font-size: 12px;
	font-weight: 800;
}

.wyt-readmore {
	margin-top: auto;
	padding-top: 16px;
	color: var(--wyt-green);
	font-weight: 800;
}

.wyt-list {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wyt-list a {
	display: grid;
	gap: 6px;
	padding: 14px 0;
	border-bottom: 1px solid var(--wyt-line);
	color: var(--wyt-green);
	text-decoration: none;
}

.wyt-list span {
	color: var(--wyt-muted);
	font-size: 13px;
}

.wyt-two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
}

.wyt-article {
	width: min(920px, calc(100% - 40px));
	margin: 42px auto;
	border: 1px solid var(--wyt-line);
	border-radius: 8px;
	background: #fff;
}

.wyt-article-head,
.wyt-article-body,
.wyt-conversion {
	width: min(780px, calc(100% - 40px));
	margin: 0 auto;
}

.wyt-article-head {
	padding: 34px 0 24px;
	border-bottom: 1px solid var(--wyt-line);
}

.wyt-breadcrumb {
	margin-bottom: 14px;
	color: var(--wyt-muted);
	font-size: 13px;
}

.wyt-breadcrumb a {
	color: var(--wyt-green);
	font-weight: 700;
	text-decoration: none;
}

.wyt-title {
	margin: 0;
	color: var(--wyt-green);
	font-size: clamp(30px, 4vw, 42px);
	line-height: 1.25;
	letter-spacing: 0;
}

.wyt-article-body {
	padding: 32px 0 18px;
	color: #2e3a37;
	font-size: 17px;
	line-height: 1.86;
	overflow-wrap: break-word;
}

.wyt-article-body p {
	margin: 0 0 1.2em;
}

.wyt-article-body h2,
.wyt-article-body h3 {
	margin: 1.7em 0 0.7em;
	color: var(--wyt-green);
	line-height: 1.35;
}

.wyt-article-body img {
	display: block;
	max-width: 100%;
	width: auto;
	height: auto;
	margin: 24px auto;
	border-radius: 8px;
}

.wyt-conversion {
	margin-bottom: 34px;
	padding: 22px;
	border: 1px dashed rgba(23, 61, 53, 0.35);
	border-radius: 8px;
	background: var(--wyt-soft);
}

.wyt-conversion h2 {
	margin: 0 0 8px;
	color: var(--wyt-green);
	font-size: 22px;
}

.wyt-conversion p {
	margin: 0;
	color: var(--wyt-muted);
	line-height: 1.7;
}

.wyt-related {
	padding: 44px 0 58px;
	background: var(--wyt-soft);
}

.wyt-archive {
	padding: 46px 0 62px;
}

.wyt-pagination {
	margin-top: 30px;
	text-align: center;
}

.wyt-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	min-height: 36px;
	margin: 0 3px;
	border: 1px solid var(--wyt-line);
	border-radius: 6px;
	background: #fff;
	color: var(--wyt-green);
	text-decoration: none;
}

.wyt-pagination .current {
	background: var(--wyt-green);
	color: #fff;
}

@media (max-width: 900px) {
	.wyt-cat-grid,
	.wyt-post-grid,
	.wyt-related-grid,
	.wyt-two-col {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.wyt-shell {
		width: min(100% - 28px, 1120px);
	}

	.wyt-actions,
	.wyt-cat-grid,
	.wyt-post-grid,
	.wyt-related-grid,
	.wyt-two-col {
		grid-template-columns: 1fr;
	}

	.wyt-section-head {
		display: block;
	}

	.wyt-hero {
		padding: 42px 0 34px;
	}

	.wyt-hero h1 {
		font-size: 34px;
	}

	.wyt-section {
		padding: 36px 0;
	}

	.wyt-card {
		min-height: auto;
	}

	.wyt-article {
		width: min(100% - 24px, 920px);
		margin: 24px auto;
	}

	.wyt-title {
		font-size: 29px;
	}

	.wyt-article-body {
		font-size: 17px;
		line-height: 1.82;
	}
}

/* Migrated article images: one scoped source of truth. */
body.single-post .wyt-article-body {
	text-align: left;
}

body.single-post .wyt-article-body .image-uploaded.gallery[class*="old-record-id-"]:has(> :only-child) {
	display: block;
	grid-template-columns: none;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1.5em;
	text-align: left;
}

body.single-post .wyt-article-body figure,
body.single-post .wyt-article-body .wp-block-image {
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}

body.single-post .wyt-article-body img.wyt-content-image-wide {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin-left: auto;
	margin-right: auto;
}

body.single-post .wyt-article-body img.wyt-content-image-natural {
	width: auto;
	max-width: 100%;
	height: auto;
}

@media (max-width: 640px) {
	body.single-post .wyt-article-body img,
	body.single-post .wyt-article-body figure,
	body.single-post .wyt-article-body .wp-block-image {
		max-width: 100%;
		height: auto;
	}
}