/* 庭话 Tinghua 1.0.0 — 暖灰纸底、深梅与鼠尾草，0 圆角细边线，无阴影。 */
:root {
	--tgh-bg: #F6F4F0;
	--tgh-plum: #533D51;
	--tgh-sage: #64705B;
	--tgh-text: #282629;
	--tgh-muted: #5E5A5F;
	--tgh-card: #FFFFFF;
	--tgh-line: #DDD7CE;
	--tgh-c1: #533D51;
	--tgh-c2: #64705B;
	--tgh-c3: #8A6248;
	--tgh-c4: #3F5560;
	--tgh-s1: 8px;
	--tgh-s2: 12px;
	--tgh-s3: 20px;
	--tgh-s4: 28px;
	--tgh-s5: 40px;
	--tgh-s6: 64px;
	--tgh-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
	--tgh-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tgh-bg); color: var(--tgh-text); font: 17px/1.9 var(--tgh-sans); overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tgh-plum); text-underline-offset: 3px; }
a:hover { color: var(--tgh-sage); }
:focus-visible { outline: 3px solid var(--tgh-sage); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--tgh-serif); color: var(--tgh-text); margin: 0; }
h1 { font-size: 34px; line-height: 1.35; }
h2 { font-size: 24px; line-height: 1.45; }
h3 { font-size: 19px; line-height: 1.5; }
p { margin: 0 0 var(--tgh-s3); }
ul, ol { margin: 0; padding: 0; }

