/*
Theme Name: AI News Magazine
Theme URI: https://aichao.win/
Author: AI大海啸
Author URI: https://aichao.win/
Description: 为 AI 资讯聚合站设计的经典（非区块）杂志主题。头条 Hero + 次头条卡片 + 目录式资讯列表 + 右侧热度榜，内置深色模式与完整的插件内容样式覆盖。完全不引用任何外部资源（无 Google Fonts、无 CDN、无外链图标库），全部使用系统字体栈与内联 SVG，适配中国大陆网络环境。
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-news-magazine
Tags: news, magazine, blog, two-columns, right-sidebar, custom-menu, featured-images, translation-ready, dark-mode
*/

/* =============================================================================
   目录
   0. 设计令牌（配色 / 字体 / 间距 / 阴影）
   1. 基础重置与排版
   2. 无障碍（skip link / 焦点态 / 屏幕阅读器）
   3. 页面骨架与网格
   4. 顶部导航
   5. Hero 头条区
   6. 卡片（默认 / 次头条 / 列表 / 紧凑）
   7. 文章列表与分页
   8. 侧栏（热度榜 / 分类导航 / 组件 / 广告）
   9. 正文页（单篇）
   10. 插件内容块覆盖（.ainh-*）
   11. 广告位（预留高度，防 CLS）
   12. 页脚 / 404 / 页面 / 评论
   13. 深色模式
   14. 响应式（1024 / 768 / 480）
   ============================================================================= */

/* ===== 0. 设计令牌 =====
   主色 #1a73e8 与深色 #0b1b33 故意与插件生成的封面图渐变保持一致，
   这样「插件配图」和「主题界面」是同一套视觉，站点看起来才像一个整体品牌。 */
:root {
	--ainh-primary: #1a73e8;
	--ainh-primary-dark: #1557b0;
	--ainh-primary-soft: #e8f0fe;
	--ainh-ink: #0b1b33;
	--ainh-ink-2: #2c3e57;
	--ainh-muted: #5b6b80;
	--ainh-faint: #8a97a8;
	--ainh-bg: #ffffff;
	--ainh-bg-soft: #f6f8fb;
	--ainh-bg-softer: #eef2f8;
	--ainh-border: #e3e9f2;
	--ainh-border-strong: #ccd6e5;
	--ainh-accent-warm: #f0b429;
	--ainh-accent-warm-soft: #fffbe6;
	--ainh-danger: #d63638;
	--ainh-shadow-sm: 0 1px 2px rgba(11, 27, 51, .06);
	--ainh-shadow-md: 0 4px 14px rgba(11, 27, 51, .08);
	--ainh-shadow-lg: 0 12px 30px rgba(11, 27, 51, .14);
	--ainh-radius-sm: 6px;
	--ainh-radius: 10px;
	--ainh-radius-lg: 16px;
	/* 版心：1280px。这是「页面够宽」与「正文行宽可读」之间的实用折中。
	   实测过的取舍：1320px 时正文列 908px（18px 字号约 50 汉字/行），
	   与主流中文科技媒体（36氪、虎嗅等正文列约 840~900px）同一量级；
	   再收窄版心虽能把行宽压到 43 字，但整个页面会被挤瘦、宽屏两侧留白难看 ——
	   那属于拆东墙补西墙，所以行宽交给字号与侧边栏比例去调，不动版心。 */
	--ainh-wrap: 1280px;
	--ainh-gap: 28px;
	/* 字体栈：**拉丁字体在前，中文字体在后** —— 这是国际化站点的通行顺序。
	   浏览器按「字形」回退：英文与数字会先用第一个含该字形的字体渲染，中文再往后落。
	   如果把 PingFang / 雅黑 放在最前面（改版前就是这样），所有英文和数字都会被
	   它们自带的拉丁字形接管 —— 那是为兜底设计的，笔画偏宽、对比度低，
	   于是整页英文（OpenAI、GPT-6、TechCrunch）观感就"说不上来哪里不对"。
	   中文仍依赖系统字体（苹方 / 雅黑 / 思源黑体），不引任何外部字体文件，
	   保证中国大陆可访问、零额外请求。 */
	--ainh-font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
	--ainh-font-num: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	--ainh-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ===== 1. 基础重置与排版 ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--ainh-bg);
	color: var(--ainh-ink);
	font-family: var(--ainh-font);
	font-size: 16px;
	line-height: 1.75;
	/* 中文排版：不使用 text-align: justify。
	   justify 会把中英混排的行内空隙拉得很开，字距像被撕开一样难看，
	   左对齐 + 合理的行高才是中文阅读体验的正解。 */
	text-align: left;
	word-wrap: break-word;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

img { display: block; }

figure { margin: 0; }

/* 为懒加载图片预留占位底色，避免图片解码时出现白块（配合 CLS 控制）。 */
img[loading="lazy"] { background-color: var(--ainh-bg-softer); }

a {
	color: var(--ainh-primary);
	text-decoration: none;
	transition: color .18s var(--ainh-ease);
}

a:hover { color: var(--ainh-primary-dark); }

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

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.35em; }

blockquote {
	margin: 0 0 1.2em;
	padding: 0 0 0 1em;
	border-left: 3px solid var(--ainh-border-strong);
	color: var(--ainh-ink-2);
}

code, pre, kbd {
	font-family: var(--ainh-font-num);
	font-size: .9em;
}

code {
	padding: .15em .4em;
	border-radius: 4px;
	background: var(--ainh-bg-soft);
}

pre {
	padding: 16px 18px;
	overflow: auto;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius-sm);
	background: var(--ainh-bg-soft);
	line-height: 1.6;
}

hr {
	height: 1px;
	margin: 28px 0;
	border: 0;
	background: var(--ainh-border);
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--ainh-border); text-align: left; }

/* 数字统一用等宽字形，热度分/时间在列表里才能对齐成一条直线。 */
.num { font-family: var(--ainh-font-num); font-variant-numeric: tabular-nums; }

/* ===== 2. 无障碍 ===== */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 999;
	padding: 10px 18px;
	border-radius: 0 0 var(--ainh-radius-sm) var(--ainh-radius-sm);
	background: var(--ainh-primary);
	color: #fff;
	font-weight: 700;
	transition: top .2s var(--ainh-ease);
}

