/* components.css — 内页专用组件（环节 6 追加；颜色/字号/圆角一律走 tokens.css 的 var()）

   直接复用 style.css 里的组件，不要在这里复制：
     .wrap .site-header .brand .nav .nav-link .menu-toggle
     .btn .btn-primary .btn-ghost .kicker .sec-head .sec-note
     .cat-card .cat-thumb .timing-step .pick .faq-item .scope-box
     .site-footer .footer-* .table-note

   本文件只放内页新增区块：
     .page-hero / .crumb              列表页标题区 + 面包屑
     .toolbar / .chip / .sort-btn     筛选与排序
     .entry-grid / .entry-card        条目卡片网格
     .list-copy / .pager-note         分类说明 + 分页状态
     .cta-band                        内页 CTA 通栏
     .art-head / .art-meta            详情页标题区
     .art-layout / .toc               详情页两栏 + 目录
     .article-body                    正文排版（含 h2/h3/p/ul/table/callout）
     .key-points / .related           文末要点与相关阅读
*/

/* ---------------------------------------------------------- 列表页标题区 */
.page-hero {
  background: linear-gradient(180deg, var(--hero-a) 0%, var(--paper) 100%);
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.crumb a { color: var(--muted); border-bottom: 1px solid transparent; }
.crumb a:hover { color: var(--accent-deep); border-bottom-color: var(--accent-soft); }
.crumb li { display: flex; align-items: center; gap: 8px; }
.crumb li + li::before { content: "/"; color: var(--line-strong); }
.crumb li[aria-current] { color: var(--ink-soft); }

.page-hero h1 {
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: 10px;
  max-width: 900px;
}
.page-hero .page-lead {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 860px;
}
.page-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.page-count {
  flex: 0 0 auto;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}
.page-count strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent-deep);
  line-height: 1.1;
}

/* ------------------------------------------------------- 筛选与排序工具条 */
.toolbar {
  position: sticky;
  top: 88px;
  z-index: 20;
  background: rgba(250, 244, 243, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.toolbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 54px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}
.chip {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 5px 13px;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sort-btn {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 12.5px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 3px 0;
  cursor: pointer;
}
.sort-btn:hover { color: var(--accent-deep); border-bottom-color: var(--accent-soft); }
.sort-btn.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.toolbar-count {
  margin-left: auto;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 12px;
  color: var(--muted);
}
.toolbar-count b { color: var(--accent-deep); font-weight: 600; }

/* ---------------------------------------------------------------- 卡片网格 */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 30px;
}
.entry-card {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
}
.entry-card[hidden] { display: none; }
.entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.entry-num {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 11px;
  color: var(--accent);
}
.entry-tag {
  font-size: 11px;
  color: var(--accent-deep);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 1px 8px;
}
.entry-card h3 {
  font-size: 16.5px;
  line-height: 1.45;
  margin-bottom: 7px;
}
.entry-card h3 a { border-bottom: 1px solid transparent; }
.entry-card h3 a:hover { color: var(--accent-deep); border-bottom-color: var(--accent-soft); }
.entry-card p {
  font-size: 12.8px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 10px;
}
.entry-more {
  margin-top: auto;
  font-size: 12px;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.entry-more::after { content: "→"; }
.entry-card:hover .entry-more { gap: 8px; }

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}

/* --------------------------------------------------- 分类说明 + 分页状态 */
.list-copy {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.list-copy h2 {
  font-size: 21px;
  margin-bottom: 12px;
}
.list-copy p {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-soft);
  max-width: 860px;
}
.list-copy p + p { margin-top: 12px; }
.list-copy a { color: var(--accent-deep); border-bottom: 1px solid var(--accent-soft); }

.pager-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.pager-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------------------------------------------------------------- CTA 通栏 */
.cta-band {
  background: linear-gradient(120deg, #f7d9d3 0%, var(--scope-bg) 100%);
  padding: 26px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.cta-inner h2 {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 5px;
}
.cta-inner p {
  font-size: 13px;
  color: var(--ink-soft);
}
.cta-actions { display: flex; gap: 12px; flex: 0 0 auto; }
.cta-band .btn-ghost { background: rgba(255, 255, 255, 0.6); }

/* -------------------------------------------------------------- 详情页标题 */
.art-head {
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--hero-a) 0%, var(--paper) 100%);
}
.art-head h1 {
  font-size: 33px;
  line-height: 1.3;
  max-width: 960px;
  margin-bottom: 10px;
}
.art-lead {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 880px;
}
.art-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.art-meta span { display: inline-flex; align-items: center; gap: 6px; }
.art-meta .meta-tag { color: var(--accent-deep); }

/* --------------------------------------------------------- 详情页两栏布局 */
.art-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 26px 0 30px;
}
.toc {
  position: sticky;
  top: 104px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.toc-title {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.toc ol { display: grid; gap: 7px; }
.toc-link {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  border-left: 2px solid transparent;
  padding-left: 9px;
  margin-left: -11px;
  display: block;
}
.toc-link:hover { color: var(--accent-deep); }
.toc-link.is-active {
  color: var(--ink);
  border-left-color: var(--accent);
}

/* ------------------------------------------------------------- 正文排版 */
.article-body { max-width: 780px; }
.article-body h2 {
  font-size: 22px;
  line-height: 1.4;
  margin: 30px 0 12px;
  padding-top: 4px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 16.5px;
  margin: 22px 0 8px;
}
.article-body p {
  font-size: 14.5px;
  line-height: 2.02;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.article-body a { color: var(--accent-deep); border-bottom: 1px solid var(--accent-soft); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body ul, .article-body ol {
  margin: 0 0 16px;
  padding-left: 20px;
  list-style: revert;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-soft);
}
.article-body li { margin-bottom: 6px; }
/* 正文穿插配图：与段落同宽、上下留白，移动端不留侧缩进 */
.article-figure { margin: 22px 0 26px; }
.article-figure-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}
@media (max-width: 720px) {
  .article-figure { margin: 18px 0 20px; }
}
.article-body table {
  width: 100%;
  font-size: 13px;
  border-top: 1px solid var(--line-strong);
  margin: 6px 0 18px;
}
.article-body th, .article-body td {
  text-align: left;
  vertical-align: top;
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--line);
}
.article-body thead th {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
}
.article-body tbody th { font-family: var(--font-serif); font-size: 14px; }
.callout {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin: 4px 0 18px;
}
.callout strong { color: var(--accent-deep); }

/* ---------------------------------------------------- 文末要点 + 相关阅读 */
.key-points {
  background: var(--scope-bg);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 26px;
}
.key-points h2 {
  font-size: 17px;
  margin-bottom: 10px;
}
.key-points dl { display: grid; gap: 7px; }
.key-points div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  font-size: 12.8px;
  line-height: 1.8;
}
.key-points dt { color: var(--accent-deep); }
.key-points dd { color: var(--ink-soft); }