.tgh-wrap { max-width: 1264px; margin: 0 auto; padding: 0 24px; }
.tgh-skip { position: absolute; left: -9999px; top: 0; background: var(--tgh-plum); color: #fff; padding: var(--tgh-s2) var(--tgh-s3); z-index: 10; }
.tgh-skip:focus { left: 8px; top: 8px; }
.tgh-main:focus { outline: none; }

/* 按钮：实底矩形，触控 ≥44 */
.tgh-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 var(--tgh-s3); border: 0; border-radius: 0; background: var(--tgh-plum); color: #fff; font: 15px/1 var(--tgh-sans); cursor: pointer; text-decoration: none; }
.tgh-btn:hover { background: var(--tgh-sage); color: #fff; }

/* 页头：品牌 + 可见搜索一行；栏目一行均分；不吸顶 */
.tgh-head { background: var(--tgh-card); border-bottom: 1px solid var(--tgh-line); }
.tgh-head__bar { display: flex; align-items: center; gap: var(--tgh-s3); min-height: 76px; padding-top: var(--tgh-s2); padding-bottom: var(--tgh-s2); }
.tgh-brand { font: 700 26px/1.3 var(--tgh-serif); color: var(--tgh-plum); text-decoration: none; margin-right: auto; }
.tgh-search { display: flex; align-items: center; gap: var(--tgh-s1); }
.tgh-search__label { font-size: 13px; line-height: 1.6; color: var(--tgh-muted); white-space: nowrap; }
.tgh-search__input { width: 240px; min-height: 44px; padding: 0 var(--tgh-s2); border: 1px solid var(--tgh-line); border-radius: 0; background: var(--tgh-bg); font: 15px/1.4 var(--tgh-sans); color: var(--tgh-text); }
.tgh-search__input:focus { border-color: var(--tgh-plum); }
.tgh-menu-btn, .tgh-menu-btn[hidden] { display: none; }
.tgh-nav { border-top: 1px solid var(--tgh-line); background: var(--tgh-card); }
.tgh-nav__list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.tgh-nav__list li { border-left: 1px solid var(--tgh-line); }
.tgh-nav__list li:last-child { border-right: 1px solid var(--tgh-line); }
.tgh-nav__list a { display: flex; align-items: center; justify-content: center; min-height: 48px; font: 600 16px/1.4 var(--tgh-serif); color: var(--tgh-text); text-decoration: none; }
.tgh-nav__list a:hover, .tgh-nav__list a[aria-current="page"], .tgh-nav__list .current-menu-item > a { color: var(--tgh-plum); box-shadow: inset 0 -3px 0 var(--tgh-plum); }

/* 布局：900 + 280，gap 36 */
.tgh-layout { display: grid; grid-template-columns: minmax(0, 900px) 280px; gap: 36px; padding-top: var(--tgh-s5); padding-bottom: var(--tgh-s6); }
.tgh-layout--list { grid-template-columns: minmax(0, 900px); }
.tgh-layout--read { grid-template-columns: minmax(0, 760px); }
.tgh-primary { min-width: 0; }

/* 首页导读 */
.tgh-intro { background: var(--tgh-card); border: 1px solid var(--tgh-line); border-top: 3px solid var(--tgh-plum); padding: var(--tgh-s4); margin-bottom: var(--tgh-s5); }
.tgh-intro__title { margin-bottom: var(--tgh-s2); }
.tgh-intro__lead { font-size: 17px; color: var(--tgh-text); max-width: 46em; }
.tgh-entry { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tgh-s2); margin-top: var(--tgh-s3); }
.tgh-entry__item { border: 1px solid var(--tgh-line); border-top: 3px solid var(--tgh-c, var(--tgh-plum)); padding: var(--tgh-s2) var(--tgh-s3); background: var(--tgh-bg); }
.tgh-entry__name { font: 700 18px/1.5 var(--tgh-serif); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.tgh-entry__count { font-size: 13px; line-height: 1.6; color: var(--tgh-muted); margin-left: var(--tgh-s1); }
.tgh-entry__desc { font-size: 15px; line-height: 1.7; color: var(--tgh-muted); margin: 0; }
.tgh-col-1 { --tgh-c: var(--tgh-c1); }
.tgh-col-2 { --tgh-c: var(--tgh-c2); }
.tgh-col-3 { --tgh-c: var(--tgh-c3); }
.tgh-col-4 { --tgh-c: var(--tgh-c4); }

.tgh-block { margin-bottom: var(--tgh-s5); }
.tgh-block__title { padding-bottom: var(--tgh-s2); margin-bottom: var(--tgh-s3); border-bottom: 1px solid var(--tgh-line); }

/* 卡片：图上、标题两行、摘要两行、日期在底 */
.tgh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(368px, 100%), 1fr)); gap: var(--tgh-s4); }
.tgh-card { display: flex; flex-direction: column; background: var(--tgh-card); border: 1px solid var(--tgh-line); border-top: 3px solid var(--tgh-c, var(--tgh-plum)); min-width: 0; scroll-margin-top: var(--tgh-s3); }
.tgh-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tgh-line); }
.tgh-card__img { width: 100%; height: 100%; object-fit: cover; }
.tgh-card__body { display: flex; flex-direction: column; flex: 1; padding: var(--tgh-s3); }
.tgh-card__cat { font-size: 13px; line-height: 1.6; color: var(--tgh-c, var(--tgh-plum)); text-decoration: none; margin-bottom: var(--tgh-s1); align-self: flex-start; }
.tgh-card__title { font-size: 20px; line-height: 1.5; margin-bottom: var(--tgh-s1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tgh-card__title a { color: var(--tgh-text); text-decoration: none; }
.tgh-card__title a:hover { color: var(--tgh-plum); text-decoration: underline; }
.tgh-card__excerpt { font-size: 15px; line-height: 1.7; color: var(--tgh-muted); margin-bottom: var(--tgh-s2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tgh-card__meta { margin: auto 0 0; font-size: 13px; line-height: 1.6; color: var(--tgh-muted); }

/* 问题清单：纯文字 */
.tgh-qlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tgh-s3) var(--tgh-s4); }
.tgh-qlist__group { background: var(--tgh-card); border: 1px solid var(--tgh-line); border-top: 3px solid var(--tgh-c, var(--tgh-plum)); padding: var(--tgh-s3); }
.tgh-qlist__name { font-size: 17px; margin-bottom: var(--tgh-s1); }
.tgh-qlist__name a { color: var(--tgh-c, var(--tgh-plum)); text-decoration: none; }
.tgh-qlist ul { list-style: none; }
.tgh-qlist li { padding: var(--tgh-s1) 0; border-top: 1px solid var(--tgh-line); font-size: 15px; line-height: 1.7; }
.tgh-qlist li:first-child { border-top: 0; }
.tgh-qlist li a { color: var(--tgh-text); }
.tgh-qlist time { display: block; font-size: 13px; line-height: 1.6; color: var(--tgh-muted); }

/* 侧栏：阅读方法 */
.tgh-side { min-width: 0; }
.tgh-panel { background: var(--tgh-card); border: 1px solid var(--tgh-line); border-top: 3px solid var(--tgh-sage); padding: var(--tgh-s3); font-size: 15px; line-height: 1.7; }
.tgh-panel__title { font-size: 20px; margin-bottom: var(--tgh-s2); }
.tgh-panel__sub { font-size: 16px; margin: var(--tgh-s3) 0 var(--tgh-s1); }
.tgh-steps { padding-left: 1.4em; margin-bottom: var(--tgh-s3); }
.tgh-steps li { margin-bottom: var(--tgh-s1); }
.tgh-panel__links { font-size: 13px; line-height: 1.6; margin: 0; padding-top: var(--tgh-s2); border-top: 1px solid var(--tgh-line); }
.tgh-panel__links a, .tgh-info-links a { display: inline-flex; min-height: 44px; align-items: center; }
.tgh-info-links, .tgh-panel__links { display: flex; flex-wrap: wrap; align-items: center; }
.tgh-sep { margin: 0 var(--tgh-s1); color: var(--tgh-muted); }

/* 面包屑、栏目头 */
.tgh-crumb ol { list-style: none; display: flex; flex-wrap: wrap; font-size: 13px; line-height: 1.6; color: var(--tgh-muted); margin-bottom: var(--tgh-s2); }
.tgh-crumb li + li::before { content: "›"; margin: 0 var(--tgh-s1); }
.tgh-crumb a { color: var(--tgh-muted); }
.tgh-archive-head { margin-bottom: var(--tgh-s4); }
.tgh-archive-head__title { margin-bottom: var(--tgh-s2); }
.tgh-archive-head__page { font-size: 17px; color: var(--tgh-muted); margin-left: var(--tgh-s2); font-weight: 400; }
.tgh-howto { background: var(--tgh-card); border: 1px solid var(--tgh-line); border-top: 3px solid var(--tgh-c, var(--tgh-plum)); padding: var(--tgh-s3) var(--tgh-s4); }
.tgh-howto__title { font-size: 20px; margin-bottom: var(--tgh-s1); }
.tgh-howto__desc { font-size: 15px; line-height: 1.7; color: var(--tgh-text); margin-bottom: var(--tgh-s2); }
.tgh-howto__lead { font-size: 13px; line-height: 1.6; color: var(--tgh-muted); margin-bottom: var(--tgh-s1); }
.tgh-howto__list { padding-left: 1.4em; font-size: 15px; line-height: 1.7; }
.tgh-howto__list li { margin-bottom: var(--tgh-s1); }

/* 分页 */
.tgh-pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--tgh-s1); margin-top: var(--tgh-s5); }
.tgh-pager a, .tgh-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 var(--tgh-s2); border: 1px solid var(--tgh-line); background: var(--tgh-card); text-decoration: none; font-size: 15px; }
.tgh-pager .current { background: var(--tgh-plum); color: #fff; border-color: var(--tgh-plum); }

/* 文章 */
.tgh-article__band { background: var(--tgh-card); border-bottom: 1px solid var(--tgh-line); padding: var(--tgh-s4) 0 var(--tgh-s3); border-top: 3px solid var(--tgh-c, var(--tgh-plum)); }
.tgh-article__band .tgh-wrap > * { max-width: 1036px; }
.tgh-article__title { margin-bottom: var(--tgh-s1); }
.tgh-article__meta { font-size: 13px; line-height: 1.6; color: var(--tgh-muted); display: flex; gap: var(--tgh-s3); margin-bottom: var(--tgh-s2); }
.tgh-article__summary { font-size: 15px; line-height: 1.7; color: var(--tgh-text); margin: 0; padding-left: var(--tgh-s2); border-left: 3px solid var(--tgh-sage); max-width: 760px; }
.tgh-article__grid { display: grid; grid-template-columns: minmax(0, 760px) 240px; column-gap: 36px; padding-top: var(--tgh-s4); padding-bottom: var(--tgh-s6); align-items: start; }
.tgh-article__grid--solo { grid-template-columns: minmax(0, 760px); }
.tgh-article__grid .tgh-prose { grid-column: 1; grid-row: 1; }
.tgh-notes { grid-column: 2; grid-row: 1; background: var(--tgh-card); border: 1px solid var(--tgh-line); border-top: 3px solid var(--tgh-sage); padding: var(--tgh-s3); font-size: 15px; line-height: 1.7; }
.tgh-notes__title { font-size: 18px; margin-bottom: var(--tgh-s2); }
.tgh-notes ol { padding-left: 1.4em; }
.tgh-notes li { margin-bottom: var(--tgh-s2); }
.tgh-related { grid-column: 1; margin-top: var(--tgh-s5); padding-top: var(--tgh-s3); border-top: 1px solid var(--tgh-line); }
.tgh-related__title { font-size: 22px; margin-bottom: var(--tgh-s2); }
.tgh-related ul { list-style: none; }
.tgh-related li { padding: var(--tgh-s2) 0; border-bottom: 1px solid var(--tgh-line); font-size: 15px; line-height: 1.7; }
.tgh-related__cat { display: inline-block; font-size: 13px; color: var(--tgh-muted); margin-right: var(--tgh-s2); }

.tgh-prose { min-width: 0; }
.tgh-prose h2 { margin: var(--tgh-s5) 0 var(--tgh-s2); }
.tgh-prose h3 { margin: var(--tgh-s4) 0 var(--tgh-s1); }
.tgh-prose ul, .tgh-prose ol { padding-left: 1.5em; margin-bottom: var(--tgh-s3); }
.tgh-prose blockquote { margin: 0 0 var(--tgh-s3); padding: var(--tgh-s2) var(--tgh-s3); border-left: 3px solid var(--tgh-plum); background: var(--tgh-card); }
.tgh-prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: var(--tgh-s3); display: block; overflow-x: auto; }
.tgh-prose th, .tgh-prose td { border: 1px solid var(--tgh-line); padding: var(--tgh-s1) var(--tgh-s2); text-align: left; }
.tgh-figure { margin: 0 0 var(--tgh-s4); }
.tgh-figure__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tgh-figure figcaption { font-size: 13px; line-height: 1.6; color: var(--tgh-muted); padding-top: var(--tgh-s1); }
.tgh-tags { font-size: 13px; line-height: 1.6; color: var(--tgh-muted); margin-top: var(--tgh-s4); }
.tgh-article--page .tgh-article__title { margin-bottom: var(--tgh-s4); }

