/* ==========================================================================
   51qpm 内页样式层 v2 —— 列表页 / 文章页 / 搜索结果页
   --------------------------------------------------------------------------
   设计前提：与首页（public/css/home-redesign.css）共用同一套视觉 token。
   首页已上线的是「竹绿 #159a68 + 浅绿渐变带 + 大圆角 + 绿调阴影」，
   内页原来是 RiPro 深蓝 #2c5aa0 + 8px 圆角 + 纯黑阴影，从首页进来的割裂感很强。
   本文件把这套 token 抽成 CSS 变量，用 q-* 新类名承载内页，
   不改 main.css（7000+ 页面共用），也不跟 mobile-list-fix.css 的 !important 抢优先级。
   ========================================================================== */

/* ---------- 1. token ---------- */
.qpm-inner {
  --q-brand: #159a68;
  --q-brand-d: #0f8357;
  --q-brand-l: #5fbf9a;
  --q-brand-soft: #eaf6ef;
  --q-brand-line: #cfe9d8;

  --q-ink: #143528;
  --q-ink-2: #1f2f28;
  --q-text: #4a5f55;
  --q-muted: #7a8b82;

  --q-line: #e9efeb;
  --q-soft: #f7faf8;

  --q-r: 16px;
  --q-r-sm: 10px;

  --q-sh: 0 1px 2px rgba(16, 42, 32, 0.05), 0 10px 28px -12px rgba(16, 42, 32, 0.16);
  --q-sh-h: 0 2px 6px rgba(16, 42, 32, 0.07), 0 20px 44px -16px rgba(16, 42, 32, 0.26);

  --q-grad: linear-gradient(118deg, #fcfdf8 0%, #f2f9f2 56%, #fdfaf1 100%);
  --q-glow:
    radial-gradient(620px 300px at 92% 8%, rgba(245, 196, 81, 0.18), transparent 66%),
    radial-gradient(520px 340px at 4% 96%, rgba(95, 191, 154, 0.16), transparent 64%);

  color: var(--q-text);
}

/* ---------- 2. 面包屑 ---------- */
.q-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--q-muted);
}
.q-crumb a {
  color: var(--q-muted);
  text-decoration: none;
  transition: color 0.16s;
}
.q-crumb a:hover { color: var(--q-brand-d); }
.q-crumb i { font-size: 0.62rem; opacity: 0.55; }
.q-crumb .cur { color: var(--q-ink-2); }

/* ==========================================================================
   三、栏目列表页
   ========================================================================== */

/* ---------- 3.1 页头 ---------- */
.q-hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 2.3rem;
  background: var(--q-grad);
  border-bottom: 1px solid var(--q-line);
}
.q-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--q-glow);
  pointer-events: none;
}
.q-hero-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 2.2rem;
  align-items: center;
}
.q-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--q-ink);
}
.q-hero p {
  max-width: 46rem;
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.8;
  color: var(--q-text);
}

/* 页头右侧数据卡：文章数 / 更新日 / 平均阅读时长 */
.q-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--q-line);
  border: 1px solid var(--q-line);
  border-radius: 14px;
  box-shadow: var(--q-sh);
}
.q-hero-stat {
  padding: 1.05rem 0.4rem;
  text-align: center;
  background: #fff;
}
.q-hero-stat b {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--q-brand);
  font-variant-numeric: tabular-nums;
}
.q-hero-stat span {
  font-size: 0.74rem;
  color: var(--q-muted);
}

