/* 公共组件：按钮、标签、卡片、表头、手风琴、页脚 —— 三页共用 */

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary {
  background: var(--amber);
  color: var(--navy-deep);
}
.btn-primary:hover {
  background: var(--amber-strong);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--navy);
  background: rgba(40, 54, 86, 0.05);
}
.btn-arrow::after {
  content: "→";
  font-size: 13px;
}

/* ---------- 小标签 ---------- */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(60, 78, 133, 0.09);
  color: var(--navy-soft);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tag-amber {
  background: var(--amber-soft);
  color: #8a5c05;
}
.sec-label {
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: var(--head-gap);
}
.sec-head h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.sec-head .sec-desc {
  font-size: var(--fs-small);
  color: var(--ink-2);
  max-width: 52ch;
  line-height: 1.6;
}

/* ---------- 分类卡 ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}
.topic-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.topic-card {
  position: relative;
  padding: 13px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-strong);
}
.topic-card .t-icon {
  display: block;
  width: 19px;
  height: 19px;
  margin-bottom: 7px;
  color: var(--navy-soft);
}
.topic-card .num {
  position: absolute;
  top: 13px;
  right: 12px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-micro);
  color: var(--ink-3);
}
.topic-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.topic-card p {
  font-size: var(--fs-micro);
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------- 文章卡（通用） ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-3);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  display: block;
  padding: 12px 14px 14px;
}
.card-body h3 {
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 700;
  margin: 8px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body p {
  font-size: var(--fs-micro);
  line-height: 1.65;
  color: var(--ink-2);
}
.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}

/* ---------- 版本对照表 ---------- */
.vtable {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  font-size: var(--fs-micro);
}
.vtable thead th {
  background: rgba(40, 54, 86, 0.06);
  color: var(--navy);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  padding: 4px 14px;
  border-bottom: 1px solid var(--line);
}
.vtable tbody td {
  padding: 4px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  line-height: 1.5;
  vertical-align: middle;
}
.vtable tbody tr:last-child td {
  border-bottom: 0;
}
.vtable tbody th {
  padding: 4px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.vtable tbody tr:hover {
  background: rgba(242, 193, 99, 0.1);
}
.vtable .cell-form {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  color: var(--navy-soft);
}

/* ---------- 手风琴 ---------- */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  position: relative;
  padding: 6px 30px 6px 0;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--navy-soft);
  transition: transform 0.18s ease;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item p {
  padding: 0 22px 8px 0;
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------- 核对清单 ---------- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 22px;
  list-style: none;
}
.check-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
}
.check-item .num {
  grid-row: span 2;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-micro);
  color: var(--navy-soft);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}
.check-item h3 {
  font-size: 14px;
  font-weight: 700;
}
.check-item p {
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- 渠道条 ---------- */
.channel-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
  list-style: none;
}
.channel {
  padding: 7px 12px;
  border-right: 1px solid var(--line);
}
.channel:last-child {
  border-right: 0;
}
.channel h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.channel h3::before {
  content: attr(data-mark);
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--navy);
  color: var(--amber);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 10px;
  display: grid;
  place-items: center;
  flex: none;
}
.channel p {
  font-size: var(--fs-micro);
  line-height: 1.6;
  color: var(--ink-2);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--navy);
  color: var(--on-navy);
  padding: 14px 0 11px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px 36px;
}
.footer-grid > * { flex: 1 1 190px; min-width: 170px; }
.footer-grid > .footer-brand { flex: 1.5 1 280px; }
.footer-col, .footer-about { display: flex; flex-direction: column; gap: 7px; }
.footer-col h4, .footer-about h4 { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.12em; color: var(--on-navy-dim); margin-bottom: 4px; }
.footer-col a, .footer-about a { font-size: var(--fs-small); color: var(--on-navy); opacity: 0.86; width: fit-content; }
.footer-col a:hover, .footer-about a:hover { opacity: 1; color: var(--amber); }
.footer-icp { font-size: 11px; line-height: 1.8; color: var(--on-navy-dim); }
.footer-brand .footer-note { display: block; margin-top: 8px; }
.footer-brand h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.footer-brand p {
  font-size: var(--fs-small);
  line-height: 1.8;
  color: var(--on-navy-dim);
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
}
.footer-links a {
  font-size: var(--fs-small);
  color: var(--on-navy);
  opacity: 0.86;
}
.footer-links a:hover {
  opacity: 1;
  color: var(--amber);
}
.footer-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--on-navy-dim);
}
.footer-copy {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(243, 237, 227, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: var(--fs-micro);
  color: var(--on-navy-dim);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}

/* ============ 内页组件（环节 6 新增） ============ */

/* ---------- 面包屑 ---------- */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.crumb a {
  color: var(--ink-2);
}
.crumb a:hover {
  color: var(--navy-soft);
}
.crumb > * + *::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-strong);
}

