* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #f5f7fa;
  color: #333;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
}
a { color: #1a65ff; text-decoration: none; }
a:hover { color: #0d4fd6; }
img { max-width: 100%; }

.wrap { width: 1120px; max-width: calc(100% - 40px); margin: 0 auto; }

/* 头部 */
.site-header { background: #fff; border-bottom: 1px solid #e8ecf2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 64px; width: auto; }
.top-nav { display: flex; gap: 26px; font-size: 14px; }
.top-nav a { color: #5a6070; }
.top-nav a.active { color: #1a65ff; font-weight: 600; }

/* 主体 */
.page-main { padding: 36px 0 64px; }
.page-lead { margin-bottom: 26px; }
.page-lead h1 { margin: 0; color: #1a1a1a; font-size: 30px; line-height: 1.35; font-weight: 600; }
.page-lead p { margin: 8px 0 0; color: #7a7f8c; font-size: 14px; }

/* 分类筛选：固定单行，分类再多也不换行、不把列表往下推；
   超出时只在本行横向滚动（不产生整页横向滚动），桌面端保留细滚动条提示可滚动。
   上下内边距用于给滚动条和选中态阴影留空间，与 margin 合计仍是原来的 28px 间距。 */
.filter-bar {
  display: flex; flex-wrap: nowrap; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  padding: 6px 0 12px; margin-bottom: 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.filter-bar::-webkit-scrollbar { height: 6px; }
.filter-bar::-webkit-scrollbar-track { background: transparent; }
.filter-bar::-webkit-scrollbar-thumb { background: #d5dae4; border-radius: 3px; }
.filter-bar::-webkit-scrollbar-thumb:hover { background: #b9c1cf; }
.filter-btn {
  flex: 0 0 auto; white-space: nowrap;
  padding: 6px 16px; border: 1px solid #dfe4ec; border-radius: 18px;
  background: #fff; color: #5a6070; font-size: 13px; line-height: 20px; cursor: pointer;
  font-family: inherit;
}
.filter-btn:hover { border-color: #1a65ff; color: #1a65ff; }
.filter-btn.active {
  border-color: #1a65ff; background: #1a65ff; color: #fff; font-weight: 600;
  box-shadow: 0 4px 10px rgba(26, 101, 255, .28);
}

/* 列表卡片 */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.guide-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #eef0f4; border-radius: 8px;
  transition: box-shadow .2s, transform .2s;
}
.guide-card:hover { box-shadow: 0 10px 28px rgba(0, 8, 26, .1); transform: translateY(-3px); }
.card-cover { display: block; width: 100%; height: 176px; object-fit: cover; background: #eef0f4; }
/* 无封面统一占位块 */
.card-cover-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef3fb 0%, #f8fbff 100%);
}
.card-cover-placeholder img { width: auto; height: 30px; opacity: .5; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }
.card-title { margin: 0 0 10px; font-size: 17px; line-height: 1.55; font-weight: 600; }
.card-title a { color: #1a1a1a; }
.card-title a:hover { color: #1a65ff; }
.card-summary {
  margin: 0 0 14px; color: #6b7280; font-size: 13px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 12px; border-top: 1px solid #f0f2f6;
  color: #9aa4b8; font-size: 12px;
}
.card-meta .cat { color: #1a65ff; }
.card-empty-text { padding: 60px 0; color: #9aa4b8; text-align: center; }

/* 分页 */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 36px; }
.pager button, .pager a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border: 1px solid #dfe4ec; border-radius: 6px; background: #fff;
  color: #5a6070; font-size: 13px; cursor: pointer; font-family: inherit;
  transition: border-color .15s, color .15s;
}
.pager button:hover:not(:disabled), .pager a:hover { border-color: #1a65ff; color: #1a65ff; }
.pager button.active, .pager a.active {
  border-color: #1a65ff; background: #1a65ff; color: #fff; font-weight: 600;
  box-shadow: 0 4px 10px rgba(26, 101, 255, .28);
}
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager .ellipsis { align-self: center; padding: 0 2px; color: #9aa4b8; }

/* 详情 */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 20px; color: #9aa4b8; font-size: 13px; }
.breadcrumb em { font-style: normal; color: #c3c9d4; }
.breadcrumb .current { color: #5a6070; }

/* 左侧粘性目录 + 正文两栏（无标题时自动去掉目录列） */
.detail-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.detail-layout.no-toc { grid-template-columns: minmax(0, 1fr); }
.toc {
  position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto;
  padding: 18px 14px; background: #fff; border: 1px solid #eef0f4; border-radius: 8px;
}
.toc-title { margin-bottom: 10px; color: #1a1a1a; font-size: 14px; font-weight: 600; }
.toc-nav { display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  display: block; padding: 6px 10px; border-left: 2px solid transparent; border-radius: 0 4px 4px 0;
  color: #5a6070; font-size: 13px; line-height: 1.5; transition: color .15s, background .15s;
}
.toc-link.toc-h3 { padding-left: 22px; color: #7a7f8c; font-size: 12.5px; }
.toc-link:hover { color: #1a65ff; background: #f5f8ff; }
.toc-link.active { border-left-color: #1a65ff; background: #f2f6ff; color: #1a65ff; font-weight: 600; }

.detail-card { padding: 40px 48px 48px; background: #fff; border: 1px solid #eef0f4; border-radius: 8px; }
.detail-card h1 { margin: 0 0 14px; color: #1a1a1a; font-size: 28px; line-height: 1.4; font-weight: 600; }
/* 详情头部封面 / 无封面占位 */
.detail-cover { height: 320px; margin-bottom: 26px; overflow: hidden; border-radius: 6px; background: #eef3fb; }
.detail-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-cover-placeholder {
  display: flex; align-items: center; justify-content: center; height: 220px;
  background: linear-gradient(135deg, #eef3fb 0%, #f8fbff 100%);
}
.detail-cover-placeholder img { width: auto; height: 40px; object-fit: contain; opacity: .55; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 18px; padding-bottom: 18px; margin-bottom: 24px;
  border-bottom: 1px solid #eef0f4; color: #9aa4b8; font-size: 13px;
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.detail-tag { display: inline-flex; align-items: center; padding: 3px 12px; border: 1px solid #cfdfff; border-radius: 999px; background: #f5f8ff; color: #1a65ff; font-size: 12px; line-height: 18px; }
.detail-tag::before { content: "#"; margin-right: 3px; font-weight: 600; opacity: .55; }
.tldr { padding: 16px 20px; margin-bottom: 22px; background: #f2f6ff; border-left: 4px solid #1a65ff; border-radius: 4px; }
.tldr-label {
  display: inline-block; padding: 0 8px; margin-bottom: 8px; border-radius: 3px;
  background: #1a65ff; color: #fff; font-size: 12px; line-height: 20px;
}
.tldr-body { color: #3a3f4c; font-size: 15px; line-height: 1.8; white-space: pre-wrap; }
.detail-summary {
  padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #eef0f4;
  color: #5a6070; font-size: 15px; line-height: 1.8; white-space: pre-wrap;
}

.article { color: #555; font-size: 16px; line-height: 1.95; word-break: break-word; }
.article p { margin: 0 0 1.3em; }
.article h2 { margin: 1.9em 0 .8em; padding-bottom: 8px; border-bottom: 1px solid #f0f2f6; color: #1a1a1a; font-size: 22px; line-height: 1.5; font-weight: 600; }
.article h3 { margin: 1.6em 0 .65em; color: #1a1a1a; font-size: 18px; line-height: 1.55; font-weight: 600; }
.article h4 { margin: 1.4em 0 .55em; color: #1a1a1a; font-size: 16px; font-weight: 600; }
.article img { display: block; max-width: 100%; height: auto; margin: 22px auto; }
.article ul, .article ol { margin: 0 0 1.3em; padding-left: 24px; }
.article li { margin-bottom: .4em; }
.article blockquote {
  margin: 0 0 1.1em; padding: 12px 18px;
  background: #f7f9fc; border-left: 4px solid #d9dde0; color: #5a6070;
}
.article pre { overflow-x: auto; padding: 14px 16px; border-radius: 4px; background: #f5f7fa; }

/* 表格窄屏横向滚动 */
.table-scroll { width: 100%; margin: 24px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.article table, .table-scroll table { border-collapse: collapse; }
.article th, .article td { padding: 12px 16px; border: 1px solid #e3e7ee; text-align: left; line-height: 1.7; }
.article th { background: #f7f9fc; color: #1a1a1a; font-weight: 600; }
.article tr:nth-child(even) td { background: #fcfdff; }

/* FAQ */
.faq { padding-top: 26px; margin-top: 34px; border-top: 1px solid #eef0f4; }
.faq h2 { margin: 0 0 18px; color: #1a1a1a; font-size: 20px; font-weight: 600; }
.faq-item { margin-bottom: 18px; }
.faq-item h3 { margin: 0 0 8px; color: #1a1a1a; font-size: 16px; line-height: 1.6; font-weight: 600; }
.faq-answer { color: #5a6070; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }

/* 相关阅读 */
.related { padding-top: 26px; margin-top: 34px; border-top: 1px solid #eef0f4; }
.related h2 { margin: 0 0 16px; color: #1a1a1a; font-size: 20px; font-weight: 600; }
.related-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.related-list a {
  display: block; padding: 14px 16px; border: 1px solid #eef0f4; border-radius: 6px;
  background: #fafbfd; color: #1a1a1a; font-size: 14px; line-height: 1.6;
}
.related-list a:hover { border-color: #1a65ff; color: #1a65ff; }

/* 相关产品 */
.related-products .product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #eef0f4; border-radius: 6px;
  transition: border-color .15s, box-shadow .15s;
}
.product-card:hover { border-color: #1a65ff; box-shadow: 0 6px 18px rgba(0, 8, 26, .08); }
.product-cover { display: flex; align-items: center; justify-content: center; height: 140px; overflow: hidden; background: #f5f7fa; }
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-cover-placeholder { background: linear-gradient(135deg, #eef3fb 0%, #f8fbff 100%); }
.product-cover-placeholder img { width: auto; height: 26px; object-fit: contain; opacity: .45; }
.product-info { padding: 12px 14px; }
.product-name { color: #1a1a1a; font-size: 14px; line-height: 1.55; }
.product-card:hover .product-name { color: #1a65ff; }

/* 锚点定位时给吸顶留出空间 */
.article h2, .article h3 { scroll-margin-top: 24px; }

/* CTA */
.cta { padding: 22px 26px; margin-top: 36px; background: #f7f9fc; border-radius: 6px; }
.cta h2 { margin: 0 0 8px; color: #1a1a1a; font-size: 18px; font-weight: 600; }
.cta p { margin: 0 0 12px; color: #7a7f8c; font-size: 14px; }
.cta a.btn {
  display: inline-block; padding: 8px 18px; border-radius: 4px;
  background: #1a65ff; color: #fff; font-size: 14px;
}
.cta a.btn:hover { background: #0d4fd6; color: #fff; }

/* 状态提示 */
.hint-box, .state-box {
  padding: 40px 20px; margin-top: 20px; background: #fff;
  border: 1px dashed #dfe4ec; border-radius: 8px; color: #7a7f8c; text-align: center;
}
.state-box strong { display: block; margin-bottom: 6px; color: #1a1a1a; font-size: 16px; }
.state-box code { color: #c0392b; font-size: 12px; word-break: break-all; }

.site-footer { padding: 24px 0 0; color: #9aa4b8; font-size: 12px; text-align: center; }
.footer-brand { padding-bottom: 24px; }

/* 页脚免责声明：深色区域 + 细上边线，字号比正文小一档，浅灰文字保证深底可读 */
.footer-disclaimer {
  padding: 22px 0 26px;
  background: #20242e;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #aeb6c4;
  font-size: 12px;
  line-height: 1.9;
  text-align: left;
  word-break: break-word;
}
.footer-disclaimer p { margin: 0; }
.footer-disclaimer .disclaimer-text { max-width: 980px; }
.footer-disclaimer .disclaimer-copy { margin-top: 10px; color: #8e96a6; }
.footer-disclaimer a { color: #aeb6c4; }
.footer-disclaimer a:hover { color: #fff; }

@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { display: block; }
  .toc { display: none; }
}
@media (max-width: 767px) {
  .wrap { max-width: calc(100% - 24px); }
  .header-inner { height: 56px; }
  .brand { font-size: 17px; }
  .brand span { font-size: 12px; }
  .top-nav { gap: 14px; }
  .page-main { padding: 22px 0 40px; }
  .page-lead h1 { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .card-cover { height: 190px; }
  .detail-card { padding: 22px 20px 28px; }
  .detail-card h1 { font-size: 22px; }
  .detail-cover { height: 190px; }
  .detail-cover-placeholder { height: 150px; }
  .detail-cover-placeholder img { height: 30px; }
  .article { font-size: 15px; }
  .related-list { grid-template-columns: 1fr; }
  .related-products .product-grid { grid-template-columns: 1fr; }
}
