/*
Theme Name: Claybrook
Theme URI: https://www.123456.wang
Author: 陈思远
Author URI: https://www.123456.wang
Description: A warm, all-serif design with earthy tones, softly rounded components, and a calm, reading-first layout.
Version: 2.3.1
License: GNU General Public License v2 or later
Text Domain: claybrook
*/

:root {
	--bg: #f6efe3;
	--fg: #1d2433;
	--muted: #6b6355;
	--border: #ddd0bb;
	--radius: 10px;
	--shadow: 0 2px 10px rgba(29, 36, 51, 0.08);
	--accent: #bd5b36;
	--accent-dark: #9c4526;
	--tint: #efe3cf;
	--tint-deep: #e7d6ba;
	--navy: #20293d;
	--navy-deep: #131a2a;
	--media-ratio: 16 / 9;
	--thumb-ratio: 16 / 9;
}

* {
	box-sizing: border-box;
}

html {
	margin: 0;
	padding: 0;
}

body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
	font-size: 17px;
	line-height: 1.75;
	overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
	font-family: inherit;
	line-height: 1.3;
	margin: 0 0 0.6em;
	font-weight: 700;
}

p {
	margin: 0 0 1.2em;
}

a {
	color: var(--accent-dark);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

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

.wrap {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 20px;
}

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

/* ---------- Header ---------- */

.site-header {
	background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
	color: #f2ead9;
	box-shadow: var(--shadow);
}

.header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 14px;
	padding-bottom: 14px;
	position: relative;
}

.site-name {
	margin: 0;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.site-name a {
	color: #f6efe3;
}

.site-name a:hover {
	text-decoration: none;
	color: #ffffff;
}

.site-name img {
	max-height: 48px;
	width: auto;
}

#site-nav > ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

#site-nav li {
	position: relative;
}

#site-nav a {
	display: block;
	padding: 10px 14px;
	color: #eee4d2;
	border-radius: var(--radius);
	font-size: 16px;
}

#site-nav a:hover {
	background: rgba(189, 91, 54, 0.28);
	color: #ffffff;
	text-decoration: none;
}

#site-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 190px;
	background: var(--navy-deep);
	border: 1px solid rgba(246, 239, 227, 0.14);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	display: none;
	z-index: 60;
}

#site-nav li:hover > .sub-menu,
#site-nav li:focus-within > .sub-menu,
#site-nav li.sub-open > .sub-menu {
	display: block;
}

#site-nav .sub-menu a {
	padding: 8px 12px;
	white-space: nowrap;
	font-size: 15px;
}

.sub-toggle {
	display: none;
	background: none;
	border: 0;
	color: #eee4d2;
	font-size: 14px;
	cursor: pointer;
	padding: 10px 6px;
}

#menu-toggle {
	display: none;
	background: rgba(189, 91, 54, 0.3);
	border: 1px solid rgba(246, 239, 227, 0.25);
	color: #f6efe3;
	font-family: inherit;
	font-size: 15px;
	padding: 8px 14px;
	border-radius: var(--radius);
	cursor: pointer;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
	font-size: 14px;
	color: var(--muted);
	margin: 22px 0 0;
}

.breadcrumb .crumb {
	color: var(--muted);
}

.breadcrumb a.crumb:hover {
	color: var(--accent-dark);
}

.breadcrumb .trail {
	margin: 0 8px;
	color: var(--border);
}

/* ---------- Layout ---------- */

#main-content {
	padding-bottom: 48px;
}

.grid-2 {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 36px;
	margin-top: 26px;
	align-items: start;
}

/* ---------- Hero (home) ---------- */

.hero-text {
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 44px 40px;
	text-align: center;
}

.hero-text .hero-title {
	font-size: 40px;
	margin-bottom: 0.3em;
}

.hero-text .hero-tagline {
	color: var(--muted);
	font-size: 19px;
	margin: 0;
}

/* ---------- Post rows ---------- */

.post-rows {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 22px;
}

.post-row {
	display: flex;
	gap: 18px;
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
	align-items: center;
}

.post-row.no-thumb {
	align-items: flex-start;
}

.row-thumb {
	flex: 0 0 180px;
	border-radius: var(--radius);
	overflow: hidden;
	aspect-ratio: var(--thumb-ratio);
}

.row-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.row-title {
	font-size: 20px;
	margin-bottom: 0.25em;
}

.row-title a {
	color: var(--fg);
}

.row-title a:hover {
	color: var(--accent-dark);
}

.row-meta {
	font-size: 14px;
	color: var(--muted);
	margin-bottom: 0.4em;
}

.row-excerpt {
	font-size: 15px;
	color: var(--muted);
	margin: 0;
}