.related {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 18px;
}
.related h2 { font-size: 18px; margin-bottom: 12px; }
.related ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 24px;
}
.related li { font-size: 13px; line-height: 1.7; }
.related li a { border-bottom: 1px solid transparent; }
.related li a:hover { color: var(--accent-deep); border-bottom-color: var(--accent-soft); }
.related li p { color: var(--muted); font-size: 12.3px; margin-top: 4px; }

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1023px) {
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc-link { margin-left: 0; border-left: 0; padding-left: 0; }
  .toc-link.is-active { border-left: 0; color: var(--accent-deep); }
  .related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero h1 { font-size: 28px; }
  .art-head h1 { font-size: 26px; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 767px) {
  .page-hero-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-count { text-align: left; }
  .page-count strong { display: inline; font-size: 20px; margin-right: 4px; }
  .toolbar { position: static; }
  .toolbar-inner { gap: 12px; padding: 10px 0; }
  .toolbar-count { margin-left: 0; width: 100%; }
  .entry-grid { grid-template-columns: 1fr; gap: 20px; }
  .entry-card h3 { font-size: 15.5px; }
  .article-body p, .article-body ul, .article-body ol { font-size: 14px; line-height: 1.95; }
  .article-body h2 { font-size: 19px; }
  .key-points div { grid-template-columns: 1fr; gap: 2px; }
  .related ul { grid-template-columns: 1fr; }
  .cta-actions { flex-wrap: wrap; }
  .toc ol { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ 版式辅助类 */
.section-pad { padding-top: 26px; padding-bottom: 26px; }
.section-pad-b { padding-bottom: 30px; }
.note-left { text-align: left; margin-bottom: 16px; }

/* ---------------------------------------------------- 列表缩略图 / 分页条 */
.entry-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 12px;
  background: var(--scope-bg);
  border-radius: var(--radius);
}
.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.entry-card:hover .entry-thumb img { transform: scale(1.03); }
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 22px 0 0;
}
.pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  font-size: 12.5px;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}
a.pager-num:hover { color: var(--accent-deep); border-color: var(--accent); }
.pager-num.is-current {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
} /* 当前页 */
.pager-dots {
  min-width: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
