/* ==========================================================================
   Quill — 简约博客主题样式
   1. 设计令牌        5. 单篇文章
   2. 基础与排版      6. 归档与搜索
   3. 页头与导航      7. 评论与表单
   4. 卡片与列表      8. 响应式
   ========================================================================== */

/* 1. 设计令牌
   ========================================================================== */

:root {
	/* 中性底色带一点冷调，与天蓝强调色同一色系 */
	--q-bg:        #f5f7fa;
	--q-surface:   #ffffff;
	--q-surface-2: #eef1f5;
	--q-text:      #15181d;
	--q-text-2:    #5a6069;
	--q-text-3:    #8a9099;
	--q-border:    #e2e5ea;
	--q-border-2:  #d1d5dc;

	/*
	 * 天蓝。品牌色是 #00a2ff，但它在浅底上做文字只有 2.76:1，
	 * 远低于可读标准（4.5:1），链接会明显发虚。
	 * 这里压深到 #0075b8：色相 201.9°、饱和度 100% 与原色完全一致，
	 * 仅明度从 100% 降到 72%，视觉上仍是同一个蓝，
	 * 而在白底 / #f5f7fa 上分别达到 4.96:1 / 4.62:1，均达标。
	 */
	--q-accent:    #0075b8;

	/*
	 * 浅色底不写死 rgba，而是从 --q-accent 派生。
	 * 这样以后在后台换任何强调色，浅底都会自动跟随，
	 * 不会出现「主色是蓝、浅底还是绿」的割裂。
	 */
	--q-accent-soft: color-mix(in srgb, var(--q-accent) 9%, transparent);

	/*
	 * 压在「强调色实底」上的文字色。
	 * 浅色模式的强调色足够深，配白字达标；
	 * 深色模式的强调色是亮色，必须反过来配深字 ——
	 * 抽成变量后，所有强调底组件统一引用，
	 * 不必每个组件各写一遍 [data-theme="dark"] 覆盖。
	 */
	--q-on-accent: #ffffff;

	--q-radius-sm: 8px;
	--q-radius:    14px;
	--q-radius-lg: 20px;

	--q-shadow-sm: 0 1px 2px rgba(16, 20, 28, 0.04);
	--q-shadow:    0 2px 10px rgba(16, 20, 28, 0.05);
	--q-shadow-lg: 0 10px 30px rgba(16, 20, 28, 0.08);

	--q-container: 1180px;
	--q-gap: 28px;

	--q-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
		"Noto Sans CJK SC", Roboto, Helvetica, Arial, sans-serif;
	--q-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
		"Courier New", monospace;

	--q-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
	/* 深色底同样偏冷，避免天蓝压在暖灰上发脏 */
	--q-bg:        #111417;
	--q-surface:   #191d21;
	--q-surface-2: #21262b;
	--q-text:      #eaedf1;
	--q-text-2:    #a0a7b0;
	--q-text-3:    #737a83;
	--q-border:    #282e34;
	--q-border-2:  #373e45;

	/*
	 * 深色底正是 #00a2ff 的强项：对 #111417 达 6.70:1，
	 * 所以这里直接用用户指定的原色，不做任何压深。
	 */
	--q-accent:    #00a2ff;
	--q-accent-soft: color-mix(in srgb, var(--q-accent) 14%, transparent);

	/* 亮蓝底上必须用深字，白字只有 2.76:1 不可读 */
	--q-on-accent: #0f1216;

	--q-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
	--q-shadow:    0 2px 10px rgba(0, 0, 0, 0.35);
	--q-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* 2. 基础与排版
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--q-bg);
	color: var(--q-text);
	font-family: var(--q-font);
	font-size: 16px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: background-color 0.25s var(--q-ease), color 0.25s var(--q-ease);
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--q-text);
}

p {
	margin: 0 0 1.2em;
}

a {
	color: var(--q-accent);
	text-decoration: none;
	transition: color 0.18s var(--q-ease);
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

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

hr {
	border: 0;
	border-top: 1px solid var(--q-border);
	margin: 2.5em 0;
}

code, pre, kbd, samp {
	font-family: var(--q-mono);
	font-size: 0.875em;
}

:not(pre) > code {
	background: var(--q-surface-2);
	color: var(--q-accent);
	padding: 0.15em 0.4em;
	border-radius: 5px;
	border: 1px solid var(--q-border);
}

blockquote {
	margin: 1.8em 0;
	padding: 0.2em 0 0.2em 1.3em;
	border-left: 3px solid var(--q-accent);
	color: var(--q-text-2);
}

blockquote p:last-child {
	margin-bottom: 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.8em 0;
	font-size: 0.9375rem;
}

th, td {
	padding: 0.7em 0.9em;
	border-bottom: 1px solid var(--q-border);
	text-align: left;
}

th {
	font-weight: 600;
	background: var(--q-surface-2);
}

.container {
	width: 100%;
	max-width: var(--q-container);
	margin: 0 auto;
	padding: 0 24px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	/* 明确偏移，避免停留在文档流中造成 1px 溢出 */
	left: -9999px;
	top: auto;
}

.screen-reader-text:focus {
	/* 聚焦时恢复可见，保证键盘可达 */
	left: auto;
	clip: auto;
	clip-path: none;
}

.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 999;
	width: auto;
	height: auto;
	clip: auto;
	background: var(--q-surface);
	color: var(--q-text);
	padding: 10px 18px;
	border-radius: var(--q-radius-sm);
	box-shadow: var(--q-shadow-lg);
}

.site-main {
	min-height: 60vh;
	padding-bottom: 72px;
}

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

/* 通用按钮 */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: var(--q-radius-sm);
	border: 1px solid transparent;
	font-size: 0.9375rem;
	font-family: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.18s var(--q-ease);
}

.btn--primary {
	background: var(--q-accent);
	color: #fff;
}

.btn--primary:hover {
	filter: brightness(1.08);
	text-decoration: none;
	color: #fff;
}

.btn--ghost {
	background: transparent;
	border-color: var(--q-border-2);
	color: var(--q-text);
}

.btn--ghost:hover {
	background: var(--q-surface-2);
	text-decoration: none;
}

/* 分类小标签 */
.chip {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--q-accent-soft);
	color: var(--q-accent);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.6;
}

.chip:hover {
	text-decoration: none;
	filter: brightness(0.96);
}

.tag {
	display: inline-block;
	color: var(--q-text-3);
	font-size: 0.8125rem;
	margin-right: 14px;
}

.tag:hover {
	color: var(--q-accent);
	text-decoration: none;
}

