/*
Theme Name: WarmAPI Modern
Theme URI: https://warmapi.com/
Description: 暖心架构站点现代主题 —— 继承 Iconic One，去除页脚外链，重构视觉层：圆角卡片、柔和阴影、渐变强调色、响应式栅格。
Author: warmapi
Template: iconic-one
Version: 1.1.0
Requires at least: 6.7
Tested up to: 7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iconic-one
Tags: blog, one-column, two-columns, right-sidebar, custom-logo, full-width-template, translation-ready, featured-images, threaded-comments
*/

/* ==========================================================================
   WarmAPI Modern — 视觉层
   加载顺序：父主题 style.css → 父主题 custom.css → 本文件（覆盖生效）

   父主题遗留问题的处理方式：
   - 凡是父主题用了 !important 的，本文件同样用 !important 对冲；
   - 凡是父主题用 px 写的，本文件用 rem + 逻辑属性重写。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌
   -------------------------------------------------------------------------- */
:root {
	/* 品牌色 —— 单一色相，靠明度分阶 */
	--w-accent:        #0B91EA;  /* 填充色（按钮、选中态），白字 3.36:1 仅用于大字 */
	--w-accent-text:   #0A6AA8;  /* 文字色，白底 5.48:1 —— 正文链接用这个 */
	--w-accent-dark:   #08587F;  /* hover / 浅底上的强调文字 */
	--w-accent-light:  #E8F4FE;  /* 浅色底 */
	--w-accent-soft:   #F4FAFF;  /* 极浅底 */

	/* 中性色阶 */
	--w-text:          #2C3742;  /* 标题与正文 */
	--w-text-soft:     #56657A;  /* 次要正文，5.98:1 */
	--w-text-muted:    #617185;  /* 元信息，4.99:1 */
	--w-text-faint:    #8A99A8;  /* 纯装饰（分隔符），2.92:1 不承载信息 */
	--w-border:        #E4ECF3;
	--w-border-strong: #D3E0EC;
	--w-surface:       #FFFFFF;
	--w-surface-alt:   #F5F8FB;
	--w-page:          #F2F6FA;

	/* 圆角 */
	--w-radius-sm:  6px;
	--w-radius:     10px;
	--w-radius-lg:  16px;

	/* 阴影 —— 只表达深度，边框表达结构 */
	--w-shadow-xs: 0 1px 2px rgba(31, 56, 100, .05);
	--w-shadow-sm: 0 2px 8px rgba(31, 56, 100, .07), 0 1px 2px rgba(31, 56, 100, .04);
	--w-shadow-md: 0 6px 20px rgba(31, 56, 100, .10), 0 2px 6px rgba(31, 56, 100, .05);

	/* 间距 */
	--w-gap:    1.5rem;
	--w-gap-sm: .75rem;
	--w-gap-lg: 2.5rem;

	/* 字体 */
	--w-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;
	--w-font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas,
	               "Liberation Mono", monospace;

	/* 动效 */
	--w-ease: cubic-bezier(.2, 0, 0, 1);
}

/* --------------------------------------------------------------------------
   2. 基础 —— 盒模型与排版基线
   -------------------------------------------------------------------------- */
html {
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

/* 父主题没有全局 border-box，content-box 让带 padding 的卡片溢出容器。
   这里统一为 border-box，padding 与 border 计入宽度。 */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: var(--w-font);
	font-size: 1rem;      /* 16px —— 浏览器字号偏好生效 */
	line-height: 1.6;     /* 正文 1.6，落在 1.5–1.6 区间 */
	color: var(--w-text);
	background-color: var(--w-page);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* 页面外壳 */
.site {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
	background-color: transparent;
}

/* 顶部氛围光 */
body::before {
	content: "";
	position: fixed;
	inset: 0 0 auto 0;
	height: 400px;
	background:
		radial-gradient(900px 320px at 15% -8%, rgba(11, 145, 234, .13), transparent 65%),
		radial-gradient(760px 300px at 88% -12%, rgba(99, 102, 241, .10), transparent 62%);
	pointer-events: none;
	z-index: 0;
}

a {
	color: var(--w-accent-text);
	text-decoration: none;
	transition: color .15s var(--w-ease);
}
a:hover {
	color: var(--w-accent-dark);
	text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--w-text);
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.3;
	margin: 0;
}