.skip-link:focus { top: 0; color: #fff; }

/* 键盘焦点必须可见：用 outline 而不是 outline:none，是可用性底线。 */
:focus-visible {
	outline: 3px solid var(--ainh-primary);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ===== 3. 页面骨架与网格 ===== */
.ainh-wrap {
	width: 100%;
	max-width: var(--ainh-wrap);
	margin: 0 auto;
	padding: 0 20px;
}

.ainh-main { padding: 32px 0 56px; }

/* 主栏 + 右侧栏：sidebar 固定 340px，主栏自适应，避免长标题被挤成竖排。
   正文列 = 版心 1280 − 340 − 32 = 908px，配 18px 正文字号约 50 汉字/行，
   与主流中文科技媒体的取值一致。
   注：曾经试过把「正文 + 侧边栏」整组收窄居中来压行宽，但那样正文左边缘
   会和页头 Logo 错开约 100px，看着像缩进、反而更空，所以放弃了。 */

/* 主栏 + 右侧栏：sidebar 固定 320px，主栏自适应，避免长标题被挤成竖排。 */
.ainh-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: var(--ainh-gap);
	align-items: start;
}

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

.ainh-col { min-width: 0; }

/* 区块标题：杂志感的细横线 + 左侧主色竖条。 */
.ainh-section { margin: 0 0 34px; }

/* 需要与上方区块拉开距离时使用（例如无结果的搜索页）。 */
.ainh-section--spaced { margin-top: 32px; }

/* 文章导语：比正文略大、左侧主色竖条，像杂志的「编辑按」。
   关键：正文的第一个段落本身就是插件写入的摘要，所以这里**不额外渲染**一块 lede，
   而是直接把正文首段样式化成导语 —— 否则同一段话会在页面上连着出现两次。
   用 p:first-of-type 而不是 :first-child，因为正文可能以 <ul class="ainh-takeaways"> 开头。 */
.ainh-lede,
.ainh-entry > p:first-of-type {
	margin: 0 0 26px;
	padding: 14px 0 14px 16px;
	border-left: 4px solid var(--ainh-primary);
	color: var(--ainh-ink-2);
	font-size: 1.06rem;
	line-height: 1.85;
}

/* 搜索页的「再搜一次」表单 */
.ainh-search-inline { margin: 0 0 22px; }

.ainh-section__head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 18px;
	padding: 0 0 10px;
	border-bottom: 2px solid var(--ainh-border);
}

.ainh-section__title {
	position: relative;
	margin: 0;
	padding-left: 13px;
	font-size: 1.15rem;
	letter-spacing: .01em;
}

.ainh-section__title::before {
	content: "";
	position: absolute;
	top: .18em;
	left: 0;
	width: 4px;
	height: 1em;
	border-radius: 2px;
	background: var(--ainh-primary);
}

.ainh-section__more {
	margin-left: auto;
	font-size: .88rem;
	font-weight: 600;
	white-space: nowrap;
}

/* ===== 4. 顶部导航 ===== */
.ainh-header {
	position: relative;
	z-index: 50;
	border-bottom: 1px solid var(--ainh-border);
	background: var(--ainh-bg);
}

.ainh-header__top {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 68px;
}

.ainh-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	color: var(--ainh-ink);
	font-weight: 700;
}

.ainh-brand:hover { color: var(--ainh-ink); }

/* 品牌标记：由 ainh_logo_mark() 输出自绘 SVG（渐变底板 + 海啸波浪 + 信号点）。
   这里只管外阴影、圆角与悬停微动，图形本身在 SVG 内。 */
.ainh-brand__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	border-radius: 12px;
	box-shadow: 0 5px 14px rgba(22, 35, 77, .22);
	transition: transform .25s var(--ainh-ease), box-shadow .25s var(--ainh-ease);
}

.ainh-brand:hover .ainh-brand__mark {
	transform: translateY(-1px);
	box-shadow: 0 9px 22px rgba(22, 35, 77, .3);
}

.ainh-logo { display: block; border-radius: 11.5px; }

.ainh-brand__text { display: flex; flex-direction: column; line-height: 1.14; }
.ainh-brand__name { font-size: 1.2rem; font-weight: 800; letter-spacing: -.022em; }
/* 双色字标：AI 用品牌蓝，中文落回墨色。整串同色会显得平。 */
.ainh-brand__name-latin { color: var(--ainh-primary); }
.ainh-brand__tagline { margin-top: 3px; color: var(--ainh-muted); font-size: .72rem; font-weight: 400; letter-spacing: .06em; }

.ainh-nav { flex: 1 1 auto; min-width: 0; }

.ainh-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	/* 导航靠右，与右侧的搜索按钮形成一组 —— 品牌在左、操作在右是杂志站的标准版式，
	   也比全部挤在左边更平衡。 */
	justify-content: flex-end;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ainh-nav__list a {
	display: inline-block;
	padding: 8px 12px;
	border-radius: var(--ainh-radius-sm);
	color: var(--ainh-ink-2);
	font-size: .94rem;
	font-weight: 600;
	transition: background-color .18s var(--ainh-ease), color .18s var(--ainh-ease);
}

.ainh-nav__list a:hover { background: var(--ainh-bg-soft); color: var(--ainh-primary); }

.ainh-nav__list .current-menu-item > a,
.ainh-nav__list .current_page_item > a,
.ainh-nav__list .current-menu-parent > a { background: var(--ainh-primary-soft); color: var(--ainh-primary); }

.ainh-nav__list .sub-menu {
	display: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ainh-header__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.ainh-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--ainh-border);
	border-radius: 50%;
	background: var(--ainh-bg);
	color: var(--ainh-ink-2);
	cursor: pointer;
	transition: border-color .18s var(--ainh-ease), background-color .18s var(--ainh-ease), color .18s var(--ainh-ease);
}

.ainh-icon-btn:hover { border-color: var(--ainh-primary); color: var(--ainh-primary); }

.ainh-menu-toggle { display: none; }

/* 搜索抽屉 */
.ainh-search {
	display: none;
	padding: 0 0 16px;
}

.ainh-search.is-open { display: block; }

.ainh-search__form { display: flex; gap: 8px; }

.ainh-search__field {
	flex: 1 1 auto;
	min-width: 0;
	padding: 11px 15px;
	border: 1px solid var(--ainh-border-strong);
	border-radius: var(--ainh-radius-sm);
	background: var(--ainh-bg);
	color: var(--ainh-ink);
	font-family: inherit;
	font-size: .95rem;
}

.ainh-search__field:focus { border-color: var(--ainh-primary); }

.ainh-search__submit,
.ainh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 20px;
	border: 0;
	border-radius: var(--ainh-radius-sm);
	background: var(--ainh-primary);
	color: #fff;
	font-family: inherit;
	font-size: .95rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .18s var(--ainh-ease), transform .18s var(--ainh-ease);
}

