@charset "UTF-8";

/* ==========================================================================
   Paperink — 纸感杂志风技术博客主题
   1. 设计令牌   2. 基础重置   3. 布局   4. 刊头与导航
   5. 首页       6. 文章页   7. 列表/归档   8. 评论   9. 页脚
   10. 响应式    11. 夜读模式
   ========================================================================== */

/* 1. 设计令牌 ------------------------------------------------------------- */
:root {
	--paper: #faf5ea;
	--paper-tint: #f3ebda;
	--paper-deep: #ebe0cb;
	--ink: #211c15;
	--ink-soft: #4a4136;
	--muted: #7b6f5f;
	--rule: #d9cdb6;
	--rule-strong: #b6a88d;
	--accent: #a63d2e;
	--accent-ink: #8c3226;

	--code-bg: #221e18;
	--code-fg: #e7ddc9;
	--code-com: #7e7364;
	--code-str: #d2a85c;
	--code-kw: #e08a6e;
	--code-num: #b9c79a;
	--code-fn: #9fc0b4;
	--code-line: #38322a;

	--serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", Georgia, "Times New Roman", "STSong", serif;
	--sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
	--mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--measure: 42rem;
	--gutter: clamp(18px, 4vw, 40px);
	--radius: 3px;
	--ease: cubic-bezier(.2, .7, .3, 1);
}

/* 2. 基础重置 ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 88px;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 17px;
	line-height: 1.9;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 900;
	pointer-events: none;
	opacity: .045;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
	background-size: 160px 160px;
}

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

a {
	color: inherit;
	text-decoration: none;
	transition: color .18s var(--ease);
}
a:hover { color: var(--accent); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--serif);
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 .6em;
	letter-spacing: .01em;
}

p { margin: 0 0 1.4em; }

hr {
	border: 0;
	height: 1px;
	background: var(--rule);
	margin: 2.4em 0;
}

::selection { background: #f0d9b8; color: var(--ink); }

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--ink);
	color: var(--paper);
	padding: 10px 18px;
	font-family: var(--sans);
	font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--paper); }

/* 阅读进度 */
.read-progress {
	position: fixed;
	top: 0; left: 0;
	height: 2px;
	width: 0;
	background: var(--accent);
	z-index: 950;
	transition: width .1s linear;
}

/* 3. 布局 ----------------------------------------------------------------- */
.wrap {
	width: 100%;
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 900px; }

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; padding-bottom: 72px; }

.hairline { height: 1px; background: var(--rule); border: 0; margin: 0; }

.rule-double {
	height: 4px;
	border-top: 1px solid var(--rule-strong);
	border-bottom: 1px solid var(--rule);
	margin: 0;
}

/* 元信息 */
.meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5em;
	font-family: var(--sans);
	font-size: 12.5px;
	letter-spacing: .04em;
	color: var(--muted);
	line-height: 1.7;
}
.meta > span { display: inline-flex; align-items: center; }
.meta > span + span::before {
	content: "";
	display: inline-block;
	width: 3px; height: 3px;
	border-radius: 50%;
	background: var(--rule-strong);
	margin-right: .55em;
}
.meta a { border-bottom: 1px solid transparent; }
.meta a:hover { border-bottom-color: var(--accent); }

.kicker {
	display: inline-block;
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 12px;
}
.kicker a { color: inherit; }

/* 4. 刊头与导航 ------------------------------------------------------------ */
.site-header { position: relative; }

.topbar {
	border-bottom: 1px solid var(--rule);
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .1em;
	color: var(--muted);
}
.topbar .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 38px;
}
.topbar__date { text-transform: uppercase; letter-spacing: .14em; }
.topbar__date-short { display: none; }
.topbar__actions { display: flex; align-items: center; gap: 18px; }

.topbar button,
.topbar summary {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
	cursor: pointer;
	list-style: none;
}
.topbar button:hover,
.topbar summary:hover { color: var(--accent); }
.topbar summary::-webkit-details-marker { display: none; }