/* 3. 页头与导航
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--q-bg) 88%, transparent);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.25s var(--q-ease), background-color 0.25s var(--q-ease);
}

.site-header.is-scrolled {
	border-bottom-color: var(--q-border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 68px;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	min-width: 0;
}

.site-title {
	margin: 0;
	font-size: 1.1875rem;
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.3;
}

.site-title a {
	color: var(--q-text);
}

.site-title a:hover {
	text-decoration: none;
	opacity: 0.75;
}

.site-description {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--q-text-3);
	display: none;
	line-height: 1.4;
}

/* 自定义 Logo —— 有 Logo 时不再输出站名，因此这里可以给足尺寸 */
.custom-logo-link {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.custom-logo {
	display: block;
	width: auto;
	max-height: 44px;
	max-width: 200px;
	object-fit: contain;
}

.main-nav {
	margin-left: auto;
}

.main-nav__list {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-nav__list > li {
	position: relative;
}

.main-nav__list a {
	display: block;
	padding: 7px 13px;
	border-radius: var(--q-radius-sm);
	color: var(--q-text-2);
	font-size: 0.9375rem;
	font-weight: 500;
	white-space: nowrap;
	transition: all 0.18s var(--q-ease);
}

.main-nav__list a:hover {
	background: var(--q-surface-2);
	color: var(--q-text);
	text-decoration: none;
}

/*
 * 当前页用实色强调底标记，与分类筛选胶囊同一套语言。
 * 之前是「9% 浅底 + 蓝字」，对比度只有 4.39:1，
 * 在白色页头上看着像「半选中」，选中感不够明确。
 * 文字色走 --q-on-accent，深浅两套主题自动适配。
 */
.main-nav__list .current-menu-item > a,
.main-nav__list .current_page_item > a,
.main-nav__list .current-menu-ancestor > a {
	background: var(--q-accent);
	color: var(--q-on-accent);
}

.main-nav__list .current-menu-item > a:hover,
.main-nav__list .current_page_item > a:hover,
.main-nav__list .current-menu-ancestor > a:hover {
	background: var(--q-accent);
	color: var(--q-on-accent);
}

/* 二级菜单 */
.main-nav__list .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 180px;
	list-style: none;
	margin: 0;
	padding: 6px;
	background: var(--q-surface);
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius);
	box-shadow: var(--q-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: all 0.2s var(--q-ease);
}

.main-nav__list li:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.main-nav__list .sub-menu a {
	font-size: 0.875rem;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: var(--q-radius-sm);
	background: transparent;
	color: var(--q-text-2);
	cursor: pointer;
	transition: all 0.18s var(--q-ease);
}

.icon-btn:hover {
	background: var(--q-surface-2);
	color: var(--q-text);
}

.js-nav-toggle {
	display: none;
}

.bars {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 18px;
}

.bars span {
	display: block;
	height: 1.5px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.25s var(--q-ease), opacity 0.2s var(--q-ease);
}

.icon-btn[aria-expanded="true"] .bars span:nth-child(1) {
	transform: translateY(5.5px) rotate(45deg);
}

.icon-btn[aria-expanded="true"] .bars span:nth-child(2) {
	opacity: 0;
}

.icon-btn[aria-expanded="true"] .bars span:nth-child(3) {
	transform: translateY(-5.5px) rotate(-45deg);
}

/* 主题切换图标：浅色显示月亮，深色显示太阳 */
.icon-sun {
	display: none;
}

[data-theme="dark"] .icon-moon {
	display: none;
}

[data-theme="dark"] .icon-sun {
	display: block;
}

/* 搜索浮层 */
.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 300;
	background: color-mix(in srgb, var(--q-text) 45%, transparent);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 96px 24px 24px;
	overflow-y: auto;
	animation: q-fade 0.2s var(--q-ease);
}

.search-overlay[hidden] {
	display: none;
}

@keyframes q-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.search-overlay__panel {
	max-width: 620px;
	margin: 0 auto;
	background: var(--q-surface);
	border-radius: var(--q-radius-lg);
	box-shadow: var(--q-shadow-lg);
	overflow: hidden;
	animation: q-rise 0.25s var(--q-ease);
}

@keyframes q-rise {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.search-overlay__field {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--q-border);
	color: var(--q-text-3);
}

.search-overlay__field input {
	flex: 1;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--q-text);
	font-family: inherit;
	font-size: 1rem;
	padding: 4px 0;
}

.search-overlay__field input::placeholder {
	color: var(--q-text-3);
}

/* 浏览器为 type=search 自带清除按钮，与主题的关闭按钮重复，隐藏之 */
.search-overlay__field input::-webkit-search-cancel-button,
.search-overlay__field input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.search-overlay__close {
	border: 0;
	background: transparent;
	color: var(--q-text-3);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.search-overlay__close:hover {
	color: var(--q-text);
}

.search-overlay__results {
	max-height: 52vh;
	overflow-y: auto;
}

.search-result {
	display: block;
	padding: 15px 20px;
	border-bottom: 1px solid var(--q-border);
	color: inherit;
}

.search-result:last-child {
	border-bottom: 0;
}

.search-result:hover {
	background: var(--q-surface-2);
	text-decoration: none;
}

.search-result__title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--q-text);
	margin-bottom: 3px;
}

.search-result__meta {
	font-size: 0.8125rem;
	color: var(--q-text-3);
	margin-bottom: 5px;
}

.search-result__excerpt {
	font-size: 0.875rem;
	color: var(--q-text-2);
	line-height: 1.6;
	margin: 0;
}

.search-result__excerpt mark,
.search-result__title mark {
	background: var(--q-accent-soft);
	color: var(--q-accent);
	padding: 0 2px;
	border-radius: 3px;
}

.search-overlay__state {
	padding: 36px 20px;
	text-align: center;
	color: var(--q-text-3);
	font-size: 0.9375rem;
}

.search-overlay__hint {
	margin: 0;
	padding: 11px 20px;
	background: var(--q-surface-2);
	border-top: 1px solid var(--q-border);
	font-size: 0.8125rem;
	color: var(--q-text-3);
}

/* 4. 卡片与列表
   ========================================================================== */

/* 置顶推荐 */
.hero {
	position: relative;
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 0;
	margin: 40px 0 8px;
	background: var(--q-surface);
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius-lg);
	box-shadow: var(--q-shadow);
	overflow: hidden;
}

.hero__body {
	padding: 40px 40px 36px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hero__badge {
	align-self: flex-start;
	margin-bottom: 16px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--q-accent);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.hero__title {
	margin: 0 0 0.4em;
	font-size: 1.75rem;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.hero__title a {
	color: var(--q-text);
}

.hero__title a:hover {
	color: var(--q-accent);
	text-decoration: none;
}

.hero__excerpt {
	margin: 0 0 1.4em;
	color: var(--q-text-2);
	font-size: 0.9375rem;
	line-height: 1.7;
}

.hero__media {
	display: block;
	min-height: 260px;
	background: var(--q-surface-2);
	overflow: hidden;
	position: relative;
	transform: translateZ(0);
}

.hero__media img,
.hero__media .card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* 与卡片同一条曲线、同一时长，全站悬停手感统一 */
	transition: transform 0.28s linear;
	will-change: transform;
	backface-visibility: hidden;
	transform: scale(1);
	transform-origin: center center;
}

.hero:hover .hero__media img,
.hero:hover .hero__media .card__image {
	/* 置顶图面积大，幅度比小卡略小才不显得晃 */
	transform: scale(1.055);
}

.hero__inner {
	grid-column: 1 / -1;
}

/* 分类筛选条 */
.filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 32px 0 24px;
	padding-bottom: 4px;
}

.filter-bar__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--q-border);
	background: var(--q-surface);
	color: var(--q-text-2);
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.18s var(--q-ease);
}

.filter-bar__item:hover {
	border-color: var(--q-border-2);
	color: var(--q-text);
	text-decoration: none;
}

/*
 * 选中态用强调色实底。
 * 文字色走 --q-on-accent，浅色模式是白字、深色模式是深字，
 * 由变量统一决定，不再为每个组件重复写 [data-theme="dark"] 覆盖。
 */
.filter-bar__item.is-active {
	background: var(--q-accent);
	border-color: var(--q-accent);
	color: var(--q-on-accent);
}

.filter-bar__item.is-active:hover {
	background: var(--q-accent);
	border-color: var(--q-accent);
	color: var(--q-on-accent);
	opacity: 0.92;
}