/* ---------- 3.2 吸顶筛选条 ---------- */
.q-bar {
  position: sticky;
  top: 70px;
  z-index: 900;
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid var(--q-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.q-bar-in {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
}
.q-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 0.35rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.q-tabs::-webkit-scrollbar { display: none; }
.q-tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--q-text);
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.q-tab i { font-size: 0.74rem; opacity: 0.72; }
.q-tab:hover {
  background: var(--q-soft);
  color: var(--q-brand-d);
}
.q-tab.on {
  background: var(--q-brand-soft);
  border-color: var(--q-brand-line);
  color: var(--q-brand-d);
  font-weight: 600;
}

/* 视图切换（卡片 / 紧凑），真实可用，存 localStorage */
.q-view {
  display: flex;
  flex: none;
  gap: 0.15rem;
  padding: 0.18rem;
  border: 1px solid var(--q-line);
  border-radius: 999px;
  background: var(--q-soft);
}
.q-view button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--q-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.q-view button:hover { color: var(--q-brand-d); }
.q-view button.on {
  background: #fff;
  color: var(--q-brand-d);
  box-shadow: 0 1px 3px rgba(16, 42, 32, 0.12);
}

/* ---------- 3.3 内容区 ---------- */
.q-list-wrap {
  padding: 1.9rem 0 2.6rem;
  background: #fff;
}
.q-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  margin-bottom: 2.2rem;
}

/* ---------- 3.4 文章卡片 ---------- */
.q-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--q-line);
  border-radius: var(--q-r);
  box-shadow: var(--q-sh);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.q-card:hover {
  transform: translateY(-3px);
  border-color: var(--q-brand-line);
  box-shadow: var(--q-sh-h);
}
.q-card-cv {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--q-soft);
}
.q-card-cv img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease;
}
.q-card:hover .q-card-cv img { transform: scale(1.045); }
.q-card-cat {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.93);
  font-size: 0.71rem;
  font-weight: 600;
  line-height: 1.6;
  color: #0f5138;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.q-card-vip {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #f0b429, #d98b0d);
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.q-card-bd {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.95rem 1.05rem 1rem;
}
.q-card-tt {
  display: -webkit-box;
  margin: 0 0 0.45rem;
  overflow: hidden;
  font-size: 0.99rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--q-ink-2);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.q-card-tt a {
  color: inherit;
  text-decoration: none;
  transition: color 0.16s;
}
.q-card:hover .q-card-tt a { color: var(--q-brand-d); }
.q-card-ds {
  display: -webkit-box;
  margin: 0 0 0.85rem;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--q-muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.q-card-mt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--q-line);
  font-size: 0.75rem;
  color: var(--q-muted);
}
.q-card-mt i { margin-right: 0.25rem; opacity: 0.7; }

/* 紧凑视图：封面左置 */
.q-grid--tight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.q-grid--tight .q-card { flex-direction: row; }
.q-grid--tight .q-card-cv {
  flex: none;
  width: 172px;
  aspect-ratio: auto;
}
.q-grid--tight .q-card-bd { padding: 0.85rem 1rem; }
.q-grid--tight .q-card-tt { font-size: 0.94rem; -webkit-line-clamp: 2; }
.q-grid--tight .q-card-ds { -webkit-line-clamp: 2; }
.q-grid--tight .q-card-cat { top: 0.5rem; left: 0.5rem; }

/* ---------- 3.5 空状态 ---------- */
.q-empty {
  padding: 4rem 1.5rem;
  border: 1px dashed var(--q-brand-line);
  border-radius: var(--q-r);
  background: var(--q-soft);
  text-align: center;
}
.q-empty i {
  display: block;
  margin-bottom: 0.8rem;
  font-size: 2.4rem;
  color: var(--q-brand-l);
}
.q-empty h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--q-ink-2);
}
.q-empty p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--q-muted);
}

/* ---------- 3.6 分页（沿用 Pagination 组件类名，重绘样式） ---------- */
.qpm-inner .pagination-nav {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 1.4rem 0 0.4rem;
  border-top: 1px solid var(--q-line);
}
/* 注意：这里不能设 display，main.css 靠 .mobile-pagination/.desktop-pagination
   的 display 切换桌面与手机两套分页，覆盖了会两套同时显示 */