code, pre, kbd, samp {
	font-family: var(--w-font-mono);
	font-size: .92em;
}

::selection {
	background: var(--w-accent);
	color: #fff;
}

/* 正文行宽上限 —— 60–75 字符 */
.entry-content > *,
.entry-summary {
	max-width: 68ch;
}

/* --------------------------------------------------------------------------
   3. 页头
   -------------------------------------------------------------------------- */
.site-header {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	margin: 24px 0 32px;
	padding: 18px 28px 0;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius-lg);
	background: rgba(255, 255, 255, .85);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	box-shadow: var(--w-shadow-sm);
	text-align: left;
	height: auto;
}

.io-title-description {
	flex: 0 0 auto;
	float: none;
	margin: 0;
}

.site-header .io-title-description a {
	display: inline-block;
	font-size: 1.375rem;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--w-text);
	line-height: 1.25;
}
.site-header .io-title-description a:hover {
	color: var(--w-accent-text);
}

.site-header .io-title-description .site-description {
	margin-top: 3px;
	padding: 0;
	display: block;
	font-size: .8125rem;
	font-weight: 400;
	color: var(--w-text-muted);
	line-height: 1.5;
}
.site-header .io-title-description .site-description:hover {
	color: var(--w-text-soft);
}

.site-header h1,
.site-header h2 {
	text-align: left;
	margin: 0;
}
.site-header h1 a,
.site-header h2 a {
	color: var(--w-text);
}

.themonic-logo {
	float: none;
	margin: 0;
	padding: 0;
	max-width: 150px;
}
.themonic-logo img {
	max-height: 40px;
	width: auto;
	display: block;
}

/* --------------------------------------------------------------------------
   4. 导航菜单
   -------------------------------------------------------------------------- */
/* 桌面端导航：15 个分类项（约 1058px）放不下一行，做成页头内的第二条横栏，
   顶部一条细分隔线与品牌区分开。
   父主题在 min-width:768px 的媒体查询里给 .themonic-nav ul.nav-menu 加了
   display:inline-block !important 和 font-size:0（为了消除 inline-block 间隙），
   结果是菜单项被挤成一行、字距塌陷。这里用同样的 !important 力度对冲。 */
@media screen and (min-width: 768px) {
	.themonic-nav {
		flex: 0 0 auto;
		float: none;
		width: 100%;
		margin: 14px 0 0;
		padding-top: 12px;
		border-top: 1px solid var(--w-border);
		text-align: left;
		display: flex;
		justify-content: flex-start;
		flex-wrap: wrap;
		gap: 2px;
	}

	.themonic-nav ul.nav-menu {
		display: flex !important;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: center;
		gap: 2px;
		margin: 0;
		padding: 0;
		background: none;
		border: none;
		font-size: inherit;   /* 覆盖父主题的 font-size:0 */
		width: auto;
		text-align: left;
	}
}

.themonic-nav li {
	font-size: .84375rem;
	font-weight: 500;
	line-height: 1.4;
	width: auto;
	background: transparent !important;
	padding: 0 !important;
	position: relative;
}

.themonic-nav li a {
	display: inline-block;
	padding: 5px 11px;
	border-radius: 999px;
	color: var(--w-text-soft);
	white-space: nowrap;
	transition: background-color .15s var(--w-ease), color .15s var(--w-ease);
}

.themonic-nav li:hover {
	background: transparent;
}
/* hover 只做淡底 + 文字变色，不铺满实色 */
.themonic-nav li:hover > a {
	background: var(--w-surface-alt);
	color: var(--w-accent-text);
}

/* 当前项 —— 淡蓝底 + 强调色文字，不用实心蓝块 */
.themonic-nav li.current-menu-item > a,
.themonic-nav li.current_page_item > a,
.themonic-nav li.current-cat > a {
	background: var(--w-accent-light);
	color: var(--w-accent-dark);
	font-weight: 600;
}
.themonic-nav li.current-menu-item > a:hover,
.themonic-nav li.current_page_item > a:hover,
.themonic-nav li.current-cat > a:hover {
	background: var(--w-accent-light);
	color: var(--w-accent-dark);
}