.filter-bar__item.is-active .filter-bar__count {
	opacity: 0.75;
}

.filter-bar__count {
	font-size: 0.75rem;
	opacity: 0.6;
}

/* 布局 */
.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 40px;
	align-items: start;
	padding-top: 8px;
}

.layout__main {
	min-width: 0;
}

body.no-sidebar .layout {
	grid-template-columns: minmax(0, 1fr);
}

/* 卡片网格 */
.post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--q-gap);
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--q-surface);
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius);
	box-shadow: var(--q-shadow-sm);
	overflow: hidden;
	/* 与图片动画同步时长和曲线，让卡片与图片"一起动"而非各走各的 */
	transition: transform 0.28s linear,
		box-shadow 0.28s linear,
		border-color 0.28s linear;
}

.card:hover,
.card:focus-within {
	transform: translateY(-3px);
	box-shadow: var(--q-shadow-lg);
	border-color: var(--q-border-2);
}

.card__media {
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--q-surface-2);
	overflow: hidden;
	position: relative;
	/* 图片放大时由 media 承担裁切，圆角与卡片保持一致避免边缘露白 */
	border-radius: calc(var(--q-radius) - 1px) calc(var(--q-radius) - 1px) 0 0;
	/* 独立合成层：让缩放不牵动卡片本身的布局计算 */
	transform: translateZ(0);
}

/* 图片内描边：让图片边缘与卡片圆角过渡更干净 */
.card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--q-text) 7%, transparent);
	transition: opacity 0.28s linear;
	pointer-events: none;
	z-index: 1;
}

.card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	/*
	 * 这类小幅度位移（8%）配短时长时，缓动曲线无法避免"前几帧冲完、后面空转"：
	 * 位移总量小，任何加速段都会瞬间吃掉大半行程。
	 * 因此改用线性缓动，速度全程均匀，手感最"跟手"、最不粘。
	 * 时长 0.28s：足够看出动作，又不会拖。
	 */
	transition: transform 0.28s linear;
	will-change: transform;
	backface-visibility: hidden;
	transform: scale(1);
	transform-origin: center center;
}

.card:hover .card__image,
.card:focus-within .card__image {
	transform: scale(1.08);
}

.card:hover .card__media::after,
.card:focus-within .card__media::after {
	opacity: 0;
}

/* 亮暗层次用透明度叠加，避免 filter 触发重绘 */
.card__media::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--q-text);
	opacity: 0.06;
	transition: opacity 0.28s linear;
	pointer-events: none;
	z-index: 1;
}

.card:hover .card__media::before,
.card:focus-within .card__media::before {
	opacity: 0;
}

.card__image--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg,
		color-mix(in srgb, var(--q-accent) 12%, var(--q-surface-2)),
		var(--q-surface-2));
	font-size: 2.25rem;
	font-weight: 600;
	color: color-mix(in srgb, var(--q-accent) 55%, transparent);
	user-select: none;
}

.card:hover .card__image--placeholder {
	transform: none;
}

.card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px 24px 20px;
}

.card__cat {
	align-self: flex-start;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--q-accent);
	margin-bottom: 10px;
	letter-spacing: 0.01em;
}

.card__cat:hover {
	text-decoration: none;
	opacity: 0.8;
}

.card__title {
	margin: 0 0 0.5em;
	font-size: 1.125rem;
	line-height: 1.45;
	letter-spacing: -0.01em;
}

.card__title a {
	color: var(--q-text);
}

.card__title a:hover {
	color: var(--q-accent);
	text-decoration: none;
}

.card__excerpt {
	margin: 0 0 1.2em;
	color: var(--q-text-2);
	font-size: 0.9375rem;
	line-height: 1.7;
	flex: 1;
}

.card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 14px;
	border-top: 1px solid var(--q-border);
	font-size: 0.8125rem;
	color: var(--q-text-3);
}

.card__reading::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	margin-right: 8px;
	vertical-align: middle;
	opacity: 0.6;
}

/* 文章元信息 */
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	font-size: 0.8125rem;
	color: var(--q-text-3);
}

.entry-meta a {
	color: var(--q-text-3);
}

.entry-meta__cat {
	color: var(--q-accent) !important;
	font-weight: 500;
}

.entry-meta > * + *::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	margin-right: 14px;
	vertical-align: middle;
	opacity: 0.5;
}

.entry-meta__reading::before,
.entry-meta__author::before,
.entry-meta__date::before {
	/* 分隔点由上方规则统一处理 */
}

/* 分页 */
.pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 44px 0 0;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius-sm);
	background: var(--q-surface);
	color: var(--q-text-2);
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.18s var(--q-ease);
}

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

/* 与分类筛选条保持一致：当前页用强调色，深色模式改用深色文字保证对比度 */
/* 与分类筛选条、导航当前项保持一致：实色强调底 + 变量决定的文字色 */
.pagination .page-numbers.current {
	background: var(--q-accent);
	border-color: var(--q-accent);
	color: var(--q-on-accent);
}

.pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	pointer-events: none;
}

/* 空状态 */
.empty-state {
	padding: 80px 24px;
	text-align: center;
	background: var(--q-surface);
	border: 1px dashed var(--q-border-2);
	border-radius: var(--q-radius);
}

.empty-state__title {
	margin: 0 0 8px;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--q-text);
}

.empty-state__desc {
	margin: 0;
	color: var(--q-text-3);
	font-size: 0.9375rem;
}

.empty-state__cats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
}

/* 侧边栏 */
.sidebar {
	position: sticky;
	top: 92px;
}

.widget {
	margin-bottom: 26px;
	padding: 24px;
	background: var(--q-surface);
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius);
	box-shadow: var(--q-shadow-sm);
}

.widget__title {
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--q-border);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0;
}

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

.widget li {
	padding: 9px 0;
	border-bottom: 1px solid var(--q-border);
	font-size: 0.9375rem;
	line-height: 1.6;
}

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

.widget li a {
	color: var(--q-text-2);
}

.widget li a:hover {
	color: var(--q-accent);
	text-decoration: none;
}

.widget .post-date,
.widget .rss-date {
	display: block;
	font-size: 0.8125rem;
	color: var(--q-text-3);
	margin-top: 2px;
}

.widget_tag_cloud a {
	display: inline-block;
	margin: 0 6px 8px 0;
	padding: 4px 11px;
	border-radius: 999px;
	border: 1px solid var(--q-border);
	font-size: 0.8125rem !important;
	color: var(--q-text-2);
}

.widget_tag_cloud a:hover {
	border-color: var(--q-accent);
	color: var(--q-accent);
	text-decoration: none;
}

.widget select {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius-sm);
	background: var(--q-surface);
	color: var(--q-text);
	font-family: inherit;
	font-size: 0.9375rem;
}

.widget img {
	border-radius: var(--q-radius-sm);
}