.search-pop { position: relative; }
.search-pop > summary { display: inline-flex; align-items: center; gap: 6px; }
.search-pop[open] > summary { color: var(--accent); }
.search-pop__panel {
	position: absolute;
	right: 0;
	top: calc(100% + 12px);
	z-index: 60;
	width: min(92vw, 320px);
	background: var(--paper);
	border: 1px solid var(--rule-strong);
	padding: 14px;
	box-shadow: 0 12px 28px rgba(51, 40, 24, .1);
}

.masthead { text-align: center; padding: clamp(26px, 4.4vw, 52px) 0 clamp(20px, 3vw, 34px); }
.masthead__title {
	margin: 0;
	font-size: clamp(32px, 6.2vw, 54px);
	font-weight: 600;
	letter-spacing: .18em;
	text-indent: .18em;
	line-height: 1.1;
}
.masthead__title a:hover { color: var(--ink); }
.masthead__tagline {
	margin: 14px 0 0;
	font-family: var(--sans);
	font-size: 11px;
	letter-spacing: .34em;
	text-transform: uppercase;
	color: var(--muted);
	text-indent: .34em;
}

.site-nav {
	position: sticky;
	top: 0;
	z-index: 80;
	background: var(--paper);
	border-top: 1px solid var(--rule-strong);
	border-bottom: 1px solid var(--rule);
}
.site-nav .wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.site-nav ul {
	display: flex;
	align-items: center;
	gap: clamp(16px, 2.4vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav li { flex: 0 0 auto; }
.site-nav a {
	display: block;
	padding: 13px 2px;
	font-family: var(--serif);
	font-size: 15px;
	letter-spacing: .06em;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--rule-strong); color: var(--ink); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-parent > a,
.site-nav .current-menu-ancestor > a { border-bottom-color: var(--accent); }
.site-nav__search { display: none; }

/* 通栏搜索表单 */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	background: transparent;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 13px;
	padding: 8px 10px;
}
.search-form input[type="search"]::placeholder { color: var(--muted); }
.search-form button {
	flex: 0 0 auto;
	background: var(--ink);
	color: var(--paper);
	border: 1px solid var(--ink);
	border-radius: var(--radius);
	font-family: var(--sans);
	font-size: 12px;
	letter-spacing: .12em;
	padding: 8px 14px;
	cursor: pointer;
	transition: background .18s var(--ease);
}
.search-form button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 5. 首页 ----------------------------------------------------------------- */
.home-hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: 34px;
	padding: 44px 0 12px;
}
.hero-lead__thumb {
	display: block;
	overflow: hidden;
	border: 1px solid var(--rule);
	background: var(--paper-tint);
	margin-bottom: 22px;
}
.hero-lead__thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform .6s var(--ease), filter .4s var(--ease);
	filter: saturate(.94);
}
.hero-lead:hover .hero-lead__thumb img { transform: scale(1.015); filter: saturate(1); }
.hero-lead__title {
	font-size: clamp(26px, 3.6vw, 40px);
	line-height: 1.24;
	letter-spacing: 0;
	margin: 0 0 14px;
}
.hero-lead__dek {
	font-size: 16.5px;
	line-height: 1.85;
	color: var(--ink-soft);
	margin: 0 0 16px;
	max-width: 38em;
}

.hero-list { border-top: 2px solid var(--ink); }
.hero-list__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
	padding: 10px 0;
	border-bottom: 1px solid var(--rule);
}
.hero-list ol { list-style: none; margin: 0; padding: 0; counter-reset: hero; }
.hero-list li { counter-increment: hero; border-bottom: 1px solid var(--rule); }
.hero-list li:last-child { border-bottom: 0; }
.hero-list a {
	display: grid;
	grid-template-columns: 34px 1fr;
	gap: 12px;
	padding: 16px 0;
	align-items: start;
}
.hero-list a::before {
	content: counter(hero, decimal-leading-zero);
	font-family: var(--serif);
	font-size: 13px;
	color: var(--rule-strong);
	padding-top: 4px;
	letter-spacing: .06em;
}
.hero-list a:hover::before { color: var(--accent); }
.hero-list__title {
	font-family: var(--serif);
	font-size: 16.5px;
	line-height: 1.55;
	display: block;
}
.hero-list__meta {
	display: block;
	margin-top: 5px;
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .06em;
	color: var(--muted);
}