/* 下拉子菜单 */
.themonic-nav li ul {
	background: var(--w-surface);
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	box-shadow: var(--w-shadow-md);
	padding: 6px;
	margin: 0;
}
.themonic-nav li ul li a {
	display: block;
	padding: 6px 12px;
	font-size: .8125rem;
	color: var(--w-text-soft);
}
.themonic-nav li ul li a:hover {
	background: var(--w-accent-light);
	color: var(--w-accent-dark);
}

/* 汉堡按钮 —— 桌面端不显示（导航直接平铺），移动端保留折叠菜单 */
.themonic-nav .menu-toggle {
	display: none;
	position: relative;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: auto;
	background: var(--w-accent-light);
	border: 1px solid var(--w-border);
	border-radius: 999px;
	color: var(--w-accent-dark);
	font-size: .8125rem;
	font-weight: 600;
	padding: 8px 18px;
	cursor: pointer;
	transition: background-color .15s var(--w-ease), border-color .15s var(--w-ease);
}
.themonic-nav .menu-toggle:hover {
	background: var(--w-accent);
	border-color: var(--w-accent);
	color: #fff;
}
.themonic-nav .menu-toggle label.iomenu {
	display: inline-block;
	width: auto;
	margin: 0;
	position: static;
}
.themonic-nav .menu-toggle .iolines {
	display: block;
	width: 16px;
	height: 2px;
	margin: 3px 0;
	border-radius: 2px;
	background-color: currentColor;
}

/* --------------------------------------------------------------------------
   5. 内容栅格
   -------------------------------------------------------------------------- */
/* 父主题的两栏是 float + 百分比宽度，只在 max-width:1040px 时切换。
   保持 float 模型（避免与父主题的 width/margin 冲突），只重置尺寸与间距。 */
.wrapper {
	border: none;
	margin: 0;
	padding: 0;
	width: auto;
	overflow: hidden;
}

.site-content {
	float: left;
	width: calc(100% - 320px);
	margin: 0;
	padding: 0;
	border: none;
	min-width: 0;
}

body.template-front-page .site-content,
body.single-attachment .site-content,
body.full-width .site-content {
	width: calc(100% - 320px);
}

.widget-area {
	float: right;
	width: 280px;
	margin: 0;
	padding: 0;
}

/* --------------------------------------------------------------------------
   6. 文章卡片
   -------------------------------------------------------------------------- */
.site-content article {
	position: relative;
	margin-bottom: var(--w-gap);
	padding: 24px 28px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius-lg);
	background: var(--w-surface);
	box-shadow: var(--w-shadow-xs);
	transition: box-shadow .2s var(--w-ease), border-color .2s var(--w-ease);
}

.site-content article.sticky,
.site-content article.featured-post {
	border-color: var(--w-accent);
	box-shadow: 0 0 0 3px var(--w-accent-soft), var(--w-shadow-sm);
}

/* 悬停上浮 —— 只在能悬停的指针上，且尊重动效偏好 */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.site-content article:hover {
		border-color: var(--w-border-strong);
		box-shadow: var(--w-shadow-md);
		transform: translateY(-2px);
	}
}

.featured-post {
	position: absolute;
	top: -11px;
	left: 28px;
	margin: 0;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--w-accent);
	color: #fff;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	box-shadow: var(--w-shadow-sm);
}

.entry-header {
	margin: 0 0 12px;
}

.site-content .entry-title {
	margin: 0 0 8px;
	font-size: 1.3125rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: -.015em;
}
.site-content .entry-title a {
	color: var(--w-text);
}
.site-content .entry-title a:hover {
	color: var(--w-accent-text);
}
h1.entry-title {
	font-size: 1.875rem;
	line-height: 1.3;
}