/* 搜索表单：输入框内嵌图标，提交按钮收进框内右侧 */
.search-form {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* 侧边栏里改为一体化胶囊输入框 */
.widget .search-form {
	position: relative;
	display: block;
	padding: 0;
	flex-wrap: nowrap;
}

.widget .wp-block-search__input,
.widget .search-form__input {
	flex: 1;
	min-width: 0;
	padding: 10px 44px 10px 38px;
	border: 1px solid var(--q-border);
	border-radius: 10px;
	background: var(--q-surface-2);
	color: var(--q-text);
	font-family: inherit;
	font-size: 0.9375rem;
	line-height: 1.5;
	outline: none;
	transition: border-color 0.18s var(--q-ease), background-color 0.18s var(--q-ease),
		box-shadow 0.18s var(--q-ease);
	-webkit-appearance: none;
	appearance: none;
}

/* 输入框左侧放大镜，用内联 SVG 做背景 */
.widget .search-form__input {
	width: 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='9' cy='9' r='6' stroke='%238d939c' stroke-width='1.7'/%3E%3Cpath d='M13.5 13.5L17 17' stroke='%238d939c' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 13px center;
}

.widget .wp-block-search__input:focus,
.widget .search-form__input:focus {
	border-color: var(--q-accent);
	background-color: var(--q-surface);
	box-shadow: 0 0 0 3px var(--q-accent-soft);
}

.widget .search-form__input::placeholder {
	color: var(--q-text-3);
}

/* 提交按钮：框内右侧的方块图标按钮 */
.widget .search-form__submit {
	position: absolute;
	top: 50%;
	right: 5px;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var(--q-accent);
	color: #fff;
	font-size: 0;
	line-height: 0;
	overflow: hidden;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.18s var(--q-ease), transform 0.18s var(--q-ease);
}

/* 按钮文字隐藏，改用箭头图标 */
.widget .search-form__submit::before {
	content: "";
	width: 15px;
	height: 15px;
	background-repeat: no-repeat;
	background-position: center;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M4 10h11M10.5 5.5L15 10l-4.5 4.5' stroke='%23ffffff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.widget .search-form__submit:hover {
	background: color-mix(in srgb, var(--q-accent) 84%, #000);
	transform: translateY(-50%) scale(1.06);
}

.widget .search-form__submit:active {
	transform: translateY(-50%) scale(0.96);
}

/* 隐藏浏览器为 type=search 自带的清除按钮与装饰 */
.widget .search-form__input::-webkit-search-cancel-button,
.widget .search-form__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

/* 小工具里的搜索标签包裹层不占额外空间 */
.widget .search-form__label {
	display: block;
	margin: 0;
	width: 100%;
}

/* 5. 单篇文章
   ========================================================================== */

.single {
	max-width: 100%;
	margin: 40px 0 0;
}

.single--page {
	max-width: 760px;
	margin: 48px auto 0;
}

.single__header {
	margin-bottom: 34px;
}

.single__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.single__title {
	margin: 0 0 0.45em;
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.375rem);
	line-height: 1.28;
	letter-spacing: -0.025em;
}

.single__lede {
	margin: 0 0 1.5em;
	color: var(--q-text-2);
	font-size: 1.0625rem;
	line-height: 1.75;
	padding-left: 16px;
	border-left: 2px solid var(--q-border-2);
}

.single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 48px;
}

.single__layout.has-toc {
	grid-template-columns: minmax(0, 1fr) 218px;
}

.single__content {
	min-width: 0;
	max-width: 760px;
	font-size: 1.0625rem;
	line-height: 1.85;
	color: var(--q-text);
}

.single__content > *:first-child {
	margin-top: 0;
}

.single__content h2 {
	margin: 2.2em 0 0.7em;
	font-size: 1.5rem;
	letter-spacing: -0.018em;
	scroll-margin-top: 96px;
}

.single__content h3 {
	margin: 1.9em 0 0.6em;
	font-size: 1.1875rem;
	letter-spacing: -0.012em;
	scroll-margin-top: 96px;
}

.single__content h4 {
	margin: 1.7em 0 0.5em;
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: -0.008em;
	color: var(--q-text);
	scroll-margin-top: 96px;
}

.single__content h2::before {
	content: "";
	display: block;
	width: 30px;
	height: 2px;
	background: var(--q-accent);
	border-radius: 2px;
	margin-bottom: 16px;
}

.single__content ul,
.single__content ol {
	margin: 0 0 1.3em;
	padding-left: 1.4em;
}

.single__content li {
	margin-bottom: 0.45em;
}

.single__content a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, var(--q-accent) 40%, transparent);
}

.single__content a:hover {
	text-decoration-color: var(--q-accent);
}

.single__content img {
	border-radius: var(--q-radius);
	margin: 1.8em 0;
}

.single__content figure {
	margin: 1.8em 0;
}

.single__content figcaption {
	margin-top: 10px;
	text-align: center;
	font-size: 0.875rem;
	color: var(--q-text-3);
}

.single__content .wp-block-image img {
	border-radius: var(--q-radius);
}

.single__content .wp-block-quote {
	margin: 1.8em 0;
	padding: 0.2em 0 0.2em 1.3em;
	border-left: 3px solid var(--q-accent);
}

.alignwide {
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	max-width: 100%;
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 2em 0;
	font-size: 0.9375rem;
}

.page-links a,
.page-links > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius-sm);
	color: var(--q-text-2);
}

.page-links > span:not(.post-page-numbers) {
	border-color: transparent;
	color: var(--q-text-3);
	min-width: auto;
	padding: 0;
}

/* 代码块 */
.single__content pre {
	position: relative;
	margin: 1.8em 0;
	padding: 20px 22px;
	background: #f7f8fa;
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius);
	overflow-x: auto;
	line-height: 1.7;
	font-size: 0.875rem;
	-webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .single__content pre {
	background: #0f1211;
	border-color: #262b28;
}

.single__content pre code {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font-size: inherit;
}