/* ---------- 筛选条 ---------- */
.filter-bar {
  position: sticky;
  top: var(--h-header);
  z-index: 40;
  background: rgba(251, 248, 242, 0.95);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 52px;
  padding: 8px 0;
}
.filter-label {
  font-size: var(--fs-micro);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-right: 2px;
}
.chip,
.sort-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--fs-micro);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.chip:hover,
.sort-btn:hover {
  border-color: var(--navy-soft);
  color: var(--navy);
}
.chip.is-active,
.sort-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-navy);
}
.filter-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.filter-count {
  font-size: var(--fs-micro);
  color: var(--ink-3);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}

/* ---------- 文章卡网格 ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.post-card .card-body {
  padding: 13px 15px 15px;
}
.post-card h3 {
  font-size: 15px;
  line-height: 1.45;
  margin: 9px 0 7px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card p {
  font-size: var(--fs-micro);
  line-height: 1.7;
  color: var(--ink-2);
}
.post-card .meta {
  margin-top: 10px;
}
.empty-state {
  padding: 40px 0;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--ink-2);
}

/* ---------- 分类说明 ---------- */
.list-desc {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px 24px;
}
.list-desc h2 {
  font-size: var(--fs-h3);
  margin-bottom: 10px;
}
.list-desc p {
  font-size: var(--fs-small);
  line-height: 1.95;
  color: var(--ink-2);
}
@media (min-width: 900px) {
  .list-desc p {
    columns: 2;
    column-gap: 40px;
  }
}

/* ---------- 相关分类 ---------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* ---------- 文章头 ---------- */
.article-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.article-head h1 {
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
  margin-bottom: 12px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.article-lede {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-2);
}

/* ---------- 目录 ---------- */
.toc {
  position: sticky;
  top: calc(var(--h-header) + 20px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 18px;
}
.toc h2 {
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.toc ol {
  display: grid;
  gap: 7px;
  counter-reset: toc;
}
.toc a {
  display: block;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink-2);
  padding-left: 2px;
  border-left: 2px solid transparent;
  padding-left: 9px;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.toc a:hover {
  color: var(--navy);
}
.toc a.is-active {
  color: var(--navy);
  font-weight: 700;
  border-left-color: var(--amber);
}

/* ---------- 正文 ---------- */
.article-body h2 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 800;
  color: var(--navy-deep);
  margin: 26px 0 10px;
  padding-top: 4px;
}
.article-body h2:first-child {
  margin-top: 0;
}
.article-body p {
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.article-body p:last-child {
  margin-bottom: 0;
}
.article-body figure { margin: 22px 0; }
.article-body figure img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--r-card); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 30px 0 6px; font-size: var(--fs-small); color: var(--ink-2); }
.pagination a, .pagination .current { min-width: 32px; padding: 5px 10px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink-2); text-decoration: none; }
.pagination a:hover { border-color: var(--navy-soft); color: var(--navy); }
.pagination .current { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.latest-more { margin-top: 18px; }

/* ---------- 相关阅读 ---------- */
.related {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.related h2 {
  font-size: var(--fs-h3);
  margin-bottom: 12px;
}
.related-list {
  display: grid;
  gap: 8px;
}
.related-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: var(--fs-small);
  color: var(--ink);
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.related-list a::before {
  content: "→";
  color: var(--navy-soft);
  font-size: 12px;
}
.related-list a:hover {
  border-color: var(--line-strong);
  transform: translateX(2px);
}

.post-card .post-link {
  display: block;
  height: 100%;
  color: inherit;
}