/* 元信息行 —— 父主题在窄屏给了 width:108.2%; margin-left:-4.1%，会溢出容器 */
.below-title-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
	width: auto;
	margin: 0 0 4px;
	padding: 0;
	background: none;
	font-size: .8125rem;
	color: var(--w-text-muted);
}
.below-title-meta .adt,
.below-title-meta .adt-comment {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.below-title-meta .meta-sep {
	color: var(--w-text-faint);
}
.below-title-meta a {
	color: var(--w-text-soft);
}
.below-title-meta a:hover {
	color: var(--w-accent-text);
}

.entry-summary,
.entry-content {
	font-size: 1rem;
	line-height: 1.75;
	color: var(--w-text-soft);
}

.entry-content {
	color: var(--w-text);
}
.entry-content > * + * {
	margin-top: 1.05em;
}

/* 摘要里的缩略图 —— 父主题用 .excerpt-thumb 包裹缩略图，无图时该 div 里只剩
   空白字符（:empty 不匹配），但仍会占 220px 浮动，把摘要文字挤到右边。 */
.excerpt-thumb {
	float: left;
	width: 220px;
	margin: 4px 22px 10px 0;
}
.excerpt-thumb:empty,
.excerpt-thumb:not(:has(img)) {
	width: 0;
	margin: 0;
	float: none;
}
.excerpt-thumb img,
.excerpt-thumb .alignleft {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border-radius: var(--w-radius);
	box-shadow: var(--w-shadow-sm);
}

.entry-summary {
	line-height: 1.75;
}
.entry-summary p {
	margin: 0 0 4px;
}

/* 继续阅读 —— 主题把 read-more span 放在摘要 <p> 内，这里让它单独占一行 */
.read-more {
	display: block;
	margin-top: 8px;
	font-weight: 600;
	font-size: .875rem;
	color: var(--w-accent-text);
}
.read-more a {
	color: var(--w-accent-text);
	text-decoration: none !important;
}
.read-more a:hover {
	color: var(--w-accent-dark);
}

/* 文章底部元信息 */
.entry-meta {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--w-border);
	font-size: .8125rem;
	color: var(--w-text-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
}
.entry-meta > span {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.entry-meta a {
	color: var(--w-text-soft);
}
.entry-meta a:hover {
	color: var(--w-accent-text);
}
.entry-meta .cat-links a,
.entry-meta .tags-links a,
.entry-meta span a {
	display: inline-block;
	margin: 0;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--w-surface-alt);
	border: 1px solid var(--w-border);
	font-size: .75rem;
	color: var(--w-text-soft);
	text-decoration: none;
	transition: background-color .15s var(--w-ease), border-color .15s var(--w-ease);
}
.entry-meta .cat-links a:hover,
.entry-meta .tags-links a:hover,
.entry-meta span a:hover {
	background: var(--w-accent-light);
	border-color: var(--w-accent);
	color: var(--w-accent-dark);
}

/* --------------------------------------------------------------------------
   7. 侧边栏小组件
   -------------------------------------------------------------------------- */
.widget-area .widget {
	margin-bottom: var(--w-gap);
	padding: 20px 22px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius-lg);
	background: var(--w-surface);
	box-shadow: var(--w-shadow-xs);
	line-height: 1.7;
	word-wrap: break-word;
	hyphens: auto;
}

.widget-area .widget-title,
.widget-area .widget > p.widget-title {
	margin: 0 0 12px;
	padding: 0 0 8px;
	border-bottom: 1px solid var(--w-border);
	background: none;
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--w-text);
	text-transform: uppercase;
}

/* 父主题给了 .widget-area .widget a { font-size: 98% }，导致链接 12.74px
   与 li 的 13px 不一致，项目符号与文字基线错位。这里统一继承。 */
.widget-area .widget a {
	font-size: inherit;
	color: var(--w-text-soft);
}
.widget-area .widget a:hover {
	color: var(--w-accent-text);
}

.widget-area ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
/* 父主题 .widget-area .widget li { padding: 5px 0 } 会压掉左侧留白，
   项目符号因此贴住文字。用逻辑属性重设，与 RTL 无关。 */
.widget-area .widget li {
	position: relative;
	margin: 0;
	padding: 7px 0 7px 18px !important;
	font-size: .8125rem;
	line-height: 1.6;
	color: var(--w-text-soft);
	border-bottom: 1px solid var(--w-surface-alt);
}
.widget-area .widget li:last-child {
	border-bottom: none;
}
.widget-area .widget li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 13px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--w-accent);
	opacity: .6;
}
.widget-area .widget li a {
	color: var(--w-text-soft);
}
.widget-area .widget li a:hover {
	color: var(--w-accent-text);
}