/* 代码高亮配色（浅色） */
.tok-comment { color: #8a9199; font-style: italic; }
.tok-string  { color: #1d7f4e; }
.tok-keyword { color: #a63fbf; }
.tok-number  { color: #b0641a; }
.tok-function { color: #2a6fb0; }
.tok-tag     { color: #b03a3a; }
.tok-attr    { color: #b0641a; }
.tok-punct   { color: #6b7280; }

[data-theme="dark"] .tok-comment  { color: #6b7a72; }
[data-theme="dark"] .tok-string   { color: #7fc79b; }
[data-theme="dark"] .tok-keyword  { color: #c99ae0; }
[data-theme="dark"] .tok-number   { color: #e0b57f; }
[data-theme="dark"] .tok-function { color: #79b8e8; }
[data-theme="dark"] .tok-tag      { color: #e88a8a; }
[data-theme="dark"] .tok-attr     { color: #e0b57f; }
[data-theme="dark"] .tok-punct    { color: #8a9490; }

.code-copy {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 5px 11px;
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius-sm);
	background: var(--q-surface);
	color: var(--q-text-3);
	font-family: var(--q-font);
	font-size: 0.75rem;
	cursor: pointer;
	opacity: 0;
	transition: all 0.18s var(--q-ease);
}

.single__content pre:hover .code-copy,
.code-copy:focus {
	opacity: 1;
}

.code-copy:hover {
	color: var(--q-text);
	border-color: var(--q-border-2);
}

.code-copy.is-copied {
	color: var(--q-accent);
	border-color: var(--q-accent);
	opacity: 1;
}

/* 目录 */
.toc {
	position: sticky;
	top: 96px;
	align-self: start;
	font-size: 0.875rem;
}

.toc__inner {
	max-height: calc(100vh - 140px);
	overflow-y: auto;
	padding-left: 18px;
	border-left: 1px solid var(--q-border);
}

/* 桌面端：details 的 open 属性由 JS 按断点同步，
   这里只负责把 summary 变成不可交互的标题行 */
.toc__details {
	display: block;
}

.toc__details > summary {
	list-style: none;
	cursor: default;
	pointer-events: none;
}

.toc__details > summary::-webkit-details-marker,
.toc__details > summary::marker {
	display: none;
	content: "";
}

.toc__summary {
	display: block;
	margin-bottom: 10px;
}

.toc__chevron,
.toc__count {
	display: none;
}

.toc__title {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--q-text-3);
	letter-spacing: 0.02em;
}

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

.toc__item {
	margin: 0;
	line-height: 1.5;
}

.toc__item a {
	display: block;
	padding: 5px 0 5px 12px;
	margin-left: -19px;
	border-left: 2px solid transparent;
	color: var(--q-text-3);
	transition: all 0.18s var(--q-ease);
}

.toc__item a:hover {
	color: var(--q-text);
	text-decoration: none;
}

.toc__item--h3 a {
	padding-left: 24px;
	font-size: 0.8125rem;
}

.toc__item--h4 a {
	padding-left: 36px;
	font-size: 0.8125rem;
}

.toc__item.is-active > a {
	color: var(--q-accent);
	border-left-color: var(--q-accent);
	font-weight: 500;
}

/* 文章底部 */
.single__footer {
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid var(--q-border);
}

.single__tags {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.post-nav__item {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 18px 20px;
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius);
	background: var(--q-surface);
	transition: all 0.2s var(--q-ease);
}

.post-nav__item:hover {
	border-color: var(--q-border-2);
	box-shadow: var(--q-shadow);
	transform: translateY(-2px);
	text-decoration: none;
}

.post-nav__item--next {
	text-align: right;
}

.post-nav__label {
	font-size: 0.75rem;
	color: var(--q-text-3);
	letter-spacing: 0.02em;
}

.post-nav__title {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--q-text);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 6. 归档与搜索
   ========================================================================== */

.archive-header {
	padding: 44px 0 8px;
	border-bottom: 1px solid var(--q-border);
	margin-bottom: 4px;
}

.archive-header__title {
	margin: 0 0 10px;
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
	letter-spacing: -0.022em;
}

.archive-header__title span {
	color: var(--q-accent);
}

.archive-header__desc {
	color: var(--q-text-2);
	font-size: 0.9375rem;
	max-width: 640px;
	margin-bottom: 12px;
}

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

.archive-header__count {
	margin: 0 0 20px;
	font-size: 0.875rem;
	color: var(--q-text-3);
}

/* 404 */
.error-404 {
	max-width: 560px;
	margin: 88px auto;
	text-align: center;
}

.error-404__code {
	margin: 0;
	font-size: 4.5rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--q-accent);
	opacity: 0.22;
}

.error-404__title {
	margin: -12px 0 10px;
	font-size: 1.625rem;
	letter-spacing: -0.02em;
}

.error-404__desc {
	margin: 0 0 26px;
	color: var(--q-text-2);
}

.error-404__actions {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.error-404__recent {
	margin-top: 52px;
	padding-top: 28px;
	border-top: 1px solid var(--q-border);
	text-align: left;
}

.error-404__recent-title {
	margin: 0 0 8px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--q-text-3);
	text-align: center;
}

.error-404__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.error-404__list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px solid var(--q-border);
	font-size: 0.9375rem;
}

.error-404__list li:last-child {
	border-bottom: 0;
}

.error-404__list a {
	color: var(--q-text);
}

.error-404__list time {
	flex-shrink: 0;
	font-size: 0.8125rem;
	color: var(--q-text-3);
}

/* 6.5 网址导航
   ========================================================================== */

/* 头部：左标题 + 右搜索 */
.nav-hero {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px;
	padding: 42px 0 26px;
	border-bottom: 1px solid var(--q-border);
}

.nav-hero__text {
	min-width: 0;
}

.nav-hero__title {
	margin: 0 0 8px;
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
	letter-spacing: -0.022em;
}

.nav-hero__desc {
	margin: 0 0 14px;
	max-width: 520px;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--q-text-2);
}

.nav-hero__desc p:last-child {
	margin-bottom: 0;
}

/* 统计胶囊 */
.nav-hero__stats {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.nav-stat {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--q-surface);
	border: 1px solid var(--q-border);
	font-size: 0.8125rem;
	color: var(--q-text-3);
}

.nav-stat__num {
	font-weight: 600;
	color: var(--q-text);
	font-variant-numeric: tabular-nums;
}

/* 搜索框 */
.nav-search {
	position: relative;
	flex-shrink: 0;
	width: 260px;
}

.nav-search__icon {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--q-text-3);
	pointer-events: none;
}

.nav-search__input {
	width: 100%;
	padding: 10px 38px 10px 38px;
	border: 1px solid var(--q-border);
	border-radius: 999px;
	background: var(--q-surface);
	color: var(--q-text);
	font-family: inherit;
	font-size: 0.9375rem;
	line-height: 1.4;
	outline: none;
	transition: border-color 0.2s var(--q-ease), box-shadow 0.2s var(--q-ease);
	/* 隐藏浏览器自带的清除按钮，避免与自定义按钮重叠 */
	appearance: none;
	-webkit-appearance: none;
}

.nav-search__input::-webkit-search-cancel-button,
.nav-search__input::-webkit-search-decoration {
	appearance: none;
	-webkit-appearance: none;
	display: none;
}

.nav-search__input::placeholder {
	color: var(--q-text-3);
}

.nav-search__input:focus {
	border-color: var(--q-accent);
	box-shadow: 0 0 0 3px var(--q-accent-soft);
}

.nav-search__clear {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--q-surface-2);
	color: var(--q-text-3);
	cursor: pointer;
	transition: background-color 0.18s var(--q-ease), color 0.18s var(--q-ease);
}

.nav-search__clear:hover {
	background: var(--q-border-2);
	color: var(--q-text);
}

.nav-search__clear[hidden] {
	display: none;
}

/* 主体：左分类 + 右网格 */
.nav-layout {
	display: grid;
	grid-template-columns: 214px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	margin-top: 26px;
	padding-bottom: 20px;
}

/* 左侧分类：做成独立卡片，与右侧有明确分界 */
.nav-side {
	position: sticky;
	top: 96px;
	padding: 14px 12px;
	background: var(--q-surface);
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius);
	box-shadow: var(--q-shadow-sm);
}

.nav-side__label {
	margin: 2px 0 10px;
	padding: 0 9px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--q-text-3);
	text-transform: uppercase;
}

.nav-cats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nav-cat {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 10px 12px 10px 14px;
	border: 0;
	border-radius: var(--q-radius-sm);
	background: transparent;
	color: var(--q-text-2);
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.18s var(--q-ease), color 0.18s var(--q-ease);
}

/* 选中态用左侧竖条标记，比纯色块更利落 */
.nav-cat::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 50%;
	width: 3px;
	height: 0;
	border-radius: 999px;
	background: var(--q-accent);
	transform: translateY(-50%);
	transition: height 0.22s var(--q-ease);
}

.nav-cat__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-cat:hover {
	background: var(--q-surface-2);
	color: var(--q-text);
}

.nav-cat.is-active {
	background: var(--q-accent-soft);
	color: var(--q-accent);
	font-weight: 600;
}

.nav-cat.is-active::before {
	height: 17px;
}

.nav-cat__count {
	flex-shrink: 0;
	min-width: 22px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--q-surface-2);
	color: var(--q-text-3);
	font-size: 0.75rem;
	font-weight: 500;
	text-align: center;
	font-variant-numeric: tabular-nums;
	transition: background-color 0.18s var(--q-ease), color 0.18s var(--q-ease);
}

.nav-cat.is-active .nav-cat__count {
	background: color-mix(in srgb, var(--q-accent) 18%, transparent);
	color: var(--q-accent);
}

/* 右侧主体 */
.nav-main {
	min-width: 0;
}

.nav-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 28px;
	margin-bottom: 14px;
}

.nav-result {
	margin: 0;
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
	font-size: 0.875rem;
	color: var(--q-text-3);
}

.nav-result__num {
	font-weight: 600;
	color: var(--q-text);
	font-variant-numeric: tabular-nums;
}

.nav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
	gap: 14px;
	transition: opacity 0.2s var(--q-ease);
}

.nav-grid.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

/* 卡片：加分组留白与右箭头，明确"可点击" */
.nav-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 13px;
	padding: 16px 16px 15px;
	background: var(--q-surface);
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius);
	box-shadow: var(--q-shadow-sm);
	color: inherit;
	transition: transform 0.28s linear, box-shadow 0.28s linear, border-color 0.28s linear;
}

.nav-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--q-shadow-lg);
	border-color: color-mix(in srgb, var(--q-accent) 34%, var(--q-border));
	text-decoration: none;
}

