/* ==========================================================================
   YIXU Tools — 内容中心 / 文章页专属样式（#18）
   规则（#12/#13）：颜色 / 字号 / 间距 / 圆角一律引用 design-tokens.css 变量，
   不写死值；公共组件（card / grid / table / placeholder / cta-band /
   breadcrumb / compat 三态）由 components.css 提供，本文件只做文章页与
   列表页的页面级布局。

   边界：本票不碰 styles.css / index.html / product.html。
   ========================================================================== */

/* ==========================================================================
   一、内容中心列表页（articles/index.html）
   ========================================================================== */

.hub-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.hub-hero h1 { font-size: var(--fs-7); max-width: 20ch; }
.hub-hero .lede { margin-top: 22px; }

/* 内容类型分组标题 */
.hub-group { margin-top: var(--space-8); }
.hub-group:first-of-type { margin-top: 0; }

.hub-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.hub-group__head h2 { font-size: var(--fs-6); }
.hub-group__head p { color: var(--muted); font-size: var(--fs-2); }

/* 文章卡片：复用 .card，只补文章专属的元信息行 */
.hub-card { height: 100%; }
.hub-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--fs-1);
  color: var(--muted);
}
.hub-card__meta .dot { color: var(--neutral-300); }

/* 阅读时长 / 更新日期用小标签，与产品页 .tag 视觉一致 */
.meta-tag {
  display: inline-block;
  font-size: var(--fs-1);
  letter-spacing: .06em;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--neutral-100);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* 列表页顶部的「本站标准」说明块 —— 把 #8 §五 的标准前置给读者，也给
   后续补内容一个固定锚点（图片未到位时明确标注，不假装已交付） */
.hub-standard {
  border: 1px solid var(--warning-line);
  background: var(--warning-bg);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.hub-standard h2 { font-size: var(--fs-h4); color: var(--warning-fg); }
.hub-standard ul { margin-top: var(--space-3); display: grid; gap: 8px; }
.hub-standard li {
  position: relative;
  padding-left: var(--space-5);
  font-size: var(--fs-2);
  color: var(--warning-fg);
  line-height: var(--lh-snug);
}
.hub-standard li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning-600);
}

/* ==========================================================================
   二、文章页（articles/*.html）
   ========================================================================== */

.article-head { padding: 40px 0 0; }

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  font-size: var(--fs-2);
  color: var(--muted);
}
.article-meta .dot { color: var(--neutral-300); }

/* 摘要块：文章开头一句话结论，B2B 买家扫读用 */
.article-abstract {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--brand-500);
  background: var(--brand-050);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--fs-3);
  color: var(--ink-2);
  line-height: var(--lh-base);
  max-width: var(--container-narrow);
}

/* 正文容器：控制行宽，长文不刺眼 */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 {
  font-size: var(--fs-5);
  margin-top: var(--space-7);
  padding-top: var(--space-2);
}
.prose h3 { font-size: var(--fs-h4); margin-top: var(--space-6); }
.prose p { color: var(--ink-2); line-height: var(--lh-base); }
.prose ul, .prose ol { display: grid; gap: 10px; padding-left: 0; }
.prose li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--ink-2);
  line-height: var(--lh-snug);
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-300);
}
.prose ol { counter-reset: step; }
.prose ol > li { counter-increment: step; }
.prose ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-500);
  color: var(--neutral-0);
  font-size: var(--fs-1);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.prose strong { color: var(--ink); font-weight: 650; }

/* 步骤号清单（排查类文章用）*/
.checklist { counter-reset: chk; display: grid; gap: var(--space-3); }
.checklist li {
  counter-increment: chk;
  position: relative;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-7);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--neutral-0);
}
.checklist li::before {
  content: counter(chk);
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-050);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  font-size: var(--fs-2);
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* 警示块：常见误配 / 不该做的事 —— 降低纠纷的关键模块 */
.callout {
  border: 1px solid var(--warning-line);
  background: var(--warning-bg);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.callout h3 { font-size: var(--fs-h4); color: var(--warning-fg); }
.callout p, .callout li { color: var(--warning-fg); font-size: var(--fs-2); line-height: var(--lh-snug); }
.callout ul { margin-top: var(--space-3); display: grid; gap: 8px; }
.callout li { position: relative; padding-left: var(--space-4); }
.callout li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning-600);
}

.callout--info {
  border-color: var(--brand-100);
  background: var(--brand-050);
}
.callout--info h3, .callout--info p, .callout--info li { color: var(--brand-700); }
.callout--info li::before { background: var(--brand-500); }

/* 三态说明（图例）—— 让读者一眼看懂兼容表里的颜色含义 */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--neutral-50);
  font-size: var(--fs-2);
}
.legend__item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }

/* 规格 / 兼容表区块：给标题一个统一间距节奏 */
.table-block { margin-top: var(--space-7); }
.table-block h2 { font-size: var(--fs-5); margin-bottom: var(--space-2); }
.table-block > p { color: var(--muted); font-size: var(--fs-2); margin-bottom: var(--space-3); }

/* 图片位：主图 + 细节图。素材未到位时保持占位并标注需要哪几张，
   补图时只替换 img 的 src，结构不动*/
.shots { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.shots--main { grid-template-columns: 1fr; }
.shots--detail { grid-template-columns: repeat(3, 1fr); }

.shot {
  position: relative;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--neutral-50);
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  text-align: center;
}
.shot--tall { min-height: 260px; }
.shot__todo {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-1);
  color: var(--neutral-400);
  letter-spacing: .04em;
}
.shot figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px var(--space-3);
  font-size: var(--fs-1);
  color: var(--muted);
  background: var(--neutral-0);
  border-top: 1px dashed var(--line);
  text-align: left;
}

/* 相关产品卡：指向 product.html 的深链 */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.related .card h3 { font-size: var(--fs-h4); }

/* 文末「继续读」—— 文章之间互链，避免内容孤岛 */
.next-reads { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.next-read {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  background: var(--neutral-0);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.next-read:hover { border-color: var(--brand-500); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.next-read .card-kicker { display: block; margin-bottom: 6px; }
.next-read h3 { font-size: var(--fs-h4); }
.next-read p { margin-top: 6px; color: var(--muted); font-size: var(--fs-2); line-height: var(--lh-snug); }

/* 文章更新记录 */
.revision {
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-2);
  color: var(--muted);
}

/* ==========================================================================
   三、响应式
   断点与 design-tokens.css 注释对齐：≤1024 两列降级，≤760 单列
   （.table 的窄屏横向滚动由 components.css 提供）
   ========================================================================== */
@media (max-width: 1024px) {
  .related { grid-template-columns: repeat(2, 1fr); }
  .shots--detail { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .hub-hero { padding: var(--space-7) 0 var(--space-5); }
  .related, .next-reads, .shots--detail { grid-template-columns: 1fr; }
  .prose > * + * { margin-top: var(--space-3); }
  .article-abstract { padding: var(--space-4); }
  .shot { min-height: 140px; }
  .shot--tall { min-height: 200px; }
}