/* 输入控件 */
.widget-area input[type="text"],
.widget-area input[type="email"],
.widget-area input[type="url"],
.widget-area input[type="password"],
.widget-area input[type="search"],
.widget-area textarea,
.widget-area select {
	width: 100%;
	padding: 9px 13px;
	border: 1px solid var(--w-border-strong);
	border-radius: var(--w-radius-sm);
	background: var(--w-surface-alt);
	color: var(--w-text);
	font-family: inherit;
	font-size: 1rem;      /* iOS 上小于 16px 会触发页面缩放 */
	line-height: 1.5;
	transition: border-color .15s var(--w-ease), box-shadow .15s var(--w-ease);
}
.widget-area input:focus,
.widget-area textarea:focus,
.widget-area select:focus {
	outline: none;
	border-color: var(--w-accent);
	box-shadow: 0 0 0 3px var(--w-accent-soft);
	background: var(--w-surface);
}

/* 搜索表单 —— 输入框与按钮同一行 */
.widget-area .widget_search form,
.widget-area #searchform {
	display: block;
}
.widget-area .widget_search form > div,
.widget-area #searchform > div {
	display: flex;
	align-items: stretch;
	gap: 8px;
}
.widget-area #s,
.widget-area .widget_search input[type="search"] {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
}
.widget-area #searchsubmit,
.widget-area .widget_search input[type="submit"] {
	flex: 0 0 auto;
	width: auto;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 9px 18px;
	border: 1px solid var(--w-accent);
	border-radius: var(--w-radius-sm);
	background: var(--w-accent);
	color: #fff;
	font-family: inherit;
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s var(--w-ease);
}
.widget-area #searchsubmit:hover,
.widget-area .widget_search input[type="submit"]:hover {
	background: var(--w-accent-dark);
	border-color: var(--w-accent-dark);
}

/* 通用按钮 */
.widget-area button,
.widget-area .wp-block-button__link {
	padding: 9px 18px;
	border: none;
	border-radius: var(--w-radius-sm);
	background: var(--w-accent);
	color: #fff;
	font-family: inherit;
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s var(--w-ease);
}
.widget-area button:hover,
.widget-area .wp-block-button__link:hover {
	background: var(--w-accent-dark);
}

/* 标签云 */
.widget-area .tagcloud a,
.widget-area .wp-tag-cloud a {
	display: inline-block;
	margin: 0 5px 6px 0;
	padding: 3px 11px;
	border-radius: 999px;
	background: var(--w-surface-alt);
	border: 1px solid var(--w-border);
	font-size: .75rem !important;
	color: var(--w-text-soft);
	transition: background-color .15s var(--w-ease), border-color .15s var(--w-ease);
}
.widget-area .tagcloud a:hover,
.widget-area .wp-tag-cloud a:hover {
	background: var(--w-accent-light);
	border-color: var(--w-accent);
	color: var(--w-accent-dark);
}

/* --------------------------------------------------------------------------
   8. 页脚
   -------------------------------------------------------------------------- */
/* 父主题 footer[role="contentinfo"] { width: 100%; padding: 24px 0 } 加上
   子主题 #colophon 的 30px 内边距，在 content-box 下总宽 1242px > 容器 1228px，
   320px 视口直接产生横向滚动。这里 width:auto + border-box 收进容器。 */
footer[role="contentinfo"] {
	width: auto;
	max-width: 1180px;
	margin: var(--w-gap-lg) auto 32px;
	padding: 0;
	background: none;
	border: none;
	clear: both;
	font-size: 1rem;
	line-height: 1.6;
}

#colophon {
	position: relative;
	z-index: 1;
	margin: 0;
	padding: 24px 28px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius-lg);
	background: var(--w-surface);
	box-shadow: var(--w-shadow-xs);
}

.site-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 20px;
	text-align: left;
}

.footercopy,
.footercredit {
	font-size: .8125rem;
	color: var(--w-text-muted);
	line-height: 1.6;
}
.footercopy a,
.footercredit a {
	color: var(--w-text-soft);
}
.footercopy a:hover,
.footercredit a:hover {
	color: var(--w-accent-text);
}