.ainh-search__submit:hover,
.ainh-btn:hover { background: var(--ainh-primary-dark); color: #fff; }

/* ===== 5. Hero 头条区 ===== */
.ainh-hero {
	margin: 0 0 30px;
}

.ainh-hero__card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 0;
	overflow: hidden;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius-lg);
	background: var(--ainh-bg);
	box-shadow: var(--ainh-shadow-sm);
	transition: box-shadow .25s var(--ainh-ease), transform .25s var(--ainh-ease), border-color .25s var(--ainh-ease);
}

.ainh-hero__card:hover {
	border-color: var(--ainh-border-strong);
	box-shadow: var(--ainh-shadow-lg);
	transform: translateY(-2px);
}

.ainh-hero__media {
	position: relative;
	display: block;
	/* 桌面端**不用固定比例**，而是填满网格单元的高度。
	   原因：正文列通常比图片列高，若这里锁死 16/9，图片下方就会空出一大片白，
	   头条看起来"图只占左上角、左下全是白"。填满之后版面才完整。
	   移动端变成单列后，再由第 14 节的媒体查询给回 16/9 比例。 */
	height: 100%;
	min-height: 280px;
	overflow: hidden;
	background: linear-gradient(135deg, var(--ainh-primary) 0%, var(--ainh-ink) 100%);
}

.ainh-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s var(--ainh-ease);
}

.ainh-hero__card:hover .ainh-hero__media img { transform: scale(1.035); }

/* 通栏文字头条：没有真图时切成单列，用浅底 + 大字承担"门面"作用。
   这是正经的编辑版式（杂志的封面故事常常就是纯文字），不是占位图 ——
   关键区别在于：这里没有任何"假装是照片"的元素。 */
.ainh-hero__card--text {
	grid-template-columns: minmax(0, 1fr);
	background: linear-gradient(135deg, var(--ainh-bg-soft) 0%, var(--ainh-bg) 60%);
}

.ainh-hero__card--text .ainh-hero__body {
	padding: 38px 42px 42px;
	gap: 16px;
}

.ainh-hero__card--text .ainh-hero__title {
	font-size: 2.15rem;
	line-height: 1.34;
	max-width: 22em;
}

.ainh-hero__card--text .ainh-hero__excerpt {
	font-size: 1.06rem;
	line-height: 1.8;
	max-width: 42em;
}

.ainh-hero__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 34px 34px 30px;
}

.ainh-hero__label {
	align-self: flex-start;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--ainh-ink);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
}

/* 自定义 Logo 场景：按原始比例显示，不让圆角与固定尺寸把 Logo 裁坏。 */
.ainh-brand--logo img { max-height: 40px; width: auto; }

.ainh-hero__title {
	margin: 0;
	font-size: 1.85rem;
	line-height: 1.32;
	letter-spacing: -.015em;
}

.ainh-hero__title a { color: var(--ainh-ink); }
.ainh-hero__title a:hover { color: var(--ainh-primary); }

.ainh-hero__excerpt {
	margin: 0;
	color: var(--ainh-muted);
	font-size: .98rem;
	line-height: 1.8;
}

.ainh-hero__meta { margin-top: auto; }

/* ===== 6. 卡片 ===== */
.ainh-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius);
	background: var(--ainh-bg);
	transition: transform .22s var(--ainh-ease), box-shadow .22s var(--ainh-ease), border-color .22s var(--ainh-ease);
}

/* 卡片 hover：轻微上浮 + 阴影加深，是「可点击」最省事的视觉提示。 */
.ainh-card:hover {
	border-color: var(--ainh-border-strong);
	box-shadow: var(--ainh-shadow-md);
	transform: translateY(-3px);
}

.ainh-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, var(--ainh-primary) 0%, var(--ainh-ink) 100%);
}

.ainh-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .45s var(--ainh-ease);
}

.ainh-card:hover .ainh-card__media img { transform: scale(1.04); }

.ainh-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 9px;
	padding: 16px 18px 15px;
}

.ainh-card__title {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.5;
}

.ainh-card__title a { color: var(--ainh-ink); }
.ainh-card__title a:hover { color: var(--ainh-primary); }

.ainh-card__excerpt {
	margin: 0;
	color: var(--ainh-muted);
	font-size: .9rem;
	line-height: 1.75;
}

.ainh-card__meta { margin-top: auto; padding-top: 4px; }

/* 分类胶囊：主色浅底 + 主色字，比纯灰标签更有品牌感。 */
.ainh-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--ainh-primary-soft);
	color: var(--ainh-primary-dark);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .02em;
	white-space: nowrap;
}

.ainh-pill:hover { background: var(--ainh-primary); color: #fff; }

.ainh-pill--muted { background: var(--ainh-bg-softer); color: var(--ainh-muted); }

/* 底部一行「信源 · 时间 · 热度分」 */
.ainh-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var(--ainh-muted);
	font-size: .8rem;
	line-height: 1.6;
}

.ainh-meta__sep { color: var(--ainh-faint); }

.ainh-meta__source {
	max-width: 12em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
	color: var(--ainh-ink-2);
}

.ainh-meta__time { color: var(--ainh-muted); }

.ainh-meta__dot {
	display: inline-block;
	width: 3px;
	height: 3px;
	margin: 0 2px;
	border-radius: 50%;
	background: var(--ainh-faint);
	vertical-align: middle;
}

/* 热度分徽章 */
.ainh-score {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 9px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: .76rem;
	font-weight: 700;
	line-height: 1.7;
	white-space: nowrap;
	background: var(--ainh-bg-softer);
	color: var(--ainh-muted);
}

.ainh-score__icon { flex: 0 0 auto; }