/* ---------- Archive head ---------- */

.archive-head {
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 26px 30px;
}

.archive-title {
	margin-bottom: 0.2em;
}

.archive-desc {
	color: var(--muted);
	font-size: 16px;
}

.archive-desc p:last-child {
	margin-bottom: 0;
}

/* ---------- Pagination ---------- */

.pagination {
	margin-top: 28px;
}

.pagination .nav-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 6px 14px;
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--fg);
	font-size: 15px;
}

.pagination .page-numbers.current {
	background: var(--accent);
	border-color: var(--accent);
	color: #ffffff;
}

.pagination .page-numbers:hover {
	text-decoration: none;
	border-color: var(--accent);
}

/* ---------- Single entry ---------- */

.entry {
	margin-top: 0;
	background: #fbf5ea;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 34px 38px;
}

.entry-title {
	font-size: 34px;
	margin-bottom: 0.3em;
}

.entry-meta {
	font-size: 15px;
	color: var(--muted);
	margin-bottom: 20px;
}

.entry-media {
	margin: 0 0 24px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	aspect-ratio: var(--media-ratio);
}

.entry-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.entry-content h2 {
	font-size: 26px;
	margin-top: 1.4em;
}

.entry-content h3 {
	font-size: 21px;
	margin-top: 1.3em;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
	margin-bottom: 1.2em;
}

.entry-content blockquote {
	margin: 0 0 1.2em;
	padding: 14px 20px;
	background: var(--tint);
	border-left: 4px solid var(--accent);
	border-radius: 0 var(--radius) var(--radius) 0;
	color: var(--muted);
}

.entry-content {
	overflow-x: hidden;
}

.entry-content p {
	text-align: justify;
	text-justify: inter-ideograph;
}

.page-head {
	margin-bottom: 0.6em;
}

.table-wrap {
	overflow-x: auto;
	margin-bottom: 1.2em;
}

.table-wrap table {
	margin-bottom: 0;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--border);
	padding: 8px 12px;
	text-align: left;
	overflow-wrap: normal;
	word-break: normal;
}

.entry-content th {
	background: var(--tint);
}

.entry-content img {
	border-radius: var(--radius);
}

.article-note {
	background: var(--tint-deep);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 22px;
	font-size: 15px;
	color: var(--muted);
	margin: 26px 0;
}

.article-note p:last-child {
	margin-bottom: 0;
}

.related-posts {
	margin: 30px 0;
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px 26px;
}

.related-posts h2 {
	font-size: 22px;
}

.related-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.related-list li {
	display: flex;
	gap: 14px;
	align-items: center;
}

.related-list .rel-thumb {
	flex: 0 0 96px;
	border-radius: var(--radius);
	overflow: hidden;
	aspect-ratio: var(--thumb-ratio);
}

.related-list .rel-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.related-list .rel-title a {
	color: var(--fg);
	font-size: 16px;
}

.related-list .rel-title a:hover {
	color: var(--accent-dark);
}

.author-bio {
	display: flex;
	gap: 18px;
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 24px;
	margin: 26px 0;
	align-items: flex-start;
}

.author-bio img {
	border-radius: 50%;
	flex: 0 0 auto;
}

.bio-name {
	font-weight: 700;
	margin-bottom: 0.2em;
}

.bio-text {
	color: var(--muted);
	font-size: 15px;
	margin: 0;
	text-align: justify;
	text-justify: inter-ideograph;
}

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 24px 0 8px;
}

.entry-tags a {
	background: var(--tint-deep);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 4px 14px;
	font-size: 14px;
	color: var(--fg);
}

.entry-tags a:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: #ffffff;
	text-decoration: none;
}

/* ---------- Sidebar ---------- */

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.sidebar .widget,
.sidebar .search-box {
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 22px;
}

.sidebar .widget-title,
.sidebar .search-title {
	font-size: 18px;
	margin-bottom: 0.6em;
}

.sidebar ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar li {
	padding: 5px 0;
	border-bottom: 1px solid var(--border);
	font-size: 15px;
}

.sidebar li:last-child {
	border-bottom: 0;
}

.sidebar a {
	color: var(--fg);
}

.sidebar .cat-count {
	color: var(--muted);
	font-size: 13px;
	margin-left: 6px;
}

.sidebar .side-date {
	display: block;
	color: var(--muted);
	font-size: 13px;
	margin-top: 2px;
}

.sidebar .tag-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sidebar .tag-links a {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 14px;
	background: var(--bg);
}

.sidebar .tag-links a:hover {
	border-color: var(--accent);
	color: var(--accent-dark);
}

.sidebar a:hover {
	color: var(--accent-dark);
}

/* ---------- Search form ---------- */