/* 主题署名外链容器 —— 已被子主题 footer.php 移除，此处兜底隐藏 */
.site-wordpress {
	display: none !important;
}

/* --------------------------------------------------------------------------
   9. 翻页导航 —— 页尾的空白框
   -------------------------------------------------------------------------- */
/* 列表页 #nav-below 与详情页 .nav-single 是父主题给的两块灰底空卡。
   去掉独立底板，改为紧贴内容的轻量行。 */
#nav-below.navigation,
.nav-single {
	margin: 0 0 var(--w-gap);
	padding: 0;
	border: none;
	background: none;
	box-shadow: none;
	font-size: .875rem;
}

#nav-below .nav-previous,
#nav-below .nav-next,
.nav-single .nav-previous,
.nav-single .nav-next {
	display: inline-block;
	float: none;
	/* 父主题给 .alignleft/.alignright 设了 width:50%，两个各占一半会换行 */
	width: auto;
	margin: 0 16px 0 0;
}
.nav-single .nav-next {
	margin: 0 0 0 16px;
}

.nav-previous a,
.nav-next a {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius-sm);
	background: var(--w-surface);
	color: var(--w-accent-text);
	font-weight: 600;
	font-size: .875rem;
	text-decoration: none;
	transition: border-color .15s var(--w-ease), background-color .15s var(--w-ease);
}
.nav-previous a:hover,
.nav-next a:hover {
	border-color: var(--w-accent);
	background: var(--w-accent-light);
	color: var(--w-accent-dark);
}

/* 父主题没有 .assistive-text 规则，"Post navigation" 这类屏幕阅读器专用
   文本直接显示给所有用户。补上隐藏规则。 */
.assistive-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* --------------------------------------------------------------------------
   10. 分页器
   -------------------------------------------------------------------------- */
.wp-pagenavi {
	margin: var(--w-gap) 0;
	text-align: center;
}
.wp-pagenavi a,
.wp-pagenavi span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	margin: 0 3px;
	padding: 0 11px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius-sm);
	background: var(--w-surface);
	color: var(--w-text-soft);
	font-size: .875rem;
	box-shadow: var(--w-shadow-xs);
	transition: border-color .15s var(--w-ease), background-color .15s var(--w-ease);
}
.wp-pagenavi a:hover {
	border-color: var(--w-accent);
	background: var(--w-accent-light);
	color: var(--w-accent-dark);
}
.wp-pagenavi .current {
	border-color: var(--w-accent);
	background: var(--w-accent);
	color: #fff;
}
.wp-pagenavi .page {
	background: var(--w-surface-alt);
}

/* --------------------------------------------------------------------------
   11. 正文元素
   -------------------------------------------------------------------------- */
.entry-content a,
.entry-summary a {
	text-decoration: underline;
	text-decoration-color: rgba(10, 106, 168, .35);
	text-underline-offset: 3px;
}
.entry-content a:hover {
	text-decoration-color: var(--w-accent-text);
}

.entry-content blockquote,
blockquote {
	margin: 1.4em 0;
	padding: 14px 20px;
	border-left: 3px solid var(--w-accent);
	border-radius: 0 var(--w-radius) var(--w-radius) 0;
	background: var(--w-accent-soft);
	color: var(--w-text-soft);
	font-style: normal;
}
.entry-content blockquote p:last-child,
blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content pre,
pre {
	margin: 1.4em 0;
	padding: 16px 18px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	background: #F6F8FA;
	color: #24292F;
	font-size: .84375rem;
	line-height: 1.65;
	overflow-x: auto;
	box-shadow: var(--w-shadow-xs);
}

.entry-content code:not(pre code),
code:not(pre code) {
	padding: .15em .45em;
	border-radius: 5px;
	background: var(--w-accent-soft);
	color: #B3306B;
	font-size: .9em;
}

.entry-content table,
table {
	width: 100%;
	margin: 1.4em 0;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	overflow: hidden;
	font-size: .875rem;
}
.entry-content table th,
.entry-content table td,
table th,
table td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--w-border);
	text-align: left;
}
.entry-content table th,
table th {
	background: var(--w-surface-alt);
	font-weight: 600;
	color: var(--w-text);
}
.entry-content table tr:last-child td,
table tr:last-child td {
	border-bottom: none;
}

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

