/*
Theme Name: 青简
Theme URI: https://www.wuziren.cn/
Author: 物资人
Author URI: https://www.wuziren.cn/
Description: 轻量级专业资料型主题。零外部依赖、无框架、无 jQuery，为长文档阅读与专业资料站设计。
Version: 1.1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qingjian
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images
*/

/* ===== 变量 ===== */
:root {
  --ink: #1a1f26;
  --ink-2: #3d4650;
  --gray: #667085;
  --gray-light: #98a2b3;

  --blue: #16537e;
  --blue-dark: #0b2f4b;
  --blue-light: #1d6fa5;
  --blue-tint: #eef4fa;

  --teal: #0f766e;
  --violet: #6d28d9;
  --amber: #b45309;
  --rose: #be123c;
  --green: #15803d;
  --accent: #c2410c;

  --line: #e4e8ee;
  --line-soft: #eef1f5;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-page: #f2f5f9;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 70, .05);
  --shadow: 0 2px 10px rgba(16, 40, 70, .07);
  --shadow-lg: 0 12px 32px rgba(16, 40, 70, .12);

  --wrap: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ===== 基础 ===== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--blue); text-decoration: none; transition: color .16s ease; }
a:hover { color: var(--blue-light); }

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

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

/* 无障碍 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
}
.skip-link:focus { left: 8px; top: 8px; }

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

/* ===== 布局容器 ===== */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.site-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 32px;
  padding: 32px 0 60px;
  align-items: start;
}

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

/* ===== 顶部 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}
/* 顶部品牌色条 */
.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue) 38%, var(--blue-light) 66%, var(--teal) 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
}

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

.site-logo,
.custom-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}
.site-branding .custom-logo-link { display: block; line-height: 0; }

.site-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
}
.site-title a { color: var(--ink); }
.site-title a:hover { color: var(--blue); }

.site-description {
  margin: 3px 0 0;
  color: var(--gray);
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: .02em;
}

/* 导航 */
.main-nav { display: flex; align-items: center; min-width: 0; }
.main-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a {
  position: relative;
  display: block;
  padding: 9px 13px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  transition: color .16s, background .16s;
}
.main-nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.main-nav > ul > li:hover > a::after,
.main-nav > ul > li.current-menu-item > a::after,
.main-nav > ul > li.current_page_item > a::after { transform: scaleX(1); }

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--blue); }

/* 下拉子菜单 */
.main-nav ul ul {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 184px;
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.main-nav li:hover > ul { display: flex; }
.main-nav ul ul a { padding: 8px 12px; font-size: 14px; border-radius: 5px; }
.main-nav ul ul a:hover { background: var(--bg-soft); }
.main-nav ul ul a::after { display: none; }

/* 搜索 */
.header-search { flex-shrink: 0; }
.header-search form { display: flex; align-items: center; gap: 0; position: relative; }
.header-search input[type="search"] {
  width: 208px;
  padding: 9px 40px 9px 34px;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  outline: none;
  transition: border-color .16s, background .16s, width .2s;
}
.header-search input[type="search"]:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 83, 126, .1);
}
.header-search form::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 15px;
  height: 15px;
  margin-top: -7px;
  background: no-repeat center/contain
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E");
  pointer-events: none;
}
.header-search form button,
.header-search button[type="submit"] {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  min-width: 0;
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background: var(--blue);
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  transition: background .16s;
}
.header-search button::after {
  content: "";
  display: block;
  width: 13px; height: 13px;
  margin: 0 auto;
  background: no-repeat center/contain
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='4' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='13 6 19 12 13 18'/%3E%3C/svg%3E");
}
.header-search form button:hover,
.header-search button[type="submit"]:hover { background: var(--blue-dark); }
/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; margin: 0 auto; }

/* ===== 首页主视觉 ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 46px 0 40px;
  background: linear-gradient(118deg, #0a2b45 0%, #12476b 42%, #16537e 68%, #1b6d8f 100%);
  color: #fff;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 420px; height: 420px;
  right: -110px; top: -190px;
  background: radial-gradient(circle, rgba(56, 189, 174, .30), transparent 65%);
}
.hero::after {
  width: 340px; height: 340px;
  left: -90px; bottom: -180px;
  background: radial-gradient(circle, rgba(29, 111, 165, .45), transparent 68%);
}
.hero-inner { position: relative; z-index: 1; }

.hero-title {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: #fff;
}
.hero-sub {
  margin: 0 0 24px;
  max-width: 620px;
  font-size: 15.5px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .78);
}

/* 主视觉搜索框 */
.hero-search { display: flex; gap: 10px; max-width: 620px; }
.hero-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 14px 20px;
  font-size: 15.5px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 10px;
  outline: none;
  box-shadow: 0 8px 24px rgba(3, 20, 35, .22);
}
.hero-search button {
  flex-shrink: 0;
  padding: 0 30px;
  font-size: 15.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #d4551a, #c2410c);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(194, 65, 12, .38);
  transition: transform .16s, box-shadow .16s;
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(194, 65, 12, .46); }