.section { padding-top: 52px; }
.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	border-top: 2px solid var(--ink);
	padding-top: 12px;
	margin-bottom: 30px;
}
.section-head__title {
	margin: 0;
	font-size: 19px;
	letter-spacing: .1em;
	font-weight: 600;
}
.section-head__more {
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
	white-space: nowrap;
}
.section-head__more:hover { color: var(--accent); }

.card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 34px 30px;
}
.card { display: flex; flex-direction: column; }
.card__thumb {
	display: block;
	overflow: hidden;
	border: 1px solid var(--rule);
	background: var(--paper-tint);
	margin-bottom: 16px;
}
.card__thumb img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform .6s var(--ease);
	filter: saturate(.94);
}
.card:hover .card__thumb img { transform: scale(1.02); filter: saturate(1); }
.card__thumb--empty {
	aspect-ratio: 3 / 2;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--rule-strong);
	font-family: var(--sans);
	font-size: 11px;
	letter-spacing: .3em;
}
.card__title {
	font-size: 19.5px;
	line-height: 1.5;
	margin: 0 0 10px;
	letter-spacing: 0;
}
.card__title a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s var(--ease); }
.card:hover .card__title a { background-size: 100% 1px; }
.card__excerpt {
	font-size: 14.5px;
	line-height: 1.8;
	color: var(--ink-soft);
	margin: 0 0 14px;
}
.card__excerpt p { margin: 0; }
.card .meta { margin-top: auto; }

.cat-index {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	border-top: 1px solid var(--rule);
}
.cat-index__item {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--rule);
}
.cat-index__name { font-size: 17px; letter-spacing: .04em; }
.cat-index__desc {
	font-family: var(--sans);
	font-size: 12.5px;
	color: var(--muted);
	flex: 1 1 auto;
}
.cat-index__count {
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .1em;
	color: var(--muted);
	white-space: nowrap;
}

/* 6. 文章页 --------------------------------------------------------------- */
.entry-header { padding: clamp(30px, 4vw, 54px) 0 0; }
.entry-title {
	margin: 0;
	font-size: clamp(29px, 4.6vw, 46px);
	line-height: 1.22;
	letter-spacing: -.005em;
	font-weight: 600;
}
.entry-dek {
	margin: 18px 0 0;
	font-size: 17.5px;
	line-height: 1.85;
	color: var(--ink-soft);
	max-width: 36em;
}
.entry-header .meta { margin-top: 22px; }
.entry-header__rule { margin-top: 26px; }

.entry-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
	padding-top: 38px;
}

.toc {
	font-family: var(--sans);
	font-size: 13px;
	line-height: 1.7;
}
.toc__inner {
	border-top: 1px solid var(--ink);
	padding-top: 12px;
}
.toc__label {
	display: block;
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 10px;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0 0 7px; }
.toc li::before {
	content: counter(toc, decimal-leading-zero) " ";
	color: var(--rule-strong);
	font-size: 11px;
	margin-right: 6px;
}
.toc ol ol { counter-reset: toc3; margin-top: 7px; padding-left: 22px; }
.toc ol ol li { counter-increment: toc3; font-size: 12.5px; color: var(--muted); }
.toc ol ol li::before { content: "· "; font-size: 12px; }
.toc ol ol li a { color: var(--muted); }
.toc a { border-bottom: 1px solid transparent; }
.toc a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.toc a.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.toc__empty { display: none; }

.entry-body { min-width: 0; }

.entry-content {
	max-width: var(--measure);
	font-family: var(--serif);
	font-size: 17.5px;
	line-height: 1.95;
	color: var(--ink);
	overflow-wrap: break-word;
}
.entry-content > *:first-child { margin-top: 0; }