.ainh-score--hot { background: #fdecea; border-color: #f6c6c1; color: #b3261e; }
.ainh-score--warm { background: #fff4e0; border-color: #f4d9a8; color: #9a6100; }
.ainh-score--cool { background: var(--ainh-primary-soft); border-color: #c7dbfa; color: var(--ainh-primary-dark); }

/* 多源交叉徽章 */
.ainh-cross {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--ainh-bg-softer);
	color: var(--ainh-ink-2);
	font-size: .76rem;
	font-weight: 700;
	white-space: nowrap;
}

/* —— 次头条：一排 3~4 张 —— */
.ainh-secondary {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 0 0 38px;
}

/* —— 列表式卡片：缩略图在左、正文在右，像杂志目录而不是博客时间线 —— */
.ainh-card--list { flex-direction: row; align-items: stretch; }

.ainh-card--list .ainh-card__media {
	flex: 0 0 240px;
	width: 240px;
	aspect-ratio: 16 / 9;
	border-radius: 0;
}

.ainh-card--list .ainh-card__body { padding: 18px 20px 16px; }

.ainh-card--list .ainh-card__title { font-size: 1.14rem; line-height: 1.45; }

/* —— 紧凑卡片：只有文字，用于侧栏/相关内容 —— */
.ainh-card--compact {
	flex-direction: row;
	gap: 12px;
	padding: 12px 0;
	border: 0;
	border-bottom: 1px dashed var(--ainh-border);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	transform: none;
}

.ainh-card--compact:hover {
	border-color: var(--ainh-border);
	box-shadow: none;
	transform: none;
}

.ainh-card--compact .ainh-card__media {
	flex: 0 0 96px;
	width: 96px;
	aspect-ratio: 16 / 9;
	border-radius: var(--ainh-radius-sm);
}

.ainh-card--compact .ainh-card__body { gap: 6px; padding: 0; }

.ainh-card--compact .ainh-card__title { font-size: .92rem; line-height: 1.5; }

.ainh-card--compact .ainh-card__excerpt { display: none; }

/* 目录式列表：卡片之间用分隔线 + 留白，形成「目录条目」的节奏感。 */
.ainh-list { display: flex; flex-direction: column; gap: 20px; }

.ainh-list > .ainh-card { box-shadow: none; }

.ainh-list > .ainh-card + .ainh-card { padding-top: 20px; border-top: 1px solid var(--ainh-border); }

/* 没有真实配图时的处理：**不给这个位置安排图片**。
   这是被验证过的结论 —— 曾经用纯 CSS 配色面板去顶替真照片，但方向是错的：
   只要那个位置本该放照片，放任何替代品都会显得廉价，
   与旁边有真照片的卡片并排一比，差距一眼可见。
   所以模板层直接不渲染图片容器（template-parts/card.php、hero.php），
   这里只负责让「没有图」的版式依然成立，且看起来是刻意的。 */
.ainh-card--noimg {
	/* 顶部主色细条顶替图片承担的"视觉锚点"作用，给卡片一条明确的起始线 */
	border-top: 3px solid var(--ainh-primary);
}

.ainh-card--noimg .ainh-card__body { padding-top: 20px; }

/* 无图时标题就是唯一的视觉重心，所以给它加大字号 */
.ainh-card--noimg .ainh-card__title { font-size: 1.16rem; line-height: 1.5; }

/* 列表版式：媒体元素不存在，正文自然占满整行，去掉原本为图片预留的左内边距 */
.ainh-card--list.ainh-card--noimg .ainh-card__body { padding-left: 0; }

/* 列表里的无图项**不加顶部色条** —— 列表本身已有分隔线，再加一条会让无图项
   和有图项看起来不是同一套卡片。顶部色条只在网格版式里用来顶替图片的视觉锚点。 */
.ainh-card--list.ainh-card--noimg { border-top-width: 0; }

/* 紧凑窄栏（相关文章等）：不加顶部色条，避免小卡片显得花 */
.ainh-card--compact.ainh-card--noimg { border-top-width: 0; }
.ainh-card--compact.ainh-card--noimg .ainh-card__title { font-size: .98rem; }

/* ===== 7. 文章列表与分页 ===== */
.ainh-empty-state {
	padding: 40px 24px;
	border: 1px dashed var(--ainh-border-strong);
	border-radius: var(--ainh-radius);
	background: var(--ainh-bg-soft);
	color: var(--ainh-muted);
	text-align: center;
}

.ainh-pagination { margin: 40px 0 0; }

.ainh-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.ainh-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius-sm);
	background: var(--ainh-bg);
	color: var(--ainh-ink-2);
	font-size: .92rem;
	font-weight: 600;
	transition: border-color .18s var(--ainh-ease), background-color .18s var(--ainh-ease), color .18s var(--ainh-ease);
}

.ainh-pagination .page-numbers:hover { border-color: var(--ainh-primary); color: var(--ainh-primary); }

.ainh-pagination .page-numbers.current {
	border-color: var(--ainh-primary);
	background: var(--ainh-primary);
	color: #fff;
}

.ainh-pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* 归档页标题条 */
.ainh-archive-head {
	margin: 0 0 28px;
	padding: 24px 26px;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius);
	background: var(--ainh-bg-soft);
}

.ainh-archive-head__label {
	display: inline-block;
	margin: 0 0 8px;
	color: var(--ainh-primary);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.ainh-archive-head__title { margin: 0; font-size: 1.6rem; }

.ainh-archive-head__desc { margin: 10px 0 0; color: var(--ainh-muted); font-size: .94rem; }

.ainh-archive-head__count { margin: 8px 0 0; color: var(--ainh-faint); font-size: .84rem; }

/* ===== 8. 侧栏 ===== */
.ainh-sidebar {
	position: sticky;
	/* 顶部导航高度 + 一点呼吸空间；吸顶让最贵的广告位始终可见。 */
	top: 20px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.ainh-widget,
.ainh-box {
	padding: 18px 18px 16px;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius);
	background: var(--ainh-bg);
}

.ainh-box__title,
.ainh-widget .widget-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	padding: 0 0 10px;
	border-bottom: 1px solid var(--ainh-border);
	font-size: .98rem;
	font-weight: 700;
}

.ainh-box__title svg { color: var(--ainh-primary); flex: 0 0 auto; }

/* 热度榜 */
.ainh-rank { margin: 0; padding: 0; list-style: none; counter-reset: ainh-rank; }

.ainh-rank__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--ainh-border);
}

.ainh-rank__item:last-child { border-bottom: 0; padding-bottom: 0; }

/* 名次用 CSS 计数器生成，前三名换成主色实心块，形成视觉阶梯。 */
.ainh-rank__no {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	border-radius: 5px;
	background: var(--ainh-bg-softer);
	color: var(--ainh-muted);
	font-family: var(--ainh-font-num);
	font-size: .74rem;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
}

.ainh-rank__item:nth-child(1) .ainh-rank__no { background: #d93025; color: #fff; }
.ainh-rank__item:nth-child(2) .ainh-rank__no { background: #e8710a; color: #fff; }
.ainh-rank__item:nth-child(3) .ainh-rank__no { background: var(--ainh-accent-warm); color: #fff; }

.ainh-rank__body { min-width: 0; flex: 1 1 auto; }

.ainh-rank__title {
	display: block;
	color: var(--ainh-ink);
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.5;
}

.ainh-rank__title:hover { color: var(--ainh-primary); }

.ainh-rank__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 3px;
	color: var(--ainh-faint);
	font-size: .76rem;
}

/* 分类导航 */
.ainh-cats { margin: 0; padding: 0; list-style: none; }

.ainh-cats li { border-bottom: 1px dashed var(--ainh-border); }
.ainh-cats li:last-child { border-bottom: 0; }

.ainh-cats a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 0;
	color: var(--ainh-ink-2);
	font-size: .92rem;
	font-weight: 600;
}

.ainh-cats a:hover { color: var(--ainh-primary); }

.ainh-cats__count {
	flex: 0 0 auto;
	min-width: 30px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--ainh-bg-softer);
	color: var(--ainh-muted);
	font-family: var(--ainh-font-num);
	font-size: .74rem;
	font-weight: 700;
	text-align: center;
}