/* 主视觉统计 */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.hero-stats li { display: flex; align-items: baseline; gap: 8px; }
.hero-stats .num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hero-stats .lbl { font-size: 13px; color: rgba(255, 255, 255, .62); letter-spacing: .04em; }

/* 主视觉热门入口 */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
}
.hero-tags .t-label {
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
  margin-right: 2px;
}
.hero-tags a {
  padding: 5px 13px;
  font-size: 13px;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px;
  transition: background .16s, border-color .16s;
}
.hero-tags a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .2);
  border-color: rgba(255, 255, 255, .32);
}

/* ===== 分类卡片区 ===== */
.cat-section { margin-bottom: 34px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  position: relative;
  margin: 0;
  padding-left: 14px;
  font-size: 20px;
  font-weight: 700;
}
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 18px;
  margin-top: -9px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--blue-light), var(--blue));
}
.section-head .more { font-size: 13.5px; color: var(--gray); }
.section-head .more:hover { color: var(--blue); }

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

.cat-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 16px 16px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: #cbd7e4;
  box-shadow: var(--shadow-lg);
}
.cat-card .cat-ico {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  border-radius: 11px;
  letter-spacing: .02em;
  line-height: 1;
}
.cat-card .cat-body { min-width: 0; }
.cat-card .cat-name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .16s;
}
.cat-card:hover .cat-name { color: var(--blue); }
.cat-card .cat-count { font-size: 12.5px; color: var(--gray-light); }