.tgh-empty, .tgh-notfound { background: var(--tgh-card); border: 1px solid var(--tgh-line); padding: var(--tgh-s4); }
.tgh-notfound .tgh-nav__list { margin-top: var(--tgh-s3); border: 1px solid var(--tgh-line); }
.tgh-btn--link { color: #fff; }

/* 页脚 */
.tgh-foot { background: var(--tgh-plum); color: #EFE9EE; padding: var(--tgh-s4) 0; font-size: 13px; line-height: 1.6; }
.tgh-foot__line { margin-bottom: var(--tgh-s1); font-size: 15px; }
.tgh-foot a { color: #fff; }
.tgh-foot .tgh-info-links { margin: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--tgh-s2); }
.tgh-foot .tgh-sep { color: #C9BCC7; }

/* <1100：单栏 */
@media (max-width: 1099px) {
	.tgh-layout, .tgh-article__grid { grid-template-columns: minmax(0, 1fr); }
	.tgh-notes, .tgh-related, .tgh-article__grid .tgh-prose { grid-column: 1; grid-row: auto; }
	.tgh-notes { margin-top: var(--tgh-s4); }
	.tgh-article__grid .tgh-prose { max-width: 760px; }
}
@media (max-width: 860px) {
	.tgh-search__input { width: 180px; }
}
/* <680：卡片单列、栏目按钮 */
@media (max-width: 679px) {
	h1, .tgh-article__title, .tgh-intro__title, .tgh-archive-head__title { font-size: 28px; line-height: 1.4; }
	h2 { font-size: 22px; }
	.tgh-wrap { padding: 0 16px; }
	.tgh-head__bar { flex-wrap: wrap; gap: var(--tgh-s2); }
	.tgh-brand { font-size: 22px; }
	.tgh-search { order: 3; width: 100%; }
	.tgh-search__input { flex: 1; width: auto; min-width: 0; }
	.tgh-menu-btn:not([hidden]) { display: inline-flex; }
	.tgh-js .tgh-nav { display: none; }
	.tgh-js .tgh-nav.is-open { display: block; }
	.tgh-nav__list { grid-template-columns: repeat(2, 1fr); }
	.tgh-nav__list li { border-left: 0; border-right: 0; border-bottom: 1px solid var(--tgh-line); }
	.tgh-nav__list li:nth-child(odd) { border-right: 1px solid var(--tgh-line); }
	.tgh-nav__list li:last-child { border-right: 0; }
	.tgh-layout { padding-top: var(--tgh-s4); }
	.tgh-intro { padding: var(--tgh-s3); }
	.tgh-entry, .tgh-qlist { grid-template-columns: minmax(0, 1fr); }
	.tgh-howto { padding: var(--tgh-s3); }
	.tgh-article__meta { flex-wrap: wrap; gap: var(--tgh-s1) var(--tgh-s3); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .tgh-head, .tgh-foot, .tgh-side, .tgh-notes { display: none; } }