/* 侧栏 / 底部小工具区里的通用列表样式 */
.ainh-widget ul { margin: 0; padding: 0; list-style: none; }
.ainh-widget li { padding: 8px 0; border-bottom: 1px dashed var(--ainh-border); font-size: .92rem; }
.ainh-widget li:last-child { border-bottom: 0; }
.ainh-widget a { color: var(--ainh-ink-2); font-weight: 600; }
.ainh-widget a:hover { color: var(--ainh-primary); }
.ainh-widget .post-date { display: block; color: var(--ainh-faint); font-size: .76rem; font-weight: 400; }
.ainh-widget select,
.ainh-widget input[type="text"],
.ainh-widget input[type="search"] {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--ainh-border-strong);
	border-radius: var(--ainh-radius-sm);
	background: var(--ainh-bg);
	color: var(--ainh-ink);
	font-family: inherit;
}
.ainh-widget .tagcloud a {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--ainh-bg-softer);
	font-size: .8rem !important;
}

/* 回到顶部 */
.ainh-to-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 60;
	width: 46px;
	height: 46px;
	border: 1px solid var(--ainh-border);
	border-radius: 50%;
	background: var(--ainh-bg);
	box-shadow: var(--ainh-shadow-md);
	color: var(--ainh-ink-2);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .22s var(--ainh-ease), visibility .22s var(--ainh-ease), transform .22s var(--ainh-ease), color .18s var(--ainh-ease);
}

.ainh-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.ainh-to-top:hover { color: var(--ainh-primary); }

/* ===== 9. 正文页 ===== */
.ainh-article { min-width: 0; }

.ainh-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 16px;
	color: var(--ainh-faint);
	font-size: .82rem;
}

.ainh-breadcrumb a { color: var(--ainh-muted); font-weight: 600; }
.ainh-breadcrumb a:hover { color: var(--ainh-primary); }
.ainh-breadcrumb__sep { color: var(--ainh-border-strong); }

.ainh-article__head { margin: 0 0 22px; }

.ainh-article__title {
	margin: 10px 0 0;
	font-size: 2.05rem;
	/* 中文标题行距要比拉丁更松一点，否则两行会粘在一起 */
	line-height: 1.36;
	letter-spacing: -.018em;
}

.ainh-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 18px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid var(--ainh-border);
	color: var(--ainh-muted);
	font-size: .86rem;
}

.ainh-article__meta-item { display: inline-flex; align-items: center; gap: 6px; }
.ainh-article__meta-item svg { color: var(--ainh-faint); flex: 0 0 auto; }
.ainh-article__meta-item a { font-weight: 600; }

.ainh-article__hero {
	margin: 0 0 26px;
	overflow: hidden;
	border-radius: var(--ainh-radius);
	background: var(--ainh-bg-softer);
}

.ainh-article__hero img { width: 100%; height: auto; }

/* 正文：字号 18px、行高 1.76、一行约 41 个汉字（版心由 body.single 规则收窄）。 */
.ainh-entry {
	font-size: 1.125rem;
	line-height: 1.76;
	color: var(--ainh-ink-2);
	/* 中文正文加极轻微字距，长段落更透气；对拉丁部分几乎无感 */
	letter-spacing: .012em;
	/* 让字重在 macOS 上更接近印刷质感（Windows 无影响） */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* 首段导语：字号略大、颜色更实，形成杂志式入口。
   这一段就是插件写入的中文摘要，所以导语效果是"真内容"而不是模板拼出来的。 */
.ainh-entry > p:first-of-type {
	font-size: 1.25rem;
	line-height: 1.7;
	letter-spacing: .008em;
	color: var(--ainh-ink);
}

/* 中文长文的阅读体验：段首缩进两个字。
   只作用于正文的**直接子段落** —— 插件输出的要点列表、关键事实、为什么值得关注、
   背景与影响、信源、免责声明都是独立结构块，它们有自己的内边距，不能被缩进影响。 */
.ainh-entry > p { margin: 0 0 1.05em; text-indent: 2em; }

/* 正文里的数字用**比例数字**而不是等宽数字。
   等宽数字（tabular-nums）是为表格对齐设计的，放在连续行文里会显得机械、字距发虚；
   比例数字才符合编辑排版的观感。等宽数字保留给热度分这类需要对齐的场合（.num）。 */
.ainh-entry { font-variant-numeric: proportional-nums; }

.ainh-entry h2 { margin: 2em 0 .7em; font-size: 1.4rem; line-height: 1.45; letter-spacing: -.012em; }
.ainh-entry h3 { margin: 1.7em 0 .5em; font-size: 1.18rem; line-height: 1.5; letter-spacing: -.006em; }
.ainh-entry a { text-decoration: underline; text-decoration-color: rgba(26, 115, 232, .35); text-underline-offset: 3px; }
.ainh-entry a:hover { text-decoration-color: var(--ainh-primary); }
.ainh-entry img { margin: 1.2em auto; border-radius: var(--ainh-radius-sm); }
.ainh-entry ul,
.ainh-entry ol { padding-left: 1.5em; }
.ainh-entry li { margin: .4em 0; }
.ainh-entry blockquote {
	margin: 1.4em 0;
	padding: 4px 0 4px 16px;
	border-left: 4px solid var(--ainh-primary);
	color: var(--ainh-ink-2);
	font-size: 1.02rem;
}

.ainh-entry table { margin: 1.4em 0; font-size: .94rem; }
.ainh-entry th { background: var(--ainh-bg-soft); }

/* 标签 */
.ainh-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 30px 0 0;
}

.ainh-tags__label { color: var(--ainh-faint); font-size: .84rem; font-weight: 600; }

.ainh-tag {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid var(--ainh-border);
	border-radius: 999px;
	color: var(--ainh-muted);
	font-size: .8rem;
}

.ainh-tag:hover { border-color: var(--ainh-primary); color: var(--ainh-primary); }

/* 底部信源区 */
.ainh-sourcebox {
	margin: 34px 0 0;
	padding: 20px 22px;
	border: 1px solid var(--ainh-border);
	border-left: 4px solid var(--ainh-primary);
	border-radius: var(--ainh-radius);
	background: var(--ainh-bg-soft);
}

.ainh-sourcebox__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: .95rem;
}

.ainh-sourcebox__title svg { color: var(--ainh-primary); }

.ainh-sourcebox__row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0 0 8px;
	font-size: .9rem;
	color: var(--ainh-muted);
}