.qpm-inner .desktop-pagination,
.qpm-inner .mobile-pagination {
  align-items: center;
  gap: 0.4rem;
}
.qpm-inner .pagination-numbers {
  display: flex;
  gap: 0.3rem;
  margin: 0;
}
.qpm-inner .pagination-btn,
.qpm-inner .pagination-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.7rem;
  border: 1px solid var(--q-line);
  border-radius: 9px;
  background: #fff;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--q-text);
  text-decoration: none;
  transition: all 0.16s;
}
.qpm-inner .pagination-number:hover,
.qpm-inner .pagination-btn:hover {
  border-color: var(--q-brand-line);
  background: var(--q-soft);
  color: var(--q-brand-d);
}
.qpm-inner .pagination-number.active,
.qpm-inner .pagination-number.pagination-current {
  border-color: var(--q-brand);
  background: var(--q-brand);
  color: #fff;
  font-weight: 600;
}
.qpm-inner .pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 36px;
  color: var(--q-muted);
}

/* ==========================================================================
   四、文章页
   ========================================================================== */

/* ---------- 4.1 阅读进度条 ---------- */
.q-progress {
  position: fixed;
  top: 70px;
  right: 0;
  left: 0;
  z-index: 1500;
  height: 3px;
  pointer-events: none;
}
.q-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--q-brand), var(--q-brand-l));
  box-shadow: 0 0 8px rgba(21, 154, 104, 0.45);
  transition: width 0.1s linear;
}

/* ---------- 4.2 标题区 ---------- */
.q-ahead {
  position: relative;
  overflow: hidden;
  padding: 2.1rem 0 1.9rem;
  background: var(--q-grad);
  border-bottom: 1px solid var(--q-line);
}
.q-ahead::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--q-glow);
  pointer-events: none;
}
.q-ahead .container { position: relative; }
.q-atitle {
  margin: 0.15rem 0 0.95rem;
  font-size: clamp(1.45rem, 2.35vw, 2.05rem);
  font-weight: 800;
  line-height: 1.36;
  letter-spacing: -0.01em;
  color: var(--q-ink);
  word-break: break-word;
}
.q-ameta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.25rem;
  font-size: 0.83rem;
  color: var(--q-muted);
}
.q-ameta a {
  color: var(--q-muted);
  text-decoration: none;
}
.q-ameta a:hover { color: var(--q-brand-d); }
.q-ameta i {
  margin-right: 0.3rem;
  color: var(--q-brand);
  font-size: 0.8rem;
}
.q-atags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.95rem;
}
.q-atag {
  padding: 0.22rem 0.62rem;
  border: 1px solid var(--q-line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--q-text);
}

/* ---------- 4.3 两列布局 ---------- */
.q-abody {
  padding: 2rem 0 3rem;
  background: #fff;
}
.q-alayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 2.3rem;
  align-items: start;
}
.q-amain { min-width: 0; }
.q-aside {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 正文列宽与行距：16.5px / 1.9，长文阅读更稳 */
.qpm-inner .q-amain .article-body {
  max-width: 780px;
  font-size: 16.5px;
  line-height: 1.9;
  color: #33443c;
}
.qpm-inner .q-amain .article-body p { margin-bottom: 1.25rem; }

/* H2 加左侧绿竖条，形成章节节奏（覆盖 main.css 的深蓝标题） */
.qpm-inner .q-amain .article-body h2 {
  margin: 2.4rem 0 1rem;
  padding: 0 0 0 0.8rem;
  border-bottom: 0;
  border-left: 4px solid var(--q-brand);
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--q-ink);
}
.qpm-inner .q-amain .article-body h3 {
  margin: 1.9rem 0 0.75rem;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--q-ink-2);
}
.qpm-inner .q-amain .article-body h4 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--q-ink-2);
}
.qpm-inner .q-amain .article-body a {
  color: var(--q-brand-d);
  text-decoration: none;
  border-bottom: 1px solid var(--q-brand-line);
}
.qpm-inner .q-amain .article-body a:hover { border-bottom-color: var(--q-brand); }