.entry-content .alignleft,
.entry-content .alignright,
.entry-content .aligncenter {
	border-radius: var(--w-radius);
}
.entry-content .alignleft {
	margin: 0 22px 16px 0;
}
.entry-content .alignright {
	margin: 0 0 16px 22px;
}
.entry-content .aligncenter {
	display: block;
	margin: 1.4em auto;
}

.wp-block-button__link {
	border-radius: var(--w-radius-sm);
	background: var(--w-accent);
	font-family: var(--w-font);
	font-weight: 600;
	transition: background-color .15s var(--w-ease);
}
.wp-block-button__link:hover {
	background: var(--w-accent-dark);
}

/* 归档 / 404 / 评论 */
.page-header {
	margin-bottom: var(--w-gap);
	padding: 20px 24px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius-lg);
	background: var(--w-surface);
	box-shadow: var(--w-shadow-xs);
}

.comment-list {
	list-style: none;
	padding: 0;
}
.comment-list .comment-body {
	padding: 18px 22px;
	margin-bottom: 14px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	background: var(--w-surface);
}

/* 评论区 —— 父主题的表单是浏览器默认样式，与站点视觉脱节 */
.comments-area {
	margin-top: var(--w-gap-lg);
}

#respond {
	margin-top: var(--w-gap);
	padding: 24px 28px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius-lg);
	background: var(--w-surface);
	box-shadow: var(--w-shadow-xs);
}

#respond h3#reply-title,
.comments-title {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 6px;
}

#respond form {
	margin: 16px 0 0;
}
#respond form p {
	margin: 0 0 14px;
}
#respond form p.logged-in-as {
	margin-bottom: 18px;
	font-size: .875rem;
	color: var(--w-text-muted);
}
#respond form label {
	display: block;
	margin-bottom: 6px;
	font-size: .875rem;
	font-weight: 600;
	color: var(--w-text-soft);
}
#respond form label .required {
	color: #C0392B;
}

#respond form input[type="text"],
#respond form input[type="email"],
#respond form input[type="url"],
#respond form textarea {
	width: 100%;
	max-width: 100%;
	padding: 10px 13px;
	border: 1px solid var(--w-border-strong);
	border-radius: var(--w-radius-sm);
	background: var(--w-surface-alt);
	color: var(--w-text);
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.6;
	transition: border-color .15s var(--w-ease), box-shadow .15s var(--w-ease);
}
#respond form input[type="text"]:focus,
#respond form input[type="email"]:focus,
#respond form input[type="url"]:focus,
#respond form textarea:focus {
	outline: none;
	border-color: var(--w-accent);
	box-shadow: 0 0 0 3px var(--w-accent-soft);
	background: var(--w-surface);
}
#respond form textarea {
	min-height: 180px;
	resize: vertical;
}
#respond form p.form-allowed-tags {
	margin: 0 0 14px;
	font-size: .75rem;
	line-height: 1.6;
	color: var(--w-text-muted);
}
#respond .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 14px;
	font-size: .8125rem;
	color: var(--w-text-soft);
}
#respond .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
	font-size: inherit;
}
#respond .comment-form-cookies-consent input {
	margin-top: 3px;
}
#respond .form-submit {
	margin: 0;
}
#respond input[type="submit"],
#respond button[type="submit"] {
	padding: 10px 22px;
	border: 1px solid var(--w-accent);
	border-radius: var(--w-radius-sm);
	background: var(--w-accent);
	color: #fff;
	font-family: inherit;
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s var(--w-ease), border-color .15s var(--w-ease);
}
#respond input[type="submit"]:hover,
#respond button[type="submit"]:hover {
	background: var(--w-accent-dark);
	border-color: var(--w-accent-dark);
}

/* 评论列表里的表单（回复） */
.comment-form {
	padding: 16px 18px;
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	background: var(--w-surface-alt);
}
.comment-reply-title {
	font-size: .9375rem;
	font-weight: 600;
	margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   12. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.site-content,
	body.template-front-page .site-content,
	body.single-attachment .site-content,
	body.full-width .site-content {
		float: none;
		width: 100%;
	}
	.widget-area {
		float: none;
		width: 100%;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: var(--w-gap);
	}
	.widget-area .widget {
		margin-bottom: 0;
	}
}