.ainh-sourcebox__row:last-child { margin-bottom: 0; }

.ainh-sourcebox__key { flex: 0 0 auto; color: var(--ainh-faint); font-weight: 600; }
.ainh-sourcebox__val { min-width: 0; color: var(--ainh-ink-2); word-break: break-word; }

.ainh-sourcebox__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-weight: 700;
}

/* 相关文章 */
.ainh-related { margin: 40px 0 0; }

.ainh-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

/* 上一篇/下一篇 */
.ainh-postnav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 34px 0 0;
}

.ainh-postnav__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius);
	background: var(--ainh-bg);
	transition: border-color .18s var(--ainh-ease), box-shadow .18s var(--ainh-ease);
}

.ainh-postnav__item:hover { border-color: var(--ainh-primary); box-shadow: var(--ainh-shadow-sm); }
.ainh-postnav__item--next { text-align: right; }
.ainh-postnav__dir { color: var(--ainh-faint); font-size: .76rem; font-weight: 700; letter-spacing: .1em; }
.ainh-postnav__title { color: var(--ainh-ink); font-size: .95rem; font-weight: 700; line-height: 1.55; }

/* ===== 10. 正文内容块：.ainh-block 设计系统 =====
   背景：本站正文以「摘要 + 提炼」为主而非全文，所以内容由若干结构化板块组成。
   这些板块需要统一的设计语言，做成"读得下去"的版面，而不是散落的彩色卡片。

   设计原则 —— 为什么不给每块铺一个高饱和底色：
     1. 饱和底色会压低正文对比度，长段落读起来累；
     2. 一页同时出现四五种强色会互相打架，结果谁都不突出；
     3. 严肃出版物的惯例是「一个主色 + 中性色」，用**标签**而不是**底色**做区分。
   所以这里：统一的块结构 + 每类一个色相的**浅底** + 醒目的**彩色标签条**。
   色相由 --blk-h 驱动，底色、标签、圆点、左侧色条全部由它推导，改一个值整块变色。 */
.ainh-block {
	position: relative;
	margin: 0 0 24px;
	padding: 18px 22px 18px 24px;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius);
	/* 左侧色条：板块归属的第一眼线索 */
	border-left: 4px solid hsl(calc(var(--blk-h, 214) * 1deg), 62%, 52%);
	background: hsl(calc(var(--blk-h, 214) * 1deg), 68%, 97.5%);
}

/* 板块标签：识别功能交给它承担，底色就可以保持克制 */
.ainh-block__label {
	display: inline-flex;
	align-items: center;
	margin: 0 0 12px;
	padding: 3px 10px;
	border-radius: 999px;
	background: hsl(calc(var(--blk-h, 214) * 1deg), 72%, 94%);
	color: hsl(calc(var(--blk-h, 214) * 1deg), 62%, 34%);
	font-size: .78rem;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: .06em;
}

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

.ainh-block__list li {
	position: relative;
	margin: 8px 0;
	padding-left: 20px;
	color: var(--ainh-ink-2);
	font-size: 1rem;
	line-height: 1.75;
}

.ainh-block__list li::before {
	content: "";
	position: absolute;
	top: .66em;
	left: 2px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: hsl(calc(var(--blk-h, 214) * 1deg), 62%, 52%);
	box-shadow: 0 0 0 3px hsl(calc(var(--blk-h, 214) * 1deg), 68%, 93%);
}

/* 块内段落与正文一样段首缩进两字。
   之前这里是 text-indent: 0，理由是"块内文字短" —— 但那是错的：
   中文段落不缩进就会显得像机器拼出来的版面，「为什么值得关注」「背景与影响」
   这类成段文字尤其明显。列表（速览 / 关键事实）用的是 ul，不受影响。 */
.ainh-block p {
	margin: 0;
	color: var(--ainh-ink-2);
	font-size: 1.02rem;
	line-height: 1.8;
	text-indent: 2em;
}

/* —— 四类板块各分配一个色相 ——
   速览      品牌蓝：与全站主色一致，作为第一块最自然
   关键事实   青色：与数字/数据的气质相符，且和蓝区分得开
   为什么值得关注 琥珀：全站唯一的暖色，用在"观点"上最合适
   背景与影响  紫罗兰：中性偏冷的收尾色，与前面的蓝、青不冲突 */
.ainh-block--takeaways  { --blk-h: 214; }
.ainh-block--facts      { --blk-h: 188; }
.ainh-block--why        { --blk-h: 36; }
.ainh-block--background { --blk-h: 266; }

/* 「为什么值得关注」是观点，底色再暖一点、字色更深，读起来像编者按 */
.ainh-entry .ainh-block--why p { color: #5c4813; }

/* 信源块是元信息而非内容，刻意做轻，不与正文板块抢注意力 */
.ainh-entry .ainh-source {
	margin: 34px 0 0;
	padding: 18px 20px;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius);
	background: var(--ainh-bg-soft);
	color: var(--ainh-muted);
	font-size: .92rem;
}

.ainh-entry .ainh-source p { margin: 6px 0; line-height: 1.7; text-indent: 0; }
.ainh-entry .ainh-source strong { color: var(--ainh-ink-2); }
.ainh-entry .ainh-source em { color: var(--ainh-ink-2); font-style: normal; font-weight: 600; }
.ainh-entry .ainh-source a { font-weight: 700; text-decoration: none; }

.ainh-entry .ainh-disclaimer {
	margin: 22px 0 0;
	padding: 12px 0 0;
	border-top: 1px dashed var(--ainh-border);
	/* 老文章里还带着插件早期写入的内联 font-size/color，行内样式优先级高于普通选择器，
	   加 !important 把它们拉回主题配色。新文章已不再写内联样式。 */
	font-size: .82rem !important;
	color: var(--ainh-faint) !important;
	line-height: 1.7;
	text-indent: 0;
}

/* 插件（AdSense 等）自动注入的图片 / iframe 不要溢出正文 */
.ainh-entry iframe { max-width: 100%; }

/* ===== 11. 广告位 =====
   插件的 ad_unit() 已经写了内联 min-height（header/footer 100px、inarticle 280px、sidebar 600px）。
   这里只做「容器级」的观感修饰，绝不覆写 min-height —— 一旦把预留高度改小，
   广告脚本回填时整页内容会被推下去，形成明显的 CLS，SEO 和广告收入一起受损。 */
.ainh-ad {
	position: relative;
	display: block;
	margin: 26px 0;
	overflow: hidden;
	text-align: center;
}

.ainh-ad--header { margin: 0 0 26px; }
.ainh-ad--sidebar { margin: 0; }
.ainh-ad--footer { margin: 34px 0 0; }

