/* ── 全站公共组件：容器、品牌、导航、标题、按钮、页脚 ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-body);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-accent-deep);
  color: #fff;
  font-size: 15px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* 页头 */
.site-header {
  background: var(--c-bg-header);
  height: var(--header-h);
  position: relative;
  z-index: 30;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.brand-mark { width: 38px; height: 38px; object-fit: contain; }
.brand-name {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--c-ink);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-left: 105px;
}
.nav-link {
  position: relative;
  padding: 6px 0;
  font-size: 17.5px;
  color: var(--c-ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.nav-link:hover { color: var(--c-accent); }
.nav-link.is-active { color: var(--c-accent); font-weight: 600; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-accent);
}
.nav-link:focus-visible,
.brand:focus-visible,
.btn:focus-visible,
.item-card:focus-visible,
.cat-item:focus-visible,
.rel-card:focus-visible,
.chip:focus-visible,
.toc-link:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle:hover { border-color: var(--c-accent); }
.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--c-ink); border-radius: 2px; }

/* 区块标题 */
.sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 27.5px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-ink);
}
.sec-title::before {
  content: "";
  width: 5px;
  height: 26px;
  border-radius: 3px;
  background: var(--c-accent);
  flex: none;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 17.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary {
  background: var(--c-accent-btn);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: var(--c-accent-deep); transform: translateY(-1px); }
.btn-ghost {
  background: var(--c-white);
  color: var(--c-accent-deep);
  border-color: #c3d8ee;
}
.btn-ghost:hover { border-color: var(--c-accent); background: #f4f9ff; }
.btn-outline {
  background: var(--c-white);
  color: var(--c-accent-deep);
  border-color: #b9d3ee;
}
.btn-outline:hover { border-color: var(--c-accent); background: #f4f9ff; }
.btn-arrow { font-size: 16px; }
.btn-arrow::before { content: "→"; }

/* 页脚 */
.site-footer {
  background: var(--c-bg-header);
  padding: 10px 0 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px 40px;
  padding: 18px 0 14px;
}
.footer-col { flex: 1 1 180px; min-width: 170px; }
.footer-brand { flex: 1 1 300px; }
.brand-footer { gap: 8px; }
.brand-footer .brand-name { font-size: 21px; }
.footer-text { flex: 1; }
.footer-text p { margin: 0; font-size: 13.2px; line-height: 1.6; color: var(--c-muted); }
.footer-desc { margin: 8px 0 0; font-size: 13.2px; line-height: 1.7; color: var(--c-muted); }
.footer-cats { color: var(--c-ink-soft); }
.footer-col-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--c-ink); }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin-bottom: 7px; font-size: 13.5px; line-height: 1.5; }
.footer-links a { color: var(--c-ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--c-accent); }
.footer-note { color: var(--c-muted); font-size: 12.8px; }
.site-logo-text { font-size: 31px; font-weight: 800; letter-spacing: 0.5px; color: var(--c-ink); }
.site-footer .site-logo-text { font-size: 21px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--c-line);
}
.footer-copy,
.footer-icp { margin: 0; font-size: 12.8px; color: var(--c-muted); }
.footer-bar { height: 16px; background: #e6f0fa; }

/* ── 内页公共组件（分类页 / 详情页新增，首页不引用） ── */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--c-muted);
}
.crumb a { color: var(--c-ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--c-accent); text-decoration: underline; }
.crumb span[aria-current] { color: var(--c-ink); }
.crumb-sep::before { content: "/"; color: #b6c6d6; }

.page-hero {
  background: var(--grad-hero);
  padding: 26px 0 30px;
}
.page-title {
  margin: 0 0 10px;
  font-size: var(--fs-page);
  line-height: 1.25;
  font-weight: 800;
  color: var(--c-ink);
}
.page-lead {
  margin: 0;
  max-width: 900px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-ink-soft);
}
.page-count {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #cfe3f6;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-accent-deep);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 10px;
  padding: 18px 0 8px;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 22px;
}
.chip {
  padding: 8px 16px;
  border: 1px solid #d5e4f3;
  border-radius: 999px;
  background: var(--c-white);
  color: var(--c-ink-soft);
  font-family: inherit;
  font-size: 14.5px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.chip:hover { border-color: var(--c-accent); color: var(--c-accent-deep); }
.chip[aria-pressed="true"] {
  background: var(--c-accent-btn);
  border-color: var(--c-accent-btn);
  color: #fff;
  font-weight: 600;
}
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.toolbar label { font-size: 14px; color: var(--c-muted); cursor: pointer; }
.select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d5e4f3;
  border-radius: var(--radius-sm);
  background: var(--c-white);
  color: var(--c-ink-soft);
  font-family: inherit;
  font-size: 14.5px;
  cursor: pointer;
}
.select:hover { border-color: var(--c-accent); }
.count { font-size: 14px; color: var(--c-muted); }

.list-lead { margin-bottom: 6px; }
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 8px;
}
.list-card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.list-card:hover {
  transform: translateY(-3px);
  border-color: #c8dcf0;
  box-shadow: 0 12px 26px rgba(31, 53, 80, 0.1);
}
.list-card-link { display: block; height: 100%; text-decoration: none; }
.list-thumb { display: block; aspect-ratio: 16 / 10; background: #eef5fb; }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-body { display: block; padding: 14px 18px 18px; }
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--c-accent-soft);
  color: var(--c-accent-deep);
  font-size: 12px;
  font-weight: 600;
}
.list-title {
  display: block;
  margin: 8px 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: var(--c-ink);
}
.list-summary {
  display: block;
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-body);
}
.empty {
  padding: 40px 0;
  text-align: center;
  font-size: 15px;
  color: var(--c-muted);
}