.nav-card[hidden] {
	display: none;
}

.nav-card__icon {
	position: relative;
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 11px;
	background: var(--q-accent-soft);
	overflow: hidden;
}

/*
 * 图标底色统一用强调色浅底，不做「加载成功就换白底」的区分。
 * 试过白底 + 描边方案，但和加载失败的首字母块并排时两套底色混在一起，
 * 整片网格显得花。统一底色后观感更整齐，彩色 logo 直接叠在上面也够清晰。
 */
.nav-card__icon img {
	position: relative;
	z-index: 1;
	width: 24px;
	height: 24px;
	object-fit: contain;
	border-radius: 4px;
}

/* 首字母兜底：默认在底层，图片加载成功时会盖住它 */
.nav-card__initial {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--q-accent);
	text-transform: uppercase;
}

/* 图片加载失败（onerror 会移除 img），首字母自然露出 */
.nav-card__icon--fallback img {
	display: none;
}

.nav-card__icon--fallback {
	background: var(--q-accent-soft);
	box-shadow: none;
}

.nav-card__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding-right: 16px;
}

.nav-card__title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--q-text);
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-card:hover .nav-card__title {
	color: var(--q-accent);
}

.nav-card__desc {
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--q-text-3);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nav-card__host {
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--q-text-3);
	opacity: 0.72;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 外链箭头：常态用中性但清晰的颜色，悬停时变强调色并右移 */
.nav-card__arrow {
	position: absolute;
	top: 15px;
	right: 14px;
	color: var(--q-text-3);
	opacity: 0.55;
	transition: opacity 0.22s var(--q-ease), transform 0.22s var(--q-ease),
		color 0.22s var(--q-ease);
}

.nav-card:hover .nav-card__arrow {
	color: var(--q-accent);
	opacity: 1;
	transform: translate(2px, -2px);
}

.nav-status {
	margin: 24px 0 0;
	text-align: center;
	font-size: 0.875rem;
	color: var(--q-text-3);
}

.nav-empty {
	margin: 0;
	padding: 48px 20px;
	text-align: center;
	font-size: 0.9375rem;
	color: var(--q-text-3);
	background: var(--q-surface);
	border: 1px dashed var(--q-border-2);
	border-radius: var(--q-radius);
	grid-column: 1 / -1;
}

.nav-empty[hidden] {
	display: none;
}

/* 7. 评论与表单
   ========================================================================== */

.comments {
	max-width: 760px;
	margin: 64px 0 0;
	padding-top: 36px;
	border-top: 1px solid var(--q-border);
}

.comments__title {
	margin: 0 0 26px;
	font-size: 1.1875rem;
}

.comments__list {
	list-style: none;
	margin: 0 0 36px;
	padding: 0;
}

.comments__list .children {
	list-style: none;
	margin: 0;
	padding: 0 0 0 30px;
}

.comment {
	margin-bottom: 22px;
}

.comment__inner {
	display: flex;
	gap: 16px;
	padding: 20px;
	background: var(--q-surface);
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius);
}

.comment__avatar img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.comment__main {
	flex: 1;
	min-width: 0;
}

.comment__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 8px;
}

.comment__author {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--q-text);
}

.comment__author a {
	color: inherit;
}

.comment__time {
	font-size: 0.8125rem;
	color: var(--q-text-3);
}

.comment__body {
	font-size: 0.9375rem;
	line-height: 1.75;
	color: var(--q-text-2);
}

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

.comment__pending {
	margin: 8px 0 0;
	font-size: 0.8125rem;
	color: var(--q-text-3);
	font-style: italic;
}

.comment__actions {
	margin-top: 10px;
	font-size: 0.8125rem;
}

.comment__actions a {
	color: var(--q-text-3);
}

.comment__actions a:hover {
	color: var(--q-accent);
}

.comments__closed,
.comment-notes {
	font-size: 0.875rem;
	color: var(--q-text-3);
}

.comment-respond {
	margin-top: 40px;
}

.comment-reply-title {
	margin: 0 0 18px;
	font-size: 1.125rem;
}

.comment-reply-title small {
	margin-left: 10px;
	font-size: 0.8125rem;
	font-weight: 400;
}

.comment-form p {
	margin-bottom: 16px;
}

.comment-form label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--q-text-2);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--q-border);
	border-radius: var(--q-radius-sm);
	background: var(--q-surface);
	color: var(--q-text);
	font-family: inherit;
	font-size: 0.9375rem;
	line-height: 1.6;
	outline: none;
	transition: border-color 0.18s var(--q-ease), box-shadow 0.18s var(--q-ease);
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--q-accent);
	box-shadow: 0 0 0 3px var(--q-accent-soft);
}

.comment-form textarea {
	resize: vertical;
	min-height: 130px;
}

.comment-form .form-submit {
	margin-bottom: 0;
}

.comment-form .submit {
	padding: 11px 26px;
	border: 0;
	border-radius: var(--q-radius-sm);
	background: var(--q-accent);
	color: #fff;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	transition: filter 0.18s var(--q-ease);
}

.comment-form .submit:hover {
	filter: brightness(1.08);
}

/* 8. 页脚与回到顶部
   ========================================================================== */

.site-footer {
	margin-top: 24px;
	padding: 48px 0 40px;
	background: var(--q-surface);
	border-top: 1px solid var(--q-border);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px 40px;
	align-items: center;
}

.site-footer__name {
	margin: 0 0 6px;
	font-size: 1rem;
	font-weight: 600;
}

.site-footer__desc {
	margin: 0;
	font-size: 0.875rem;
	color: var(--q-text-3);
	max-width: 420px;
	line-height: 1.65;
}

.site-footer__list {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__list a {
	color: var(--q-text-2);
	font-size: 0.875rem;
}

.site-footer__list a:hover {
	color: var(--q-accent);
	text-decoration: none;
}

.site-footer__copy {
	grid-column: 1 / -1;
	margin: 20px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--q-border);
	font-size: 0.8125rem;
	color: var(--q-text-3);
}

.back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 90;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--q-border-2);
	border-radius: 50%;
	/* 半透明 + 毛玻璃，浮在内容上时不会像一块实心补丁 */
	background: color-mix(in srgb, var(--q-surface) 88%, transparent);
	backdrop-filter: saturate(180%) blur(10px);
	-webkit-backdrop-filter: saturate(180%) blur(10px);
	color: var(--q-text-2);
	box-shadow: var(--q-shadow-lg);
	cursor: pointer;
	transition: all 0.22s var(--q-ease);
}