.entry-content > p:first-of-type::first-letter {
	float: left;
	font-family: var(--serif);
	font-size: 3.5em;
	line-height: .84;
	font-weight: 600;
	color: var(--accent);
	padding: .06em .1em 0 0;
}

.entry-content h2 {
	position: relative;
	font-size: clamp(22px, 2.6vw, 26px);
	line-height: 1.4;
	margin: 2.1em 0 .85em;
	padding-left: 16px;
	letter-spacing: .01em;
}
.entry-content h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: .28em;
	width: 4px;
	height: 1.05em;
	background: var(--accent);
}
.entry-content h3 {
	font-size: 19.5px;
	margin: 1.9em 0 .7em;
	letter-spacing: .01em;
}
.entry-content h4 { font-size: 17px; margin: 1.6em 0 .6em; }
.entry-content h2 + h3, .entry-content h2 + h4 { margin-top: 1em; }

.entry-content p { margin: 0 0 1.55em; }
.entry-content a {
	color: var(--accent-ink);
	border-bottom: 1px solid rgba(166, 61, 46, .35);
	transition: border-color .18s var(--ease), color .18s var(--ease);
}
.entry-content a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.entry-content ul,
.entry-content ol { margin: 0 0 1.55em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .5em; }
.entry-content ul { list-style: none; padding-left: 1.2em; }
.entry-content ul > li { position: relative; }
.entry-content ul > li::before {
	content: "—";
	position: absolute;
	left: -1.2em;
	color: var(--rule-strong);
}
.entry-content ul ul { margin-top: .5em; }
.entry-content ol { list-style: decimal; }
.entry-content ol > li::marker { color: var(--muted); font-family: var(--sans); font-size: .85em; }

.entry-content blockquote {
	margin: 2em 0;
	padding: 4px 0 4px 22px;
	border-left: 2px solid var(--accent);
	color: var(--ink-soft);
	font-size: 18px;
	line-height: 1.85;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite {
	display: block;
	margin-top: .8em;
	font-family: var(--sans);
	font-size: 12px;
	font-style: normal;
	letter-spacing: .06em;
	color: var(--muted);
}

.entry-content hr { margin: 2.6em 0; background: var(--rule); }

.entry-content img { border: 1px solid var(--rule); }

.entry-content figure { margin: 2em 0; }
.entry-content figcaption {
	margin-top: 10px;
	font-family: var(--sans);
	font-size: 12px;
	letter-spacing: .04em;
	color: var(--muted);
	text-align: center;
	line-height: 1.7;
}
.entry-content .wp-caption-text,
.entry-content .wp-element-caption { font-family: var(--sans); font-size: 12px; color: var(--muted); }

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.8em 0;
	font-size: 15px;
	font-family: var(--sans);
	line-height: 1.7;
}
.entry-content th {
	text-align: left;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink-soft);
	border-bottom: 1px solid var(--ink);
	padding: 10px 12px 10px 0;
	white-space: nowrap;
}
.entry-content td {
	border-bottom: 1px solid var(--rule);
	padding: 11px 12px 11px 0;
	vertical-align: top;
}
.entry-content tr:last-child td { border-bottom: 0; }

/* 行内代码 */
.entry-content code,
.entry-content kbd,
.entry-content samp {
	font-family: var(--mono);
	font-size: .86em;
	background: var(--paper-tint);
	border: 1px solid var(--rule);
	border-radius: 2px;
	padding: .1em .38em;
	color: var(--accent-ink);
	white-space: nowrap;
}