/* 表格：圆角 + 手机端横向滚动（原文案里表格多，手机上以前会撑破布局） */
.qpm-inner .q-amain .article-body table {
  display: block;
  width: 100%;
  margin: 1.4rem 0;
  overflow-x: auto;
  border: 1px solid var(--q-line);
  border-radius: var(--q-r-sm);
  border-collapse: collapse;
  font-size: 0.9rem;
  -webkit-overflow-scrolling: touch;
}
.qpm-inner .q-amain .article-body th,
.qpm-inner .q-amain .article-body td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--q-line);
  text-align: left;
  white-space: nowrap;
}
.qpm-inner .q-amain .article-body th {
  background: var(--q-soft);
  font-weight: 600;
  color: var(--q-ink-2);
}
.qpm-inner .q-amain .article-body tr:last-child td { border-bottom: 0; }

/* 引用：绿调左侧条 */
.qpm-inner .q-amain .article-body blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--q-brand-line);
  border-radius: 0 var(--q-r-sm) var(--q-r-sm) 0;
  background: var(--q-soft);
  color: var(--q-text);
}
.qpm-inner .q-amain .article-body blockquote p:last-child { margin-bottom: 0; }

/* 图片圆角 */
.qpm-inner .q-amain .article-body img {
  border-radius: var(--q-r-sm);
}

/* 首图 */
.qpm-inner .q-amain .article-featured-image {
  margin-bottom: 1.6rem;
  border-radius: var(--q-r);
  box-shadow: var(--q-sh);
}

/* 原来的红色「霖哥QQ：66868344」提示条：改为低调的客服引导（全站不引导加 QQ/微信） */
.qpm-inner .q-amain .q-svc-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1.6rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--q-brand-line);
  border-radius: var(--q-r-sm);
  background: var(--q-brand-soft);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #146b4c;
}
.qpm-inner .q-amain .q-svc-tip i { color: var(--q-brand); }
.qpm-inner .q-amain .q-svc-tip a {
  margin-left: auto;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--q-brand);
  border-radius: 999px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--q-brand-d);
  text-decoration: none;
  border-bottom: 1px solid var(--q-brand);
  white-space: nowrap;
}

/* ---------- 4.4 目录卡 ---------- */
.q-toc {
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--q-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--q-sh);
}
.q-toc-h {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--q-ink-2);
}
.q-toc-h i { color: var(--q-brand); font-size: 0.8rem; }
.q-toc-list {
  max-height: 46vh;
  overflow-y: auto;
  border-left: 2px solid var(--q-line);
  scrollbar-width: thin;
}
.q-toc-list ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.q-toc-list a {
  display: block;
  margin-left: -2px;
  padding: 0.3rem 0 0.3rem 0.7rem;
  border-left: 2px solid transparent;
  font-size: 0.81rem;
  line-height: 1.5;
  color: var(--q-text);
  text-decoration: none;
  transition: color 0.16s, border-color 0.16s;
}
.q-toc-list a:hover { color: var(--q-brand-d); }
.q-toc-list .lv3 a {
  padding-left: 1.35rem;
  font-size: 0.77rem;
  color: var(--q-muted);
}
.q-toc-list li.on > a {
  border-left-color: var(--q-brand);
  color: var(--q-brand-d);
  font-weight: 600;
}