.back-to-top:hover {
	color: var(--q-accent);
	border-color: var(--q-accent);
	transform: translateY(-2px);
}

.back-to-top[hidden] {
	display: none;
}

/* 9. 响应式
   ========================================================================== */

@media (max-width: 1080px) {
	.layout {
		grid-template-columns: minmax(0, 1fr) 260px;
		gap: 32px;
	}

	.single__layout.has-toc {
		grid-template-columns: minmax(0, 1fr) 190px;
		gap: 32px;
	}
}

@media (max-width: 900px) {
	.layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.sidebar {
		position: static;
		margin-top: 40px;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
		gap: 20px;
		/* 关键：网格默认 stretch 会把内容少的小工具拉成和邻居等高，
		   导致搜索框下方出现大片空白。改为按内容高度对齐。 */
		align-items: start;
	}

	.sidebar .widget {
		margin-bottom: 0;
	}

	.hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero__body {
		padding: 32px 28px 28px;
	}

	.hero__media {
		min-height: 200px;
		order: -1;
	}

	.single__layout.has-toc {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	/* 900px 以下目录移到正文上方，外观统一为卡片式 */
	.toc {
		position: static;
		order: -1;
		margin-bottom: 28px;
	}

	.toc__inner {
		max-height: none;
		padding: 16px 18px;
		border: 1px solid var(--q-border);
		border-radius: var(--q-radius);
		background: var(--q-surface);
	}

	.toc__item a {
		margin-left: 0;
		border-left: 2px solid transparent;
	}

	.toc__item--h3 a {
		padding-left: 24px;
	}

	.toc__item--h4 a {
		padding-left: 36px;
	}

	.js-nav-toggle {
		display: inline-flex;
	}

	.main-nav {
		position: fixed;
		top: 68px;
		left: 0;
		right: 0;
		margin: 0;
		padding: 12px 16px 20px;
		background: var(--q-surface);
		border-bottom: 1px solid var(--q-border);
		box-shadow: var(--q-shadow);
		display: none;
		max-height: calc(100vh - 68px);
		overflow-y: auto;
	}

	.main-nav.is-open {
		display: block;
		animation: q-rise 0.2s var(--q-ease);
	}

	.main-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.main-nav__list a {
		padding: 11px 14px;
		border-radius: var(--q-radius-sm);
	}

	.main-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		background: transparent;
		padding: 0 0 0 14px;
		min-width: 0;
	}

	/*
	 * 头部改为「品牌靠左 + 图标靠右」。
	 * 这段必须和 640px 断点保持一致 —— 之前只在 640px 里写，
	 * 导致 640~900px（平板、大屏手机横屏）仍是默认的 normal，
	 * 四个元素全挤在左侧。
	 */
	.site-header__inner {
		justify-content: space-between;
	}

	.site-branding {
		flex: 0 1 auto;
		min-width: 0;
	}

	.header-actions {
		margin-left: auto;
		flex-shrink: 0;
	}

	/* 导航页头部：标题与搜索改为上下堆叠 */
	.nav-hero {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
		padding: 30px 0 22px;
	}

	.nav-search {
		width: 100%;
		max-width: 460px;
	}

	/* 导航页：分类移到顶部横向排列，避免左侧栏占去大半屏 */
	.nav-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
		margin-top: 20px;
	}

	/* 取消卡片外壳，改为无容器的横向胶囊条 */
	.nav-side {
		position: static;
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
	}

	.nav-side__label {
		display: none;
	}

	.nav-cats {
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 8px;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
		max-width: 100%;
		mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
	}

	/* li 也要参与横向布局，否则会被当成块级元素换行 */
	.nav-cats li {
		flex-shrink: 0;
	}

	.nav-cats::-webkit-scrollbar {
		display: none;
	}

	.nav-cat {
		width: auto;
		flex-shrink: 0;
		gap: 7px;
		padding: 7px 13px;
		border: 1px solid var(--q-border);
		background: var(--q-surface);
		border-radius: 999px;
		/* 防止横向滚动时被压扁导致文字竖排 */
		white-space: nowrap;
		min-width: max-content;
	}

	/* 胶囊态用底色标记选中，竖条在小尺寸下会显得脏 */
	.nav-cat::before {
		display: none;
	}

	.nav-cat.is-active {
		border-color: color-mix(in srgb, var(--q-accent) 40%, var(--q-border));
		background: var(--q-accent-soft);
	}

	.nav-cat__count {
		min-width: 19px;
		padding: 0 6px;
	}
}