@media (max-width: 782px) {
	body {
		font-size: 1rem;
	}
	body::before {
		height: 280px;
	}
	.site {
		padding: 0 16px;
	}
	.site-header {
		margin: 16px 0 24px;
		padding: 16px 20px 0;
		gap: 0;
		border-radius: var(--w-radius);
	}
	.site-header .io-title-description a {
		font-size: 1.1875rem;
	}
	.themonic-nav {
		width: 100%;
		order: 3;
		margin: 12px 0 0;
		padding-top: 12px;
	}
	.site-content article {
		padding: 20px 22px;
		border-radius: var(--w-radius);
	}
	.site-content .entry-title {
		font-size: 1.125rem;
	}
	h1.entry-title {
		font-size: 1.5rem;
	}
	.excerpt-thumb {
		float: none;
		width: 100%;
		margin: 0 0 12px;
	}
	#colophon {
		padding: 20px 22px;
		border-radius: var(--w-radius);
	}
	.site-info {
		flex-direction: column;
		align-items: flex-start;
	}
	.widget-area {
		grid-template-columns: 1fr;
	}
	/* 移动端翻页导航不再并排 */
	#nav-below .nav-previous,
	#nav-below .nav-next,
	.nav-single .nav-previous,
	.nav-single .nav-next {
		display: block;
		margin: 0 0 8px;
	}
}

/* 移动端折叠菜单 —— 断点与父主题的 max-width:767px 对齐。
   桌面端导航直接平铺，不需要折叠；窄屏保留汉堡按钮展开，
   父主题的 selectnav.js 把 .toggled 加在 nav 元素上（不是 ul）。 */
@media screen and (max-width: 767px) {
	.themonic-nav .menu-toggle {
		display: inline-flex;
		align-self: flex-start;
	}
	.themonic-nav ul.nav-menu {
		display: none !important;
		position: static;
		width: 100%;
		justify-content: flex-start;
		margin-top: 10px;
		background: none;
		border: none;
	}
	.themonic-nav.toggled ul.nav-menu {
		display: flex !important;
		flex-direction: column;
		gap: 0;
		text-align: left;
		border: none;
		background: none;
	}
	.themonic-nav.toggled ul.nav-menu li {
		width: 100%;
		border-bottom: none;
		padding: 0;
	}
	.themonic-nav.toggled ul.nav-menu li a {
		display: block;
		padding: 9px 12px;
		border-radius: var(--w-radius-sm);
		border-bottom: 1px solid var(--w-border);
	}
	.themonic-nav.toggled ul.nav-menu li a:hover {
		background: var(--w-accent-light);
		color: var(--w-accent-dark);
	}
}

@media (max-width: 480px) {
	.site {
		padding: 0 12px;
	}
	.site-content article {
		padding: 16px 18px;
	}
	.widget-area .widget {
		padding: 18px 20px;
	}
	/* 窄屏下搜索框与按钮改为两行，避免输入框被压到不可用 */
	.widget-area .widget_search form > div,
	.widget-area #searchform > div {
		flex-wrap: wrap;
	}
	.widget-area #s,
	.widget-area .widget_search input[type="search"] {
		flex: 1 1 100%;
	}
	.widget-area #searchsubmit,
	.widget-area .widget_search input[type="submit"] {
		flex: 1 1 100%;
	}
}

/* --------------------------------------------------------------------------
   13. 无障碍
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.site-content article:hover {
		transform: none;
	}
}

/* 键盘焦点可见 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--w-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/* 跳转链接 —— 聚焦时显形 */
.skip-link:focus {
	background: var(--w-surface);
	border-radius: var(--w-radius-sm);
	box-shadow: var(--w-shadow-md);
	color: var(--w-accent-dark);
}

/* 打印 */
@media print {
	body::before { display: none; }
	.site-header, .site-content article, #colophon, .widget-area .widget {
		box-shadow: none;
		border: 1px solid #ddd;
	}
	.site-wordpress,
	.assistive-text {
		display: none !important;
	}
}