/* 分类色彩轮换 */
.cat-grid > *:nth-child(6n+1) .cat-ico { background: linear-gradient(135deg, #1d6fa5, #16537e); }
.cat-grid > *:nth-child(6n+2) .cat-ico { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.cat-grid > *:nth-child(6n+3) .cat-ico { background: linear-gradient(135deg, #f59e0b, #b45309); }
.cat-grid > *:nth-child(6n+4) .cat-ico { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.cat-grid > *:nth-child(6n+5) .cat-ico { background: linear-gradient(135deg, #f43f5e, #be123c); }
.cat-grid > *:nth-child(6n+6) .cat-ico { background: linear-gradient(135deg, #22c55e, #15803d); }

/* ===== 页面标题 ===== */
.page-head {
  position: relative;
  margin-bottom: 20px;
  padding: 22px 24px;
  background: linear-gradient(120deg, #ffffff, #f7fafd);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.page-head::before {
  content: "";
  position: absolute;
  left: 0; top: 16px; bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--blue-light), var(--blue));
}
.page-head h1 { margin: 0 0 6px; font-size: 25px; letter-spacing: -.015em; }
.page-head p { margin: 0; color: var(--gray); font-size: 14px; }
.page-head .head-count { color: var(--blue); font-weight: 600; }

/* ===== 文章列表 ===== */
.post-list {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  position: relative;
  padding: 22px 24px 22px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue-light), var(--blue));
  opacity: .85;
  transition: width .18s ease;
}
.post-list > .post-item:nth-child(6n+2)::before { background: linear-gradient(180deg, #14b8a6, #0f766e); }
.post-list > .post-item:nth-child(6n+3)::before { background: linear-gradient(180deg, #f59e0b, #b45309); }
.post-list > .post-item:nth-child(6n+4)::before { background: linear-gradient(180deg, #8b5cf6, #6d28d9); }
.post-list > .post-item:nth-child(6n+5)::before { background: linear-gradient(180deg, #f43f5e, #be123c); }
.post-list > .post-item:nth-child(6n+6)::before { background: linear-gradient(180deg, #22c55e, #15803d); }

.post-item:hover {
  transform: translateY(-2px);
  border-color: #ccd9e6;
  box-shadow: var(--shadow-lg);
}

.post-item .entry-title {
  margin: 0 0 9px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
}
.post-item .entry-title a { color: var(--ink); }
.post-item .entry-title a:hover { color: var(--blue); }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 9px;
  color: var(--gray-light);
  font-size: 12.5px;
}
.entry-meta .meta-cat a {
  display: inline-block;
  padding: 2px 9px;
  color: var(--blue);
  background: var(--blue-tint);
  border-radius: 20px;
  font-size: 12px;
}
.entry-meta .meta-cat a:hover { background: #e2eef8; }
.entry-meta .meta-date { position: relative; padding-left: 15px; }
.entry-meta .meta-date::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 10px; height: 10px;
  margin-top: -5px;
  background: no-repeat center/contain
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

.entry-summary {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.82;
}
.entry-summary p { margin: 0; }

/* ===== 分页 ===== */
.pagination { margin-top: 28px; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pagination li { margin: 0; }
.pagination a,
.pagination span {
  display: inline-block;
  min-width: 38px;
  padding: 8px 13px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.pagination a:hover { color: var(--blue); border-color: var(--blue); }
.pagination .current span,
.pagination .current {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(22, 83, 126, .28);
}

/* ===== 正文页 ===== */
.article-card {
  padding: 32px 34px 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.single-head { margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.single-head h1 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.42;
  letter-spacing: -.018em;
}
.single-head .entry-meta { margin-bottom: 0; }
.entry-meta-extra { margin-bottom: 0; padding-top: 2px; color: var(--gray); }
.entry-meta-extra span { position: relative; }
.entry-meta-extra span + span::before {
  content: "·";
  margin-right: 12px;
  color: var(--line);
}

/* 面包屑 */
.breadcrumb {
  margin-bottom: 14px;
  color: var(--gray-light);
  font-size: 13px;
  line-height: 1.6;
}
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span.sep { margin: 0 7px; color: #cfd6df; }

/* 正文排版 */
.entry-content {
  font-size: 17px;
  line-height: 1.95;
  color: var(--ink);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.2em; }

.entry-content h2 {
  position: relative;
  margin: 2.2em 0 .9em;
  padding: 0 0 10px 15px;
  font-size: 22px;
  border-left: 4px solid var(--blue);
  background: linear-gradient(90deg, var(--blue-tint), transparent 72%);
  border-radius: 0 3px 3px 0;
  line-height: 1.45;
}
.entry-content h3 {
  margin: 1.7em 0 .7em;
  padding-left: 12px;
  font-size: 19px;
  border-left: 3px solid #cbd9e6;
}
.entry-content h4 { margin: 1.5em 0 .6em; font-size: 17px; }
.entry-content ul,
.entry-content ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.entry-content li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--blue-light); }

.entry-content blockquote {
  margin: 1.5em 0;
  padding: 16px 22px;
  color: var(--ink-2);
  background: var(--bg-soft);
  border-left: 3px solid var(--blue-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption {
  margin-top: 8px;
  color: var(--gray-light);
  font-size: 13px;
  text-align: center;
}
.entry-content p a,
.entry-content li a,
.entry-content blockquote a { text-decoration: underline; text-underline-offset: 2px; }

/* 正文标题锚点提示 */
.entry-content h2[id]:hover::after,
.entry-content h3[id]:hover::after { content: "§"; margin-left: 10px; color: var(--line); font-weight: 400; }

/* 正文中的 fieldset 标题框 */
.entry-content fieldset {
  margin: 1.6em 0;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.entry-content legend { padding: 0 8px; font-size: 16px; font-weight: 600; }

/* 分页文章 */
.page-links { margin: 1.6em 0; font-size: 14px; }
.page-links a,
.page-links > span {
  display: inline-block;
  min-width: 32px;
  margin-right: 4px;
  padding: 4px 9px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.page-links > span { color: #fff; background: var(--blue); border-color: var(--blue); }

/* 搜索结果页的再次搜索框 */
.search-again { margin: 18px 0 8px; }
.search-again .search-form { display: flex; gap: 8px; }
.search-again input[type="search"] {
  flex: 1;
  padding: 11px 15px;
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
.search-again input[type="search"]:focus { border-color: var(--blue); }
.search-again button {
  padding: 11px 22px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

/* ===== 微信商城（wechat-shop）付费区块兼容 ===== */
.entry-content .wshop-pay-button a,
.entry-content .wshop-pay-button button,
.entry-content [class*="wshop-"] a,
.entry-content [class*="xh-"] a {
  text-decoration: none;
}
.entry-content .wshop-pay-button table,
.entry-content [class*="wshop-"] table {
  border: 0;
  margin: 0;
  font-size: inherit;
  box-shadow: none;
}
.entry-content .wshop-pay-button th,
.entry-content .wshop-pay-button td,
.entry-content [class*="wshop-"] th,
.entry-content [class*="wshop-"] td {
  border: 0;
  padding: 0;
  background: none;
}
.entry-content .wshop-pay-button img,
.entry-content [class*="wshop-"] img { border-radius: 0; }

/* 表格：适配长文档 */
.entry-content table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  line-height: 1.72;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.entry-content th,
.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.entry-content th:last-child,
.entry-content td:last-child { border-right: 0; }
.entry-content tbody tr:last-child td { border-bottom: 0; }
.entry-content thead th {
  background: linear-gradient(180deg, #f2f6fa, #e9eff6);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.entry-content tbody tr:nth-child(even) { background: #fafbfd; }
.entry-content tbody tr:hover { background: var(--blue-tint); }

/* 表格横向滚动容器 */
.table-scroll { overflow-x: auto; margin: 1.5em 0; -webkit-overflow-scrolling: touch; }
.table-scroll table { margin: 0; min-width: 560px; }

/* 代码 */
.entry-content pre {
  margin: 1.4em 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  background: #f6f8fa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.entry-content code {
  padding: 2px 6px;
  font-size: .9em;
  background: #f2f4f6;
  border-radius: 4px;
  color: #b3306b;
}
.entry-content pre code { padding: 0; background: none; color: inherit; }

/* 正文页脚 */
.entry-footer {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.entry-tags { margin-bottom: 20px; font-size: 13.5px; color: var(--gray); }
.entry-tags a {
  display: inline-block;
  margin: 0 5px 6px 0;
  padding: 4px 12px;
  color: var(--gray);
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  transition: all .16s;
}
.entry-tags a:hover { color: var(--blue); background: var(--blue-tint); border-color: #cfe0ee; }

/* 上下篇 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}
.post-nav a {
  display: block;
  padding: 15px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: all .18s;
}
.post-nav a:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow);
}
.post-nav .nav-label {
  display: block;
  color: var(--gray-light);
  font-size: 12px;
  margin-bottom: 5px;
  letter-spacing: .04em;
}
.post-nav .next { text-align: right; }

/* 相关文章 */
.related-posts {
  margin-top: 20px;
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.related-posts h2 {
  position: relative;
  margin: 0 0 8px;
  padding-left: 13px;
  font-size: 17px;
}
.related-posts h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 16px;
  margin-top: -8px;
  border-radius: 3px;
  background: var(--blue);
}
.related-posts ul { margin: 0; padding: 0; list-style: none; }
.related-posts li {
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}
.related-posts li:last-child { border-bottom: 0; }
.related-posts li a { color: var(--ink-2); }
.related-posts li a:hover { color: var(--blue); }
.related-posts li span { color: var(--gray-light); font-size: 12.5px; margin-left: 8px; }

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

.widget {
  margin-bottom: 18px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.widget-title {
  position: relative;
  margin: 0 0 14px;
  padding-left: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}
.widget-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 15px;
  margin-top: -7.5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--blue-light), var(--blue));
}
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li {
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px dashed var(--line-soft);
}
.widget li:last-child { border-bottom: 0; }
.widget li a { color: var(--ink-2); }
.widget li a:hover { color: var(--blue); }
.widget .count { color: var(--gray-light); font-size: 12.5px; }

.widget_categories li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 8px;
}
.widget_categories li > ul {
  flex: 0 0 100%;
  margin: 4px 0 2px;
  padding-left: 12px;
  border-left: 1px solid var(--line-soft);
}
.widget_categories li > ul li {
  padding: 4px 0;
  border-bottom: 0;
  font-size: 13px;
}
.widget_categories li > ul li a { color: var(--gray); }
.widget_categories li > ul li a:hover { color: var(--blue); }
.widget_categories li > ul .count {
  padding: 0;
  background: none;
  font-size: 11.5px;
}
.widget_categories li .count {
  padding: 1px 8px;
  background: var(--bg-soft);
  border-radius: 20px;
  color: var(--gray);
  font-size: 11.5px;
}
.widget_recent_entries li a { display: block; }

/* 侧栏引导卡 */
.side-cta {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 22px 22px 20px;
  background: linear-gradient(135deg, #0d3f60, #17567f 55%, #1d6fa5);
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: var(--shadow);
}
.side-cta::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 174, .35), transparent 68%);
}
.side-cta h3 { margin: 0 0 8px; font-size: 16px; color: #fff; }
.side-cta p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.7; color: rgba(255, 255, 255, .75); }
.side-cta a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0d3f60;
  background: #fff;
  border-radius: 8px;
}
.side-cta a:hover { background: #eaf3fa; color: var(--blue-dark); }

/* ===== 页面 ===== */
.page-content .entry-content { font-size: 16.5px; }

/* ===== 评论 ===== */
.comments-area {
  margin-top: 22px;
  padding: 26px 30px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.comments-title, .comment-reply-title { font-size: 18px; margin: 0 0 20px; }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-list .children { margin: 0; padding-left: 26px; list-style: none; }
.comment-body {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-meta img { border-radius: 50%; }
.comment-author { font-weight: 600; color: var(--ink); }
.comment-metadata { color: var(--gray-light); font-size: 12.5px; }
.comment-content { color: var(--ink-2); }
.reply a { font-size: 13px; }
.comment-form { margin-top: 24px; }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--ink-2); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 83, 126, .09);
}
.comment-form .submit,
button[type="submit"],
input[type="submit"] {
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 83, 126, .24);
  transition: transform .16s, box-shadow .16s;
}
.comment-form .submit:hover,
button[type="submit"]:hover,
input[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(22, 83, 126, .32); }

/* ===== 空结果 ===== */
.no-results {
  padding: 44px 30px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--gray);
}
.no-results h2 { font-size: 19px; color: var(--ink); margin-top: 0; }

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  margin-top: 10px;
  padding: 44px 0 26px;
  background: linear-gradient(160deg, #0b2b44 0%, #0d3350 55%, #102c45 100%);
  color: rgba(255, 255, 255, .62);
  font-size: 13.5px;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-light), var(--teal) 50%, #1d6fa5);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-brand .f-name {
  display: block;
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.footer-brand p { margin: 0 0 8px; line-height: 1.8; color: rgba(255, 255, 255, .58); }
.footer-col h4 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .04em;
}
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 9px; line-height: 1.6; }
.footer-col a { color: rgba(255, 255, 255, .62); }
.footer-col a:hover { color: #fff; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  color: rgba(255, 255, 255, .45);
  font-size: 13px;
}
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: rgba(255, 255, 255, .55); }
.footer-nav a:hover { color: #fff; }

/* ===== 返回顶部 ===== */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  color: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(13, 51, 80, .3);
  cursor: pointer;
  z-index: 50;
  transition: transform .16s;
}
.to-top:hover { transform: translateY(-2px); }
.to-top.show { display: flex; }

/* ===== WordPress 区块对齐 ===== */
.alignwide { max-width: 900px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100vw; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--gray-light); font-size: 13px; text-align: center; }

/* ===== 响应式 ===== */
@media (max-width: 1080px) {
  .hero-title { font-size: 30px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .site-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sidebar { position: static; }
  .header-search input[type="search"] { width: 150px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
}

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

  .header-inner { min-height: 62px; }
  .site-title { font-size: 19px; }
  .site-description { display: none; }

  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 10px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(15, 30, 50, .1);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .main-nav > ul > li > a::after { display: none; }
  .main-nav ul ul {
    position: static;
    display: flex;
    padding-left: 14px;
    border: 0;
    box-shadow: none;
  }

  .header-search { display: none; }

  .hero { padding: 32px 0 28px; }
  .hero-title { font-size: 23px; }
  .hero-sub { font-size: 14px; margin-bottom: 18px; }
  .hero-search { flex-direction: column; gap: 8px; }
  .hero-search input[type="search"] { padding: 12px 16px; }
  .hero-search button { padding: 12px 20px; }
  .hero-stats { gap: 12px 24px; margin-top: 20px; }
  .hero-stats .num { font-size: 21px; }
  .hero-tags { margin-top: 18px; }

  .site-layout { padding: 22px 0 40px; }

  .cat-grid { grid-template-columns: 1fr; gap: 10px; }
  .cat-card { padding: 13px 14px; }
  .cat-card .cat-ico { width: 36px; height: 36px; font-size: 15px; }

  .page-head { padding: 18px 18px; }
  .page-head h1 { font-size: 20px; }

  .post-item { padding: 18px 18px 18px 20px; }
  .post-item .entry-title { font-size: 17px; }
  .entry-summary { font-size: 14px; }

  .article-card { padding: 22px 18px 24px; }
  .single-head h1 { font-size: 22px; }
  .entry-content { font-size: 16.5px; line-height: 1.9; }
  .entry-content h2 { font-size: 18.5px; }
  .entry-content h3 { font-size: 17px; }

  .comments-area { padding: 20px 18px; }

  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }

  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}

/* 打印 */
@media print {
  .site-header, .sidebar, .site-footer, .to-top, .post-nav, .related-posts,
  .hero, .comments-area { display: none; }
  body { background: #fff; }
  .site-layout { display: block; padding: 0; }
  .article-card { border: 0; box-shadow: none; padding: 0; }
  .entry-content { font-size: 12pt; }
}