@media (max-width: 640px) {
	.container {
		padding: 0 18px;
	}

	:root {
		--q-gap: 18px;
	}

	body {
		font-size: 15.5px;
	}

	.page-title,
	.site-description {
		display: none;
	}

	/* 移动端头部布局：左侧品牌、右侧图标组，中间留出呼吸空间 */
	.site-header__inner {
		gap: 12px;
		min-height: 60px;
		/* 两端对齐，明确区分左右两个区域 */
		justify-content: space-between;
	}

	.site-branding {
		gap: 8px;
		/* 品牌区不再拉伸占满，只占自身内容宽度，避免与图标组连成一片 */
		flex: 0 1 auto;
		min-width: 0;
	}

	/* 有 Logo 时不显示站名，Logo 可以给得更舒展 */
	.custom-logo {
		max-height: 34px;
		max-width: 150px;
	}

	.site-title {
		font-size: 1.0312rem;
		letter-spacing: -0.01em;
		/* 品牌区过窄时省略而非换行 */
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	/* 右侧图标组：靠右对齐，图标之间留出明确间隔 */
	.header-actions {
		gap: 6px;
		margin-left: auto;
		flex-shrink: 0;
	}

	.header-actions .icon-btn {
		width: 38px;
		height: 38px;
		border-radius: 10px;
	}

	/* 极窄屏进一步收紧，优先保证左右分区不被挤垮 */
	@media (max-width: 380px) {
		.site-header__inner {
			gap: 8px;
		}

		.site-branding {
			gap: 6px;
		}

		.custom-logo {
			max-height: 30px;
			max-width: 118px;
		}

		.site-title {
			font-size: 0.9375rem;
		}

		.header-actions {
			gap: 2px;
		}

		.header-actions .icon-btn {
			width: 34px;
			height: 34px;
		}
	}

	/* 触屏设备取消 hover 态残留 */
	@media (hover: none) {
		.header-actions .icon-btn:hover {
			background: transparent;
			color: var(--q-text-2);
		}
	}

	.main-nav {
		top: 60px;
		max-height: calc(100vh - 60px);
	}

	.post-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	/* 小屏下侧栏收成单列，避免半宽卡片状的尴尬宽度 */
	.sidebar {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		margin-top: 32px;
	}

	.hero {
		margin-top: 24px;
		border-radius: var(--q-radius);
	}

	/* 置顶卡封面在窄屏上很容易占掉大半屏，压到固定高度 */
	.hero__media {
		min-height: 180px;
		height: 180px;
	}

	.hero__body {
		padding: 22px 20px 20px;
	}

	.hero__badge {
		margin-bottom: 10px;
		padding: 3px 10px;
		font-size: 0.6875rem;
	}

	.hero__title {
		font-size: 1.3125rem;
		line-height: 1.4;
		margin-bottom: 0.45em;
	}

	.hero__excerpt {
		margin-bottom: 1em;
		font-size: 0.9375rem;
		line-height: 1.65;
		/* 摘要在小屏限 3 行，避免置顶卡过长 */
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	/* 元信息在小屏不换行，挤不下时隐藏次要项而非折行 */
	.entry-meta {
		gap: 10px;
		font-size: 0.75rem;
		flex-wrap: nowrap;
		overflow: hidden;
	}

	.entry-meta > * + *::before {
		margin-right: 10px;
	}

	.entry-meta__author {
		display: none;
	}

	/* 分类筛选条改为横向滚动，不再折成两行 */
	.filter-bar {
		margin: 24px 0 18px;
		gap: 8px;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 6px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		/* 右侧渐隐提示还有内容；用 max-width 而非负边距，避免撑破容器 */
		max-width: 100%;
		mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
	}

	.filter-bar::-webkit-scrollbar {
		display: none;
	}

	.filter-bar__item {
		flex-shrink: 0;
	}

	/* 卡片封面改为更扁的比例，让标题更快进入视线 */
	.card__media {
		aspect-ratio: 16 / 9;
		max-height: 190px;
	}

	.card__body {
		padding: 18px 18px 16px;
	}

	.card__title {
		font-size: 1.0625rem;
		line-height: 1.45;
		margin-bottom: 0.45em;
	}

	.card__excerpt {
		margin-bottom: 1em;
	}

	.card__foot {
		padding-top: 12px;
	}

	/* 导航页：单列卡片，间距收紧 */
	.nav-hero {
		padding: 22px 0 18px;
	}

	.nav-hero__desc {
		font-size: 0.875rem;
		margin-bottom: 12px;
	}

	.nav-stat {
		padding: 3px 10px;
		font-size: 0.75rem;
	}

	.nav-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}

	.nav-card {
		padding: 14px 14px 13px;
		gap: 12px;
	}

	.nav-card__icon {
		width: 38px;
		height: 38px;
	}

	.nav-card__icon img {
		width: 22px;
		height: 22px;
	}

	.nav-card__title {
		font-size: 0.9062rem;
	}

	/* 小屏描述只留一行，让卡片更扁、一屏能多看几个 */
	.nav-card__desc {
		-webkit-line-clamp: 1;
	}

	.nav-card__arrow {
		top: 13px;
		right: 12px;
	}

	.single {
		margin-top: 26px;
	}

	.single__content {
		font-size: 1rem;
		line-height: 1.8;
	}

	/* 文章标题在小屏略收，避免长标题折成四五行 */
	.single__title {
		font-size: 1.4375rem;
		line-height: 1.38;
	}

	.single__lede {
		font-size: 0.9375rem;
		padding-left: 12px;
		margin-bottom: 1.2em;
	}

	.single__header {
		margin-bottom: 26px;
	}

	.single__content h2 {
		font-size: 1.25rem;
		margin: 1.9em 0 0.6em;
	}

	.single__content h3 {
		font-size: 1.0938rem;
		margin: 1.7em 0 0.5em;
	}

	.single__content pre {
		padding: 16px;
		margin-left: -18px;
		margin-right: -18px;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}

	/* 代码块在触屏上不显示复制按钮，点空白易误触 */
	.single__content pre .code-copy {
		opacity: 1;
		bottom: 8px;
		right: 8px;
		top: auto;
	}

	/* 目录在顶部展示时改为可折叠，避免长目录把正文挤出首屏 */
	.toc {
		margin-bottom: 24px;
	}

	.toc__inner {
		padding: 0;
		border: 1px solid var(--q-border);
		border-radius: var(--q-radius);
		background: var(--q-surface);
		overflow: hidden;
		max-height: none;
	}

	/* 移动端恢复 details 的交互能力 */
	.toc__details > summary {
		cursor: pointer;
		pointer-events: auto;
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 14px 16px;
		margin: 0;
		user-select: none;
	}

	.toc__details:not([open]) > .toc__nav {
		display: none;
	}

	.toc__details[open] > summary {
		border-bottom: 1px solid var(--q-border);
	}

	.toc__summary .toc__title {
		flex: 1;
		font-size: 0.875rem;
		font-weight: 600;
		color: var(--q-text);
		letter-spacing: 0;
	}

	.toc__count {
		display: inline-block;
		min-width: 20px;
		padding: 1px 7px;
		border-radius: 999px;
		background: var(--q-surface-2);
		color: var(--q-text-3);
		font-size: 0.75rem;
		font-weight: 500;
		text-align: center;
	}

	.toc__chevron {
		display: block;
		flex-shrink: 0;
		color: var(--q-text-3);
		transition: transform 0.22s var(--q-ease);
	}

	.toc__details[open] .toc__chevron {
		transform: rotate(180deg);
	}

	.toc__nav {
		padding: 10px 16px 14px;
	}

	.toc__item a {
		padding: 7px 0 7px 12px;
		margin-left: 0;
		border-left: 2px solid transparent;
	}

	.toc__item--h3 a {
		padding-left: 24px;
	}

	.toc__item--h4 a {
		padding-left: 36px;
	}

	.single__footer {
		margin-top: 36px;
		padding-top: 22px;
	}

	.post-nav {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.post-nav__item {
		padding: 15px 17px;
	}

	.post-nav__item--next {
		text-align: left;
	}

	.comments {
		margin-top: 44px;
		padding-top: 28px;
	}

	.comment__inner {
		padding: 15px;
		gap: 12px;
	}

	.comment__avatar img {
		width: 36px;
		height: 36px;
	}

	.comments__list .children {
		padding-left: 14px;
	}

	.site-footer {
		padding: 36px 0 30px;
	}

	.site-footer__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.site-footer__list {
		gap: 16px;
	}

	.error-404 {
		margin: 56px auto;
	}

	.error-404__code {
		font-size: 3.5rem;
	}

	.search-overlay {
		padding: 64px 14px 14px;
	}

	.back-to-top {
		right: 16px;
		bottom: 16px;
		width: 38px;
		height: 38px;
	}
}

/* 极窄屏（小屏手机竖屏） */
@media (max-width: 420px) {
	.container {
		padding: 0 14px;
	}

	:root {
		--q-gap: 14px;
	}

	body {
		font-size: 15px;
	}

	.custom-logo {
		max-height: 30px;
		max-width: 118px;
	}
	.hero__media {
		min-height: 140px;
		height: 140px;
	}

	.hero__body {
		padding: 20px 18px 18px;
	}

	.hero__title {
		font-size: 1.25rem;
	}

	.card__body {
		padding: 18px 18px 16px;
	}

	.card__title {
		font-size: 1.0625rem;
	}

	.single__title {
		font-size: 1.5rem;
	}

	.single__content pre {
		margin-left: -14px;
		margin-right: -14px;
		padding: 14px;
		font-size: 0.8125rem;
	}

	.single__content h2 {
		font-size: 1.3125rem;
	}

	.comment__inner {
		padding: 14px;
		gap: 12px;
	}

	.comment__avatar img {
		width: 36px;
		height: 36px;
	}

	.widget {
		padding: 18px;
	}

	.filter-bar__item {
		padding: 5px 11px;
		font-size: 0.8125rem;
	}

	.pagination .page-numbers {
		min-width: 34px;
		height: 34px;
		padding: 0 10px;
		font-size: 0.8125rem;
	}
}

/* 无障碍与打印
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media print {
	.site-header,
	.site-footer,
	.toc,
	.sidebar,
	.progress-bar,
	.back-to-top,
	.search-overlay,
	.post-nav,
	.comments {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 11.5pt;
	}

	.single__content {
		max-width: 100%;
	}
}