/* ---------- 4.5 侧栏通用卡 ---------- */
.q-side {
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--q-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--q-sh);
}
.q-side-h {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--q-ink-2);
}
.q-side-h i { color: var(--q-brand); font-size: 0.8rem; }
.q-side-list a {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--q-line);
  font-size: 0.81rem;
  line-height: 1.5;
  color: var(--q-text);
  text-decoration: none;
}
.q-side-list a:last-child { border-bottom: 0; padding-bottom: 0; }
.q-side-list a:hover { color: var(--q-brand-d); }
.q-side-list img {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
}
.q-side-list .t {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.q-side-list .d {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--q-muted);
}
.q-side-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--q-text);
  text-decoration: none;
}
.q-side-cats a:hover { background: var(--q-soft); color: var(--q-brand-d); }
.q-side-cats a.on {
  background: var(--q-brand-soft);
  color: var(--q-brand-d);
  font-weight: 600;
}

/* ---------- 4.6 正文内转化卡 ---------- */
.q-cta {
  position: relative;
  overflow: hidden;
  margin: 1.9rem 0;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--q-brand-line);
  border-radius: var(--q-r);
  background: var(--q-grad);
}
.q-cta::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 191, 154, 0.18), transparent 70%);
  pointer-events: none;
}
.q-cta-in { position: relative; }
.q-cta h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--q-ink);
}
.q-cta p {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--q-text);
}
.q-cta-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.q-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--q-brand);
  border-radius: 9px;
  background: var(--q-brand);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(21, 154, 104, 0.22);
  transition: background 0.18s, transform 0.18s;
}
.q-cta-btn:hover {
  background: var(--q-brand-d);
  color: #fff;
  transform: translateY(-1px);
}
.q-cta-btn--ghost {
  background: #fff;
  color: var(--q-brand-d);
  box-shadow: none;
}
.q-cta-btn--ghost:hover {
  background: var(--q-brand-soft);
  color: var(--q-brand-d);
}

/* ---------- 4.7 文末：分享 + 相关推荐 ---------- */
.q-afoot {
  margin-top: 2.2rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--q-line);
}
.q-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
  font-size: 0.82rem;
  color: var(--q-muted);
}
.q-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--q-line);
  border-radius: 9px;
  background: #fff;
  font-size: 0.86rem;
  color: var(--q-muted);
  text-decoration: none;
  transition: all 0.16s;
}
.q-share a:hover {
  border-color: var(--q-brand-line);
  background: var(--q-soft);
  color: var(--q-brand-d);
}

.q-recom-h {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--q-ink-2);
}
.q-recom-h i { color: var(--q-brand); }
.q-recom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.q-recom-item {
  overflow: hidden;
  border: 1px solid var(--q-line);
  border-radius: 12px;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.q-recom-item:hover {
  transform: translateY(-2px);
  border-color: var(--q-brand-line);
  box-shadow: var(--q-sh);
}
.q-recom-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--q-soft);
}
.q-recom-item .t {
  display: -webkit-box;
  overflow: hidden;
  padding: 0.6rem 0.7rem 0.7rem;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--q-ink-2);
  text-decoration: none;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.q-recom-item:hover .t { color: var(--q-brand-d); }

/* ==========================================================================
   五、搜索结果页
   ========================================================================== */

.q-shero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 2rem;
  background: var(--q-grad);
  border-bottom: 1px solid var(--q-line);
}
.q-shero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--q-glow);
  pointer-events: none;
}
.q-shero .container { position: relative; }
.q-shero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--q-ink);
}
.q-shero p {
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  color: var(--q-text);
}
.q-sbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 720px;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border: 1.5px solid var(--q-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--q-sh);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.q-sbox:focus-within {
  border-color: var(--q-brand);
  box-shadow: 0 0 0 4px rgba(21, 154, 104, 0.12), var(--q-sh);
}
.q-sbox > i {
  flex: none;
  font-size: 0.95rem;
  color: var(--q-muted);
}
.q-sbox input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1rem;
  color: var(--q-ink-2);
}
.q-sbox input::placeholder { color: var(--q-muted); }
.q-sbox input::-webkit-search-cancel-button { display: none; }
.q-sbox button {
  flex: none;
  height: 42px;
  padding: 0 1.3rem;
  border: 1px solid var(--q-brand);
  border-radius: 10px;
  background: var(--q-brand);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.18s;
}
.q-sbox button:hover { background: var(--q-brand-d); }
.q-sbox .q-clear {
  flex: none;
  height: 42px;
  padding: 0 0.9rem;
  border: 1px solid var(--q-line);
  border-radius: 10px;
  background: #fff;
  font-size: 0.85rem;
  color: var(--q-muted);
  cursor: pointer;
}
.q-hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--q-muted);
}
.q-hints a {
  padding: 0.22rem 0.62rem;
  border: 1px solid var(--q-line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.8rem;
  color: var(--q-text);
  text-decoration: none;
  transition: all 0.16s;
}
.q-hints a:hover {
  border-color: var(--q-brand-line);
  background: var(--q-brand-soft);
  color: var(--q-brand-d);
}

/* ---------- 5.1 结果区 ---------- */
.q-sbody {
  padding: 1.9rem 0 3rem;
  background: #fff;
}
.q-sbody-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.2rem;
  align-items: start;
}
.q-resbox { min-width: 0; }