/* 代码块 */
.code-block {
	position: relative;
	margin: 1.9em 0;
	background: var(--code-bg);
	border-radius: var(--radius);
	overflow: hidden;
	max-width: 100%;
}
.code-block__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 14px;
	border-bottom: 1px solid var(--code-line);
	font-family: var(--sans);
	font-size: 10.5px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #9c9280;
}
.code-block__copy {
	background: none;
	border: 0;
	padding: 2px 0;
	font: inherit;
	letter-spacing: inherit;
	color: #9c9280;
	cursor: pointer;
	transition: color .18s var(--ease);
}
.code-block__copy:hover { color: var(--code-fg); }
.code-block__copy.is-done { color: #b9c79a; }

.code-block pre {
	margin: 0;
	padding: 16px 18px 18px;
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 13.5px;
	line-height: 1.75;
	color: var(--code-fg);
	tab-size: 4;
	-webkit-overflow-scrolling: touch;
}
.code-block pre code {
	display: block;
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font-size: inherit;
	white-space: pre;
	word-break: normal;
	overflow-wrap: normal;
}

/* 代码着色 */
.tok-com { color: var(--code-com); font-style: italic; }
.tok-str { color: var(--code-str); }
.tok-kw  { color: var(--code-kw); }
.tok-num { color: var(--code-num); }
.tok-fn  { color: var(--code-fn); }
.tok-var { color: #dcc59b; }
.tok-tag { color: var(--code-kw); }
.tok-attr { color: var(--code-fn); }

.entry-content pre:not(.code-block pre) {
	background: var(--code-bg);
	color: var(--code-fg);
	padding: 16px 18px;
	border-radius: var(--radius);
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 13.5px;
	line-height: 1.75;
	margin: 1.9em 0;
}

/* 文章尾部 */
.entry-footer { margin-top: 44px; }
.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
}
.tag-chip {
	display: inline-block;
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .08em;
	color: var(--ink-soft);
	border: 1px solid var(--rule-strong);
	border-radius: 999px;
	padding: 4px 12px;
	transition: all .18s var(--ease);
}
.tag-chip:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.author-box {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 18px;
	align-items: start;
	padding: 26px 0;
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}
.author-box__avatar,
.author-box__avatar img {
	width: 56px; height: 56px;
	border-radius: 50%;
	border: 1px solid var(--rule);
}
.author-box__name { font-size: 16px; margin: 0 0 6px; letter-spacing: .04em; }
.author-box__bio {
	font-family: var(--sans);
	font-size: 13px;
	line-height: 1.75;
	color: var(--muted);
	margin: 0;
}
.author-box__bio p { margin: 0; }

.post-nav {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	margin-top: 34px;
	border-top: 1px solid var(--rule);
}
.post-nav__item {
	display: block;
	padding: 20px 0;
	border-bottom: 1px solid var(--rule);
}
.post-nav__label {
	display: block;
	font-family: var(--sans);
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 7px;
}
.post-nav__title { font-size: 16.5px; line-height: 1.5; }
.post-nav__item:hover .post-nav__title { color: var(--accent); }
.post-nav__item--next { text-align: right; }

.related { padding-top: 52px; }

/* 分页 */
.pagination {
	margin-top: 46px;
	padding-top: 22px;
	border-top: 1px solid var(--rule);
	font-family: var(--sans);
	font-size: 13px;
}
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid transparent;
	color: var(--muted);
	transition: all .18s var(--ease);
}
.pagination .page-numbers:hover { color: var(--ink); border-color: var(--rule-strong); }
.pagination .page-numbers.current { color: var(--ink); border-color: var(--ink); }
.pagination .page-numbers.dots { border: 0; }

/* 7. 列表 / 归档 / 搜索 / 404 --------------------------------------------- */
.page-head {
	padding: clamp(34px, 4vw, 56px) 0 26px;
	border-bottom: 2px solid var(--ink);
	margin-bottom: 34px;
}
.page-head__kicker {
	font-family: var(--sans);
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 10px;
}
.page-head__title {
	margin: 0;
	font-size: clamp(27px, 3.6vw, 38px);
	line-height: 1.25;
	letter-spacing: .02em;
}
.page-head__desc {
	margin: 14px 0 0;
	font-size: 15.5px;
	line-height: 1.8;
	color: var(--ink-soft);
	max-width: 34em;
}
.page-head__desc p { margin: 0; }
.page-head__count {
	margin-top: 12px;
	font-family: var(--sans);
	font-size: 12px;
	letter-spacing: .1em;
	color: var(--muted);
}