.list-desc {
  margin: 34px 0 10px;
  padding: 26px 30px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  background: var(--c-white);
}
.list-desc h2 { margin: 0 0 12px; font-size: 22px; color: var(--c-ink); }
.list-desc p { margin: 0 0 12px; font-size: 15px; line-height: 1.85; color: var(--c-body); }
.list-desc p:last-child { margin-bottom: 0; }

/* 分页 */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 4px;
  font-size: 14.5px;
}
.pager-link,
.pager-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-white);
  color: var(--c-ink-soft);
  text-decoration: none;
}
.pager-link:hover { border-color: var(--c-accent); color: var(--c-accent); }
.pager-current {
  border-color: var(--c-accent-btn);
  background: var(--c-accent-btn);
  color: #fff;
  font-weight: 600;
}
.pager-gap { padding: 0 4px; color: var(--c-muted); }
.pager-info { margin-left: auto; font-size: 13.5px; color: var(--c-muted); }

/* 首页分类内容模块 */
.section-feed .sec-count { font-size: 14px; font-weight: 400; color: var(--c-muted); }
.feed-more { margin: 20px 0 0; text-align: center; }

/* 详情页 */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 48px;
  align-items: start;
  padding: 24px 0 40px;
}
.article-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  align-items: start;
  padding: 10px 0 22px;
  border-bottom: 1px solid var(--c-line);
}
.article-title {
  margin: 0 0 12px;
  font-size: var(--fs-page);
  line-height: 1.28;
  font-weight: 800;
  color: var(--c-ink);
}
.article-lead { margin: 0; font-size: 16.5px; line-height: 1.85; color: var(--c-ink-soft); }
.article-head.article-head--solo { grid-template-columns: minmax(0, 1fr); gap: 0; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 6px;
  font-size: 14.5px;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.spec-table caption {
  text-align: left;
  padding: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-ink);
}
.spec-table th,
.spec-table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--c-line-soft); }
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 34%; background: #f6fafe; color: var(--c-ink-soft); font-weight: 600; }
.spec-table td { color: var(--c-body); }

.article { max-width: 820px; }
.article h2 {
  margin: 34px 0 12px;
  font-size: 25px;
  line-height: 1.35;
  color: var(--c-ink);
  scroll-margin-top: 20px;
}
.article p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.92; color: var(--c-body); }
.article figure { margin: 22px 0; }
.article figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #eef5fb;
}

.toc {
  position: sticky;
  top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  background: var(--c-white);
  box-shadow: var(--shadow-card);
}
.toc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-ink);
  cursor: pointer;
}
.toc-list { margin: 0; padding: 0; list-style: none; }
.toc-link {
  display: block;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-body);
  text-decoration: none;
}
.toc-link:hover { color: var(--c-accent-deep); background: #f5fafe; }
.toc-link.is-current {
  border-left-color: var(--c-accent);
  color: var(--c-accent-deep);
  font-weight: 600;
  background: #f2f8ff;
}

.detail-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 8px;
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  background: var(--grad-navy);
  color: #eaf3fc;
}
.detail-cta h2 { margin: 0; font-size: 22px; color: #fff; }
.detail-cta p { margin: 4px 0 0; font-size: 14.5px; }
.detail-cta .btn { background: #fff; color: var(--c-accent-deep); }

.related { padding: 8px 0 36px; }
.rel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rel-card {
  display: block;
  text-decoration: none;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.rel-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.rel-body { display: block; padding: 12px 14px 14px; }
.rel-name { display: block; font-size: 16px; font-weight: 700; color: var(--c-ink); }
.rel-text { display: block; margin-top: 4px; font-size: 13px; line-height: 1.55; color: var(--c-muted); }

@media (max-width: 1180px) {
  .list-lead { margin-bottom: 6px; }
.list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; }
  .article-head { grid-template-columns: minmax(0, 1fr) 340px; }
  .article-head.article-head--solo { grid-template-columns: minmax(0, 1fr); }
  .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .page-hero { padding: 18px 0 22px; }
  .page-title { font-size: 26px; }
  .page-lead { font-size: 15px; }
  .toolbar { gap: 8px; }
  .toolbar-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .chip { padding: 7px 12px; font-size: 13.5px; }
  .list-lead { margin-bottom: 6px; }
.list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .list-desc { padding: 18px 16px; margin-top: 24px; }
  .list-desc h2 { font-size: 19px; }
  .detail-layout { grid-template-columns: 1fr; gap: 18px; padding-top: 16px; }
  .article-head { grid-template-columns: 1fr; gap: 16px; }
  .article-head.article-head--solo { gap: 0; }
  .article h2 { font-size: 21px; }
  .article p { font-size: 15.5px; line-height: 1.85; }
  .toc { position: static; padding: 14px 16px; }
  .toc-title { cursor: pointer; }
  .toc-list { display: none; }
  .toc.is-open .toc-list { display: block; }
  .rel-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .detail-cta { padding: 18px 16px; }
}

@media (max-width: 620px) {
  .list-lead { margin-bottom: 6px; }
.list-grid { grid-template-columns: 1fr; }
  .rel-grid { grid-template-columns: 1fr; }
}