.q-sum {
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  color: var(--q-muted);
}

.q-hit {
  display: block;
  margin-bottom: 0.7rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--q-line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.q-hit:hover {
  border-color: var(--q-brand-line);
  box-shadow: var(--q-sh);
  transform: translateX(2px);
}
.q-hit-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.73rem;
  color: var(--q-muted);
}
.q-hit-sec {
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  background: var(--q-brand-soft);
  font-weight: 600;
  color: var(--q-brand-d);
}
.q-hit-tt {
  margin: 0 0 0.3rem;
  font-size: 0.99rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--q-ink-2);
}
.q-hit:hover .q-hit-tt { color: var(--q-brand-d); }
.q-hit-ds {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--q-muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.q-hit .highlight,
.q-hit mark {
  padding: 0 1px;
  border-radius: 3px;
  background: #fff1c9;
  color: #8a5a00;
  font-weight: 600;
}

/* 无结果 / 加载态 */
.q-nohit {
  padding: 3rem 1.6rem;
  border: 1px dashed var(--q-brand-line);
  border-radius: var(--q-r);
  background: var(--q-soft);
  text-align: center;
}
.q-nohit > i {
  display: block;
  margin-bottom: 0.8rem;
  font-size: 2.2rem;
  color: var(--q-brand-l);
}
.q-nohit h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  color: var(--q-ink-2);
}
.q-nohit p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--q-muted);
}
.q-nohit-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}
.q-nohit-tags a {
  padding: 0.32rem 0.8rem;
  border: 1px solid var(--q-line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  color: var(--q-text);
  text-decoration: none;
}
.q-nohit-tags a:hover {
  border-color: var(--q-brand-line);
  color: var(--q-brand-d);
}
.q-nohit .q-ask {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--q-brand);
  border-radius: 9px;
  background: var(--q-brand);
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(21, 154, 104, 0.22);
}
.q-nohit .q-ask:hover { background: var(--q-brand-d); color: #fff; }
.q-loading {
  padding: 2.4rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--q-muted);
}

/* ---------- 5.2 搜索页侧栏 & 首屏空态 ---------- */
.q-sidestack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 88px;
}
.q-catgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.q-catgrid a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--q-line);
  border-radius: 9px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--q-ink-2);
  text-decoration: none;
  transition: all 0.16s;
}
.q-catgrid a:hover {
  border-color: var(--q-brand-line);
  background: var(--q-soft);
  color: var(--q-brand-d);
}
.q-catgrid a span {
  font-size: 0.71rem;
  font-weight: 400;
  color: var(--q-muted);
}

.q-intro {
  padding: 2.6rem 1.6rem;
  border: 1px dashed var(--q-line);
  border-radius: var(--q-r);
  background: var(--q-soft);
  text-align: center;
}
.q-intro i {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 2rem;
  color: var(--q-brand-l);
}
.q-intro p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--q-muted);
}