.ainh-ad::before {
	content: "广告";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	color: var(--ainh-faint);
	font-size: .68rem;
	letter-spacing: .18em;
	opacity: .75;
}

/* 广告未填充（ad_unit 返回空）时不留下无意义的空白。 */
.ainh-ad:empty { display: none; }

/* ===== 12. 页脚 / 404 / 页面 / 评论 ===== */
.ainh-footer {
	margin-top: 20px;
	border-top: 1px solid var(--ainh-border);
	background: var(--ainh-bg-soft);
}

.ainh-footer__grid {
	display: grid;
	/* 三列等宽 + 内容居中。
	   原来用 1.3fr/1fr/1fr 且文字左对齐，右列内容缩在它自己的左半边，
	   整块页脚看起来"贴在页面左边"。改为等宽并把内容居中后，版面才是平衡的。 */
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	padding: 44px 0 12px;
	justify-items: center;
	text-align: center;
}

.ainh-footer__title {
	margin: 0 0 14px;
	font-size: .95rem;
	letter-spacing: .04em;
}

.ainh-footer__about { margin: 12px auto 0; max-width: 26em; color: var(--ainh-muted); font-size: .9rem; line-height: 1.8; }

/* 页脚品牌块：把站名做成一块有分量的「色块」，而不是一行裸文字。
   logo 放在白色圆角底上，是为了让蓝色渐变标记在深色卡面上能跳出来。 */
.ainh-brandcard {
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 320px;
	margin: 0 auto 14px;
	padding: 26px 22px 30px;
	border-radius: var(--ainh-radius-lg);
	background: linear-gradient(142deg, #2f6bff 0%, #1b2a5e 100%);
	color: #fff;
	text-align: center;
	box-shadow: 0 12px 30px rgba(22, 35, 77, .2);
}

.ainh-brandcard__glow {
	position: absolute;
	top: -48%;
	right: -24%;
	width: 80%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0));
	pointer-events: none;
}

.ainh-brandcard__mark {
	position: relative;
	display: inline-flex;
	margin-bottom: 12px;
	padding: 4px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}

.ainh-brandcard__name {
	position: relative;
	display: block;
	font-size: 1.34rem;
	font-weight: 800;
	letter-spacing: -.022em;
}

.ainh-brandcard__name-latin { color: #a9c8ff; }

.ainh-brandcard__tagline {
	position: relative;
	display: block;
	margin-top: 7px;
	color: rgba(255, 255, 255, .84);
	font-size: .8rem;
	line-height: 1.6;
	letter-spacing: .03em;
}

.ainh-brandcard__wave {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	display: block;
	color: #fff;
}

.ainh-brandcard__wave svg { display: block; width: 100%; height: 40px; }

.ainh-footer__list { margin: 0; padding: 0; list-style: none; }
.ainh-footer__list li { padding: 5px 0; font-size: .9rem; }
.ainh-footer__list a { color: var(--ainh-muted); font-weight: 600; }
.ainh-footer__list a:hover { color: var(--ainh-primary); }

.ainh-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	/* 版权行居中，与上方居中的三列对齐。 */
	justify-content: center;
	gap: 10px;
	margin-top: 26px;
	padding: 18px 0 26px;
	border-top: 1px solid var(--ainh-border);
	color: var(--ainh-muted);
	font-size: .84rem;
	text-align: center;
}

.ainh-footer__bottom p { margin: 0; }

/* 单页 / 404 */
.ainh-page__title { margin: 0 0 20px; font-size: 2rem; }

.ainh-404 { padding: 60px 0 80px; text-align: center; }
.ainh-404__code {
	margin: 0;
	font-family: var(--ainh-font-num);
	font-size: 5rem;
	font-weight: 700;
	line-height: 1;
	background: linear-gradient(135deg, var(--ainh-primary) 0%, var(--ainh-ink) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.ainh-404__title { margin: 18px 0 10px; font-size: 1.5rem; }
.ainh-404__text { max-width: 40em; margin: 0 auto 24px; color: var(--ainh-muted); }
.ainh-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* 搜索结果条目 */
.ainh-result {
	padding: 18px 0;
	border-bottom: 1px solid var(--ainh-border);
}
.ainh-result__title { margin: 0 0 6px; font-size: 1.12rem; }
.ainh-result__title a { color: var(--ainh-ink); }
.ainh-result__title a:hover { color: var(--ainh-primary); }
.ainh-result__excerpt { margin: 0 0 8px; color: var(--ainh-muted); font-size: .94rem; line-height: 1.8; }

/* 评论（极简） */
.ainh-comments { margin: 44px 0 0; padding: 22px 24px; border: 1px solid var(--ainh-border); border-radius: var(--ainh-radius); background: var(--ainh-bg-soft); }
.ainh-comments__title { margin: 0 0 16px; font-size: 1.05rem; }
.ainh-comments .comment-list { margin: 0; padding: 0; list-style: none; }
.ainh-comments .comment-list .children { margin: 0; padding: 0 0 0 20px; list-style: none; }
.ainh-comments .comment-body {
	margin: 0 0 14px;
	padding: 14px 16px;
	border: 1px solid var(--ainh-border);
	border-radius: var(--ainh-radius-sm);
	background: var(--ainh-bg);
	font-size: .94rem;
}
.ainh-comments .comment-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; color: var(--ainh-faint); font-size: .8rem; }
.ainh-comments .comment-author { font-weight: 700; color: var(--ainh-ink-2); }
.ainh-comments .reply a { font-size: .82rem; font-weight: 700; }
.ainh-comments .comment-respond { margin-top: 22px; }
.ainh-comments input[type="text"],
.ainh-comments input[type="email"],
.ainh-comments input[type="url"],
.ainh-comments textarea {
	width: 100%;
	padding: 10px 13px;
	border: 1px solid var(--ainh-border-strong);
	border-radius: var(--ainh-radius-sm);
	background: var(--ainh-bg);
	color: var(--ainh-ink);
	font-family: inherit;
	font-size: .95rem;
}
.ainh-comments .form-submit { margin: 14px 0 0; }
.ainh-comments .comment-notes,
.ainh-comments .logged-in-as { color: var(--ainh-faint); font-size: .82rem; }
.ainh-comments .comment-reply-title { font-size: 1.05rem; font-weight: 700; }

/* 对齐类（WordPress 默认输出） */
.alignleft { float: left; margin: 0 1.2em .8em 0; }
.alignright { float: right; margin: 0 0 .8em 1.2em; }
.aligncenter { display: block; margin: 0 auto 1em; }
.alignwide { margin-left: -24px; margin-right: -24px; max-width: none; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: none; width: 100vw; }
.wp-caption-text,
.wp-block-image figcaption { margin-top: 8px; color: var(--ainh-faint); font-size: .82rem; text-align: center; }
.sticky .ainh-card__title::after { content: "置顶"; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--ainh-primary-soft); color: var(--ainh-primary-dark); font-size: .7rem; vertical-align: middle; }

