/* components.css — 内页组件（分类页 / 详情页），与 style.css 分文件
   颜色、字号、圆角一律用 tokens.css 的 var(--…)，不写字面量。
   共用组件（.wrap .site-header .site-nav .btn .site-footer .crumbs）仍在 style.css，不要复制。 */

/* ================================================================== 内页：分类页 */
.page-hero{
  background: linear-gradient(100deg, var(--hero-from) 0%, var(--hero-to) 68%, var(--bg) 100%);
  border-bottom: 1px solid var(--line-soft);
  padding: 26px 0 30px;
}
.crumbs{ display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.crumbs a:hover{ color: var(--accent-strong); }
.crumbs span[aria-hidden]{ color: var(--line-strong); }
.page-hero .eyebrow{ margin-top: 14px; }
.page-hero h1{
  margin-top: 12px; font-size: 36px; line-height: 1.4; font-weight: 700;
  color: var(--ink-h1); letter-spacing: -.02em; max-width: 900px;
}
.page-lead{ margin-top: 14px; font-size: 15px; line-height: 1.85; color: var(--body); max-width: 880px; }
.cat-tags{ margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tags li{
  font-size: 12px; color: var(--accent-strong); background: var(--surface);
  border: 1px solid var(--accent-line); border-radius: var(--pill); padding: 4px 14px;
}

.list-toolbar-wrap{ background: var(--bg); border-bottom: 1px solid var(--line-soft); position: sticky; top: 72px; z-index: 30; }
.toolbar{ display: flex; align-items: center; gap: 22px; padding: 12px 0; flex-wrap: wrap; }
.toolbar-count{ font-size: 12.5px; color: var(--muted); }
.toolbar-count strong{ color: var(--ink-h1); font-size: 14px; }
.toolbar-group{ display: flex; align-items: center; gap: 6px; }
.toolbar-group:last-child{ margin-left: auto; }
.toolbar-label{ font-size: 11.5px; color: var(--muted); letter-spacing: .06em; margin-right: 2px; }
.chip{
  height: 32px; padding: 0 14px; border-radius: var(--pill); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--body-soft);
  font-family: inherit; font-size: 12.5px; transition: all .16s ease;
}
.chip:hover{ border-color: var(--accent-line); color: var(--accent-strong); }
.chip.is-active{ background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

.entry-list{ padding: 32px 0 56px; }
.list-title{ font-size: 24px; font-weight: 700; }
.list-sub{ margin-top: 8px; font-size: 13px; color: var(--body-soft); }
.entry-grid{ margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.entry-card{
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 18px 20px 16px; min-height: 196px;
  transition: border-color .16s ease, transform .16s ease;
}
.entry-card:hover{ border-color: var(--accent-line); transform: translateY(-2px); }
.entry-card[hidden]{ display: none; }
.entry-meta{ display: flex; align-items: center; justify-content: space-between; }
.entry-group{
  font-size: 11px; font-weight: 600; color: var(--accent-strong);
  background: var(--bg-card); border-radius: var(--pill); padding: 3px 10px;
}
.entry-no{ font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }
.entry-card h3{ font-size: 16px; line-height: 1.5; font-weight: 700; margin-top: 2px; }
.entry-card h3 a:hover{ color: var(--ink-h1); }
.entry-text{ font-size: 12.5px; line-height: 1.75; color: var(--body-soft); }
.entry-foot{ margin-top: auto; font-size: 12px; font-weight: 600; }
.entry-foot a{ color: var(--accent-strong); }
.entry-foot a::after{ content: " →"; }
.entry-empty{ margin-top: 18px; font-size: 13px; color: var(--muted); }

.list-desc{
  margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start;
}
.list-desc h2{ font-size: 20px; line-height: 1.45; font-weight: 700; }
.list-desc-body{ display: flex; flex-direction: column; gap: 14px; }
.list-desc-body p{ font-size: 14px; line-height: 1.95; color: var(--body); }

.list-next{ margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.list-next-title{ font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.list-next ul{ margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.list-next a{
  display: block; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg-inner); font-size: 13px; color: var(--ink); font-weight: 600;
}
.list-next a:hover{ background: var(--bg-card); color: var(--ink-h1); }

/* ================================================================== 内页：详情页 */
.article-head{ background: linear-gradient(100deg, var(--hero-from) 0%, var(--hero-to) 70%, var(--bg) 100%); padding: 26px 0 32px; }
.article-head-inner{ max-width: 980px; }
.article-head .eyebrow{ margin-top: 14px; }
.article-head h1{
  margin-top: 12px; font-size: 38px; line-height: 1.38; font-weight: 700;
  color: var(--ink-h1); letter-spacing: -.02em;
}
.article-lead{ margin-top: 16px; font-size: 15px; line-height: 1.95; color: var(--body); }
.article-meta{ margin-top: 16px; display: flex; gap: 10px; font-size: 12px; color: var(--muted); }

.article-layout{
  display: grid; grid-template-columns: minmax(0, 720px) 260px;
  gap: 56px; justify-content: center;
  padding: 40px 0 24px;
}
.article-aside{ order: 2; }
.article-aside .toc{ position: sticky; top: 96px; }
.toc{ background: var(--bg-inner); border-radius: var(--radius); padding: 18px 20px; }
.toc-title{ font-size: 11.5px; letter-spacing: .1em; color: var(--muted); }
.toc ol{ margin-top: 10px; display: flex; flex-direction: column; gap: 2px; counter-reset: none; }
.toc li{ list-style: none; }
.toc a{
  display: block; padding: 6px 0; font-size: 12.5px; line-height: 1.6; color: var(--body-soft);
  border-bottom: 1px solid var(--line-soft);
}
.toc a:hover{ color: var(--ink-h1); }
.toc a.is-active{ color: var(--accent-strong); font-weight: 700; }
.toc-foot{ margin-top: 12px; font-size: 12px; }
.toc-foot a{ color: var(--accent-strong); font-weight: 600; }
.toc-toggle{ display: none; cursor: pointer; }

.article-body{ order: 1; }
.article-figure{ margin: 0 0 28px; }
.article-figure img{ width: 100%; border-radius: var(--radius); }
.article-figure figcaption{ margin-top: 8px; font-size: 12px; color: var(--muted); }
.article-body section{ margin-bottom: 34px; scroll-margin-top: 96px; }
.article-body h2{
  font-size: 23px; line-height: 1.45; font-weight: 700; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line-soft);
}
.article-body p{ font-size: 15px; line-height: 2.05; color: var(--body); margin-bottom: 12px; }
.article-body strong{ color: var(--ink); }
.check-list{ margin: 14px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.check-list li{
  position: relative; padding: 10px 14px 10px 34px; border-radius: var(--radius-sm);
  background: var(--bg-inner); font-size: 13.5px; line-height: 1.8; color: var(--body);
}
.check-list li::before{
  content: ""; position: absolute; left: 14px; top: 17px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.article-aside-note{
  margin: 16px 0; padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--bg-card); border-left: 3px solid var(--accent);
}
.aside-title{ font-size: 12.5px; font-weight: 700; color: var(--ink-h1); margin-bottom: 6px; }
.article-aside-note p:last-child{ font-size: 13.5px; line-height: 1.9; margin: 0; color: var(--note-ink); }
.mini-table{ width: 100%; border-collapse: collapse; margin: 16px 0 18px; }
.mini-table caption{ text-align: left; font-size: 12px; color: var(--muted); padding-bottom: 8px; }
.mini-table th, .mini-table td{ text-align: left; padding: 9px 12px; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.mini-table thead th{ font-size: 11.5px; font-weight: 500; color: var(--body-soft); background: var(--bg-inner); }
.mini-table tbody th{ font-weight: 600; color: var(--ink); width: 22%; }
.mini-table td:last-child{ color: var(--accent-strong); font-weight: 600; }
.def-list{ margin: 14px 0 18px; display: flex; flex-direction: column; gap: 12px; }
.def-list > div{ padding-left: 16px; border-left: 2px solid var(--accent-line); }
.def-list dt{ font-size: 14px; font-weight: 700; color: var(--ink); }
.def-list dd{ margin: 4px 0 0; font-size: 13.5px; line-height: 1.95; color: var(--body); }

.related{ padding: 8px 0 56px; }
.related h2{ font-size: 20px; font-weight: 700; }
.related-grid{ margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-grid a{
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 12px; transition: border-color .16s ease;
}
.related-grid a:hover{ border-color: var(--accent-line); }
.related-thumb{ display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-inner); }
.related-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.related-title{ font-size: 13.5px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.related-text{ font-size: 12px; line-height: 1.7; color: var(--body-soft); }

/* 列表卡缩略图：顶到卡片内边，图片按 16:10 裁切 */
.entry-thumb{
  display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--bg-block);
  margin: -18px -20px 2px;
}
.entry-thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* 分页 */
.pager{
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 8px;
}
.pager-num, .pager-step{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 13px;
  border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--body-soft); transition: all .16s ease;
}
.pager-num:hover, .pager-step:hover{ border-color: var(--accent-line); color: var(--accent-strong); }
.pager-num.is-active{ background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.pager-step.is-disabled{ opacity: .42; pointer-events: none; }
.pager-gap{ padding: 0 2px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 1023px){
  .list-toolbar-wrap{ top: 72px; }
  .entry-grid{ grid-template-columns: repeat(2, 1fr); }
  .list-desc{ grid-template-columns: 1fr; gap: 16px; }
  .list-next ul{ grid-template-columns: 1fr; }
  .article-layout{ grid-template-columns: 1fr; gap: 24px; padding: 28px 0 20px; }
  .article-aside{ order: 0; }
  .article-aside .toc{ position: static; display: none; }
  .article-aside .toc.is-open{ display: block; }
  .toc-toggle{
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px;
    border-radius: var(--pill); background: var(--bg-inner); border: 1px solid var(--line);
    font-family: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer;
  }
  .related-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 760px){
  .page-hero h1{ font-size: 27px; }
  .article-head h1{ font-size: 28px; }
  .entry-grid{ grid-template-columns: 1fr; }
  .toolbar{ gap: 10px; }
  .toolbar-group{ flex-wrap: wrap; }
  .toolbar-group:last-child{ margin-left: 0; }
  .article-body h2{ font-size: 20px; }
  .article-body p{ font-size: 14.5px; line-height: 1.95; }
}