.search-form {
	display: flex;
	gap: 8px;
}

.search-field {
	flex: 1;
	min-width: 0;
	font-family: inherit;
	font-size: 15px;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: #fffdf8;
	color: var(--fg);
}

.search-submit {
	font-family: inherit;
	font-size: 15px;
	padding: 8px 16px;
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	background: var(--accent);
	color: #ffffff;
	cursor: pointer;
}

.search-submit:hover {
	background: var(--accent-dark);
}

/* ---------- Comments ---------- */

.comments-area {
	margin-top: 34px;
	border-top: 1px solid var(--border);
	padding-top: 26px;
}

.comment-list {
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	margin: 14px 0 0;
	padding-left: 26px;
}

.comment-card {
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 20px;
	margin-bottom: 14px;
}

.comment-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	font-size: 15px;
}

.comment-head img {
	border-radius: 50%;
}

.comment-author {
	font-weight: 700;
}

.comment-date {
	color: var(--muted);
	font-size: 14px;
}

.comment-body {
	font-size: 15px;
}

.comment-body p:last-child {
	margin-bottom: 0;
}

.comment-mod {
	color: var(--muted);
	font-style: italic;
}

.comment-reply {
	margin-top: 8px;
	font-size: 14px;
}

.comment-respond {
	background: var(--tint);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px 26px;
}

.comment-respond .comment-reply-title {
	font-size: 22px;
}

.comment-respond label {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	font-family: inherit;
	font-size: 15px;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: #fffdf8;
	color: var(--fg);
	margin-bottom: 14px;
}

.comment-respond .submit {
	font-family: inherit;
	font-size: 15px;
	padding: 9px 22px;
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	background: var(--accent);
	color: #ffffff;
	cursor: pointer;
}

.comment-respond .submit:hover {
	background: var(--accent-dark);
}

.comment-respond .comment-form-cookies-consent {
	font-size: 14px;
	color: var(--muted);
}

.comment-respond .comment-form-cookies-consent input {
	margin-right: 6px;
}

/* ---------- Footer ---------- */

.site-footer {
	background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
	color: #d9cfba;
	margin-top: 40px;
	padding: 44px 0 30px;
}

.footer-top {
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

.footer-brand {
	flex: 0 0 200px;
}

.footer-site {
	font-size: 20px;
	font-weight: 700;
	color: #f6efe3;
}

.footer-site:hover {
	color: #ffffff;
	text-decoration: none;
}

.footer-groups {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 28px;
}

.footer-group .footer-text {
	color: #d9cfba;
	font-size: 15px;
}

.footer-group-title {
	font-size: 17px;
	font-weight: 700;
	color: #f6efe3;
	margin-bottom: 0.6em;
}

.footer-group ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-group li {
	padding: 4px 0;
}

.footer-group a {
	color: #d9cfba;
	font-size: 15px;
}

.footer-group a:hover {
	color: #ffffff;
}

.footer-note {
	font-size: 14px;
	color: rgba(217, 207, 186, 0.75);
	margin: 28px 0 0;
}

.footer-copy {
	font-size: 14px;
	color: rgba(217, 207, 186, 0.6);
	margin: 14px 0 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.grid-2 {
		grid-template-columns: 1fr;
	}

	.footer-top {
		flex-direction: column;
		gap: 26px;
	}

	.footer-brand {
		flex: none;
	}

	#menu-toggle {
		display: inline-block;
	}

	.sub-toggle {
		display: inline-block;
	}

	#site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--navy-deep);
		border-top: 1px solid rgba(246, 239, 227, 0.14);
		padding: 10px 20px 18px;
		z-index: 70;
	}

	#site-nav.nav-open {
		display: block;
	}

	#site-nav > ul {
		flex-direction: column;
		align-items: stretch;
	}

	#site-nav li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
	}

	#site-nav a {
		flex: 1;
	}

	#site-nav .sub-menu {
		position: static;
		flex: 0 0 100%;
		border: 0;
		box-shadow: none;
		background: transparent;
		padding: 0 0 0 18px;
		display: none;
	}

	#site-nav li.sub-open > .sub-menu {
		display: block;
	}

	#site-nav li:hover > .sub-menu,
	#site-nav li:focus-within > .sub-menu {
		display: none;
	}

	#site-nav li.sub-open > .sub-menu {
		display: block;
	}

	.hero-text {
		padding: 30px 22px;
	}

	.hero-text .hero-title {
		font-size: 30px;
	}

	.post-row {
		flex-direction: column;
		align-items: stretch;
	}

	.row-thumb {
		flex: none;
	}

	.entry-title {
		font-size: 27px;
	}

	.entry {
		padding: 22px 18px;
	}
}