/* ===== 13. 深色模式 =====
   只换令牌，不改任何组件规则 —— 深色下背景用 #0b1b33 系，
   避免纯黑（#000）在 OLED 上边缘发死、也不利于长时间阅读。 */
@media (prefers-color-scheme: dark) {
	:root {
		--ainh-primary: #6aa9f8;
		--ainh-primary-dark: #8cc0ff;
		--ainh-primary-soft: #172c4a;
		--ainh-ink: #eef4ff;
		--ainh-ink-2: #ccd9ec;
		--ainh-muted: #9aabc4;
		--ainh-faint: #7c8ca6;
		--ainh-bg: #0b1b33;
		--ainh-bg-soft: #102544;
		--ainh-bg-softer: #16305a;
		--ainh-border: #1d3557;
		--ainh-border-strong: #2b4a75;
		--ainh-accent-warm-soft: #2c2510;
		--ainh-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
		--ainh-shadow-md: 0 4px 16px rgba(0, 0, 0, .45);
		--ainh-shadow-lg: 0 14px 34px rgba(0, 0, 0, .55);
	}

	body { background: var(--ainh-bg); }

	.ainh-score--hot { background: #3a1a17; border-color: #6b2a24; color: #ff9d94; }
	.ainh-score--warm { background: #362a10; border-color: #5f4a1e; color: #f3c268; }
	.ainh-score--cool { background: #172c4a; border-color: #26507f; color: #8cc0ff; }

	.ainh-rank__item:nth-child(1) .ainh-rank__no { background: #b3261e; }
	.ainh-rank__item:nth-child(2) .ainh-rank__no { background: #b25a08; }
	.ainh-rank__item:nth-child(3) .ainh-rank__no { background: #a37a10; }

	.ainh-entry .ainh-why { border-color: #5f4a1e; color: #f0dfae; }
	.ainh-entry .ainh-why strong { color: #f3c268; }

	.skip-link { background: #2b6fd0; color: #fff; }

	.ainh-search__submit,
	.ainh-btn { background: #2b6fd0; color: #fff; }
	.ainh-search__submit:hover,
	.ainh-btn:hover { background: #3a82e8; }

	.ainh-pagination .page-numbers.current { border-color: #2b6fd0; background: #2b6fd0; }

	.ainh-404__code { background: linear-gradient(135deg, #6aa9f8 0%, #b9d4ff 100%); -webkit-background-clip: text; background-clip: text; }
}

/* ===== 14. 响应式 ===== */
@media (max-width: 1024px) {
	:root { --ainh-gap: 22px; }

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

	/* 1024 以下侧栏下移，并取消 sticky（横向空间不足时吸顶会遮内容）。 */
	.ainh-sidebar { position: static; }

	.ainh-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.ainh-hero__card { grid-template-columns: minmax(0, 1fr); }
	.ainh-hero__media { aspect-ratio: 16 / 9; }
	.ainh-hero__body { padding: 24px 24px 22px; }
	.ainh-hero__title { font-size: 1.5rem; }

	.ainh-article__title { font-size: 1.75rem; }

	.ainh-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.ainh-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.ainh-menu-toggle { display: inline-flex; }

	/* 移动端菜单：默认收起，点击后展开为竖排，纯 CSS + 一行 JS 切换 class。 */
	.ainh-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		padding: 10px 20px 16px;
		border-bottom: 1px solid var(--ainh-border);
		background: var(--ainh-bg);
		box-shadow: var(--ainh-shadow-md);
	}

	.ainh-nav.is-open { display: block; }

	.ainh-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.ainh-nav__list a { padding: 12px 10px; border-bottom: 1px solid var(--ainh-border); border-radius: 0; }
	.ainh-nav__list li:last-child a { border-bottom: 0; }
}

@media (max-width: 768px) {
	body { font-size: 15.5px; }

	.ainh-wrap { padding: 0 16px; }

	.ainh-main { padding: 22px 0 40px; }

	.ainh-brand__tagline { display: none; }

	.ainh-header__top { min-height: 60px; gap: 10px; }

	/* 移动端单列：列表卡片也变成上图下文，缩略图占满宽度更省纵向空间。 */
	.ainh-card--list { flex-direction: column; }
	.ainh-card--list .ainh-card__media { flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; }
	.ainh-card--list .ainh-card__body { padding: 14px 16px 14px; }
	.ainh-card--list .ainh-card__title { font-size: 1.04rem; }

	.ainh-secondary { grid-template-columns: minmax(0, 1fr); gap: 16px; }

	.ainh-hero__media { aspect-ratio: 16 / 9; }
	.ainh-hero__title { font-size: 1.32rem; }

	.ainh-article__title { font-size: 1.45rem; }
	.ainh-entry { font-size: 1.02rem; }
	.ainh-entry .ainh-takeaways { padding: 16px 18px 16px 40px; }

	.ainh-related__grid,
	.ainh-postnav,
	.ainh-footer__grid { grid-template-columns: minmax(0, 1fr); }

	.ainh-postnav__item--next { text-align: left; }

	.ainh-section { margin-bottom: 26px; }

	.ainh-archive-head { padding: 18px 18px; }
}

@media (max-width: 480px) {
	.ainh-wrap { padding: 0 14px; }

	.ainh-header__actions { gap: 6px; }
	.ainh-icon-btn { width: 38px; height: 38px; }

	.ainh-hero__body { padding: 18px 18px 18px; gap: 11px; }
	.ainh-hero__title { font-size: 1.2rem; }
	.ainh-hero__excerpt { font-size: .92rem; }

	.ainh-article__title { font-size: 1.3rem; }
	.ainh-article__meta { font-size: .8rem; gap: 8px; }

	.ainh-card__body { padding: 13px 14px; }

	.ainh-to-top { right: 14px; bottom: 14px; }

	.ainh-pagination .page-numbers { min-width: 38px; height: 38px; }

	.ainh-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* 减少动效偏好：关掉所有过渡与位移，前庭敏感用户友好。 */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.ainh-card:hover,
	.ainh-hero__card:hover { transform: none; }
}

/* 打印：去掉导航、广告、侧栏，只留正文。 */
@media print {
	.ainh-header,
	.ainh-sidebar,
	.ainh-ad,
	.ainh-footer,
	.ainh-to-top,
	.ainh-related,
	.skip-link { display: none !important; }
	.ainh-layout { grid-template-columns: minmax(0, 1fr); }
	body { color: #000; background: #fff; }
}