.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list__year {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 34px 0 6px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--ink);
}
.archive-list__year:first-child { margin-top: 0; }
.archive-list__year-num {
	font-family: var(--serif);
	font-size: 22px;
	letter-spacing: .04em;
}
.archive-list__year-count {
	font-family: var(--sans);
	font-size: 11px;
	letter-spacing: .12em;
	color: var(--muted);
}
.archive-row {
	display: grid;
	grid-template-columns: 62px 1fr;
	gap: 16px;
	align-items: baseline;
	padding: 15px 0;
	border-bottom: 1px solid var(--rule);
}
.archive-row__date {
	font-family: var(--sans);
	font-size: 12px;
	letter-spacing: .06em;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.archive-row__title { font-size: 17px; line-height: 1.55; }
.archive-row:hover .archive-row__title { color: var(--accent); }
.archive-row__cat {
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .08em;
	color: var(--muted);
}

.search-hit { border-bottom: 1px solid var(--rule); padding: 22px 0; }
.search-hit__title { font-size: 19px; margin: 0 0 8px; line-height: 1.5; }
.search-hit__excerpt {
	font-size: 14.5px;
	line-height: 1.8;
	color: var(--ink-soft);
	margin: 0 0 10px;
}
.search-hit mark { background: #f1dcbb; color: var(--ink); padding: 0 2px; }

.notice {
	border: 1px solid var(--rule-strong);
	background: var(--paper-tint);
	padding: 28px 26px;
	font-family: var(--sans);
	font-size: 14px;
	line-height: 1.85;
	color: var(--ink-soft);
}
.notice h2 { font-size: 19px; margin: 0 0 10px; color: var(--ink); }
.notice p:last-child { margin-bottom: 0; }

.error-page { padding: clamp(40px, 8vw, 96px) 0 60px; text-align: center; }
.error-page__code {
	font-family: var(--serif);
	font-size: clamp(84px, 18vw, 168px);
	line-height: .9;
	letter-spacing: .04em;
	color: var(--paper-deep);
	margin: 0;
	-webkit-text-stroke: 1px var(--rule-strong);
}
.error-page__title { font-size: 24px; margin: 18px 0 12px; }
.error-page__text {
	font-family: var(--sans);
	font-size: 14px;
	color: var(--muted);
	max-width: 30em;
	margin: 0 auto 28px;
	line-height: 1.85;
}
.error-page .search-form { max-width: 380px; margin: 0 auto; }

/* 8. 评论 ----------------------------------------------------------------- */
.comments-area { margin-top: 54px; padding-top: 26px; border-top: 2px solid var(--ink); }
.comments-title, .comment-reply-title {
	font-size: 19px;
	letter-spacing: .08em;
	margin: 0 0 22px;
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 22px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-family: var(--sans);
	font-size: 12.5px;
	color: var(--muted);
	margin-bottom: 10px;
}
.comment-author img { border-radius: 50%; margin-right: 8px; }
.comment-author .fn { font-style: normal; color: var(--ink); letter-spacing: .03em; }
.comment-metadata a { color: var(--muted); }
.comment-content { font-size: 15.5px; line-height: 1.85; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { font-family: var(--sans); font-size: 12px; letter-spacing: .06em; }
.comment-respond { margin-top: 34px; }
.comment-form { display: grid; gap: 14px; font-family: var(--sans); font-size: 13px; }
.comment-form label { display: block; margin-bottom: 6px; letter-spacing: .06em; color: var(--ink-soft); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	background: transparent;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 15px;
	padding: 10px 12px;
	line-height: 1.7;
}
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form .submit {
	justify-self: start;
	background: var(--ink);
	color: var(--paper);
	border: 1px solid var(--ink);
	border-radius: var(--radius);
	font-family: var(--sans);
	font-size: 12px;
	letter-spacing: .14em;
	padding: 11px 26px;
	cursor: pointer;
	transition: background .18s var(--ease);
}
.comment-form .submit:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { margin: 0; }
.comment-notes, .logged-in-as {
	font-family: var(--sans);
	font-size: 12px;
	color: var(--muted);
}

/* 9. 页脚 ----------------------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--rule-strong);
	margin-top: 40px;
	padding-top: 44px;
	font-family: var(--sans);
}
.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 34px;
	padding-bottom: 40px;
}
.footer-col__title {
	font-family: var(--sans);
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 14px;
}
.footer-col p { font-size: 13.5px; line-height: 1.85; color: var(--ink-soft); margin: 0 0 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; font-size: 13.5px; color: var(--ink-soft); }
.footer-col a { border-bottom: 1px solid transparent; }
.footer-col a:hover { border-bottom-color: var(--accent); }
.footer-masthead {
	font-family: var(--serif);
	font-size: 22px;
	letter-spacing: .2em;
	margin: 0 0 12px;
	color: var(--ink);
}
.colophon {
	border-top: 1px solid var(--rule);
	padding: 20px 0 28px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	justify-content: space-between;
	font-size: 11.5px;
	letter-spacing: .06em;
	color: var(--muted);
}

/* 10. 响应式 -------------------------------------------------------------- */
@media (min-width: 640px) {
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cat-index { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
	.post-nav { grid-template-columns: 1fr 1fr; }
	.post-nav__item { border-bottom: 0; }
	.post-nav__item--next { border-left: 1px solid var(--rule); padding-left: 24px; }
	.post-nav__item--prev { padding-right: 24px; }
	.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.comment-form .comment-form-author,
	.comment-form .comment-form-email,
	.comment-form .comment-form-url { display: inline-block; width: calc(33.333% - 10px); margin-right: 10px; vertical-align: top; }
}

@media (min-width: 900px) {
	.home-hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 4.4vw, 64px); padding-top: 56px; }
	.footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 1000px) {
	.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.entry-layout { grid-template-columns: 216px minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); }
	.toc__inner { position: sticky; top: 92px; }
	.entry-body { padding-right: 8px; }
}

@media (max-width: 639px) {
	.topbar__date-full { display: none; }
	.topbar__date-short { display: inline; }
	.masthead__title { letter-spacing: .12em; text-indent: .12em; }
	.entry-content { font-size: 17px; line-height: 1.9; }
	.entry-content > p:first-of-type::first-letter { font-size: 3.1em; }
	.code-block { margin-inline: calc(var(--gutter) * -1 + 4px); border-radius: 0; }
	.archive-row { grid-template-columns: 1fr; gap: 4px; }
	.archive-row__date { order: 2; }
	.cat-index { grid-template-columns: 1fr; }
	.colophon { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		transition-duration: .001ms !important;
	}
}

/* 11. 夜读模式 ------------------------------------------------------------ */
[data-theme="dark"] {
	--paper: #191613;
	--paper-tint: #211d18;
	--paper-deep: #2b251e;
	--ink: #e9e0cf;
	--ink-soft: #c4b8a3;
	--muted: #938873;
	--rule: #352e26;
	--rule-strong: #4d4437;
	--accent: #cd7057;
	--accent-ink: #d98a6e;

	--code-bg: #100e0b;
	--code-fg: #ddd3c0;
	--code-com: #6f6555;
	--code-str: #d2ab63;
	--code-kw: #dd8a6d;
	--code-num: #aebe8f;
	--code-fn: #96bbae;
	--code-line: #29241d;
}
[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .028; }
[data-theme="dark"] ::selection { background: #4a3a2a; color: var(--ink); }
[data-theme="dark"] .search-form button { background: var(--ink); color: #191613; }
[data-theme="dark"] .comment-form .submit { background: var(--ink); color: #191613; }
[data-theme="dark"] .tag-chip:hover { background: var(--ink); color: #191613; }
[data-theme="dark"] .search-hit mark { background: #4a3a22; color: var(--ink); }

/* 12. 细节修正与补充 ------------------------------------------------------ */
.breadcrumb { padding-top: 26px; font-size: 12px; }
.entry-header { padding-top: clamp(16px, 2.4vw, 30px); }

.entry-layout--single { grid-template-columns: minmax(0, 1fr); }
.entry-layout--single .entry-body { padding-right: 0; max-width: var(--measure); }

.search-form-wrap { max-width: 420px; margin-bottom: 34px; }

.entry-content code { white-space: normal; overflow-wrap: break-word; }
.entry-content iframe,
.entry-content video,
.entry-content embed { max-width: 100%; }

.archive-list { list-style: none; margin: 0; padding: 0; }
.related { padding-top: 56px; }

.toc__toggle {
	display: none;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	background: none;
	border: 0;
	border-top: 1px solid var(--ink);
	padding: 12px 0;
	font-family: var(--sans);
	font-size: 11.5px;
	letter-spacing: .18em;
	color: var(--muted);
	cursor: pointer;
}

@media (max-width: 999px) {
	.toc { margin-bottom: 8px; }
	.toc__toggle { display: flex; }
	.toc__label { display: none; }
	.toc__inner { border-top: 0; padding-top: 0; }
	.has-js .toc__inner { display: none; }
	.has-js .toc.is-open .toc__inner { display: block; padding-bottom: 10px; }
	.toc ol ol { padding-left: 16px; }
}

@media (max-width: 640px) {
	.entry-content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}
	.entry-content blockquote { font-size: 16.5px; padding-left: 16px; }
	.related .card-grid { gap: 28px; }
}

/* 13. 正文双栏居中，避免右侧留白失衡 -------------------------------- */
@media (min-width: 1000px) {
	.entry-layout { justify-content: center; }
	.entry-layout--single { justify-content: start; }
	.entry-layout--single .entry-body { margin-inline: 0; }
}

/* 14. 正文列为固定版心，双栏整体居中 -------------------------------- */
@media (min-width: 1000px) {
	.entry-layout {
		grid-template-columns: 216px minmax(0, var(--measure));
		justify-content: center;
		gap: clamp(36px, 4vw, 64px);
	}
	.entry-layout--single {
		grid-template-columns: minmax(0, var(--measure));
		justify-content: center;
	}
	.entry-layout--single .entry-body { max-width: none; }
	.entry-body { max-width: none; }
}

/* 15. 评论表单：三列姓名/邮箱/网址，其余整行 ------------------------ */
@media (min-width: 640px) {
	.comment-form {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 14px;
	}
	.comment-form > p,
	.comment-form .comment-form-cookies-consent,
	.comment-form .logged-in-as,
	.comment-form .comment-notes,
	.comment-form .form-submit { grid-column: 1 / -1; }
	.comment-form .comment-form-author,
	.comment-form .comment-form-email,
	.comment-form .comment-form-url {
		display: block;
		width: auto;
		margin-right: 0;
		grid-column: auto;
	}
}

/* 16. 只有上一篇或下一篇时占满整行 -------------------------------- */
.post-nav--alone { grid-template-columns: 1fr; }
.post-nav--alone .post-nav__item--next {
	text-align: right;
	border-left: 0;
	padding-left: 0;
}
.post-nav--alone .post-nav__item--prev { padding-right: 0; }

/* 17. 平板宽度下限制头条图高度 ------------------------------------ */
@media (max-width: 899px) {
	.hero-lead__thumb img { max-height: 380px; }
}

/* 18. 吸顶导航与管理工具栏偏移 -------------------------------------- */
body.admin-bar .site-nav { top: 32px; }
body.admin-bar .toc__inner { top: 124px; }

@media (max-width: 782px) {
	body.admin-bar .site-nav { top: 46px; }
	body.admin-bar .toc__inner { top: 138px; }
}