/* ---------- 5.3 底部说明 ---------- */
.q-tips {
  margin: 2.2rem 0 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--q-line);
  border-radius: var(--q-r);
  background: var(--q-soft);
}
.q-tips h2 {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--q-ink-2);
}
.q-tips ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}
.q-tips li {
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--q-muted);
}
.q-tips li:last-child { margin-bottom: 0; }

/* ==========================================================================
   六、响应式
   ========================================================================== */

/* 平板：三列 → 两列 */
@media (max-width: 1100px) {
  .q-hero-in { grid-template-columns: minmax(0, 1fr) 260px; gap: 1.6rem; }
  .q-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-alayout { grid-template-columns: minmax(0, 1fr) 250px; gap: 1.6rem; }
  .q-sbody-in { grid-template-columns: minmax(0, 1fr) 260px; gap: 1.6rem; }
  .q-recom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 手机与窄屏 */
@media (max-width: 900px) {
  .q-hero { padding: 1.8rem 0 1.7rem; }
  .q-hero-in { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .q-hero-stats { max-width: 100%; }
  .q-hero-stat { padding: 0.8rem 0.3rem; }
  .q-hero-stat b { font-size: 1.12rem; }

  .q-bar { top: 60px; }
  .q-bar-in { padding: 0.5rem 0; }
  .q-tab { padding: 0.42rem 0.75rem; font-size: 0.81rem; }
  .q-view { display: none; }

  .q-list-wrap { padding: 1.3rem 0 2rem; }
  .q-grid { gap: 0.85rem; margin-bottom: 1.6rem; }
  .q-grid--tight { grid-template-columns: minmax(0, 1fr); }
  .q-card-bd { padding: 0.75rem 0.8rem 0.85rem; }
  .q-card-tt { font-size: 0.88rem; line-height: 1.45; }
  .q-card-ds { display: none; }
  .q-card-mt { font-size: 0.7rem; padding-top: 0.5rem; }
  .q-card-cat { top: 0.45rem; left: 0.45rem; font-size: 0.66rem; padding: 0.15rem 0.5rem; }

  .q-grid--tight .q-card-cv { width: 118px; }

  /* 文章页：侧栏下沉，目录变正文顶部折叠块 */
  .q-ahead { padding: 1.5rem 0 1.4rem; }
  .q-atitle { font-size: 1.3rem; }
  .q-abody { padding: 1.4rem 0 2.2rem; }
  .q-alayout { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .q-aside { position: static; top: auto; }
  .q-progress { top: 60px; }
  .qpm-inner .q-amain .article-body { font-size: 16px; line-height: 1.85; }
  .qpm-inner .q-amain .article-body h2 { font-size: 1.18rem; margin-top: 2rem; }
  .qpm-inner .q-amain .article-body h3 { font-size: 1.04rem; }
  .q-recom { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .q-cta { padding: 1.05rem 1.1rem; }

  /* 搜索页 */
  .q-shero { padding: 1.7rem 0 1.5rem; }
  .q-sbox { padding: 0.3rem 0.3rem 0.3rem 0.8rem; }
  .q-sbox input { height: 44px; font-size: 0.94rem; }
  .q-sbox button { height: 38px; padding: 0 0.95rem; font-size: 0.85rem; }
  .q-sbody { padding: 1.3rem 0 2.2rem; }
  .q-sbody-in { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .q-sidestack { position: static; top: auto; }
  .q-hit { padding: 0.8rem 0.9rem; }
  .q-hit-tt { font-size: 0.93rem; }
}

@media (max-width: 560px) {
  /* 极窄屏：列表仍两列（沿用本站既有习惯），卡片信息减到最少 */
  .q-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .q-hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .q-hints { font-size: 0.78rem; }
  .q-recom { grid-template-columns: minmax(0, 1fr); }
  .q-toc-list { max-height: none; }
}
