/* =============================================================
   AI达人BD系统（海外版）—— features.html 页面专属样式
   只补充「模块锚点导航 / 产品界面模拟细节 / 流水线与对比」，
   颜色、圆角、阴影、间距一律沿用 style.css 的令牌，不新增视觉语言。
   ============================================================= */

/* ---------- 模块锚点导航（吸顶，编号 + 下划线） ---------- */
html { scroll-padding-top: calc(var(--header-h) + 74px); }
.mod-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 60;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(14px);
}
.mod-nav .container { display: block; }
.mod-rail { display: flex; gap: 34px; overflow-x: auto; scrollbar-width: none; }
.mod-rail::-webkit-scrollbar { display: none; }
.mod-link {
  position: relative;
  display: flex; align-items: baseline; gap: 9px;
  padding: 18px 0 15px; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--text-3);
  transition: color var(--dur) var(--ease);
}
.mod-num {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
  color: var(--text-3); font-variant-numeric: tabular-nums;
  transition: color var(--dur) var(--ease);
}
.mod-link:hover { color: var(--text); }
.mod-link.is-active { color: var(--text); }
.mod-link.is-active .mod-num { color: var(--brand-600); }
.mod-link.is-active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--brand);
}

/* ---------- 模块内通用小元素 ---------- */
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mod-title { font-size: 12.5px; font-weight: 700; color: var(--text); }

/* 环形图纵向排布（模块 05 右栏较窄，避免图例被压成竖排文字） */
.donut-stack { flex-direction: column; align-items: center; gap: 14px; }
.donut-stack .legend { width: 100%; }
.mod-note { margin-top: 12px; font-size: 12px; line-height: 1.65; color: var(--text-3); }
.mod-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.mod-stats div b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mod-stats div small { display: block; font-size: 11px; color: var(--text-3); }
.hr--tight { height: 1px; background: var(--line); border: 0; margin: 18px 0; }

/* ---------- #6 私域：会话头 + 客户档案 ---------- */
.wa-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.wa-av {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #b6e6c1, #22935a);
  color: #fff; font-size: 12px; font-weight: 800;
}
.wa-who { min-width: 0; }
.wa-who b { display: block; font-size: 12px; font-weight: 700; color: var(--text); }
.wa-who small { display: block; font-size: 10.5px; color: var(--text-3); }
.wa-head .tag { margin-left: auto; flex: 0 0 auto; height: 22px; font-size: 10px; padding: 0 8px; }

/* ---------- #8 开放 API：暗色代码块 ---------- */
.api-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.api-head b { font-size: 12.5px; font-weight: 700; color: #fff; }
.api-head .tag { height: 22px; font-size: 10px; padding: 0 9px; }
.api-lines { display: grid; gap: 8px; }
.api-row {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  padding: 9px 11px; border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
}
.api-row .m {
  flex: 0 0 auto; padding: 2px 7px; border-radius: 5px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
}
.api-row .m--get { background: rgba(34, 211, 238, .16); color: #7be4f2; }
.api-row .m--post { background: rgba(34, 197, 94, .18); color: #86e2a8; }
.api-row .m--hook { background: rgba(124, 92, 255, .22); color: #c0b0ff; }
.api-row code {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; color: #e8ecf8;
}
.api-row .d { margin-left: auto; flex: 0 0 auto; font-size: 10px; color: rgba(255, 255, 255, .42); }
.api-foot { margin-top: 14px; font-size: 11px; line-height: 1.7; color: rgba(255, 255, 255, .46); }

/* ---------- #7 团队：权限矩阵简版 ---------- */
.compare.compare--mini { min-width: 0; font-size: 11.5px; }
.compare--mini th, .compare--mini td { padding: 7px 10px; }
.compare--mini thead th { font-size: 9.5px; letter-spacing: .04em; white-space: nowrap; }
.compare--mini td { white-space: nowrap; }
.compare--mini td:first-child { font-weight: 600; }

/* ---------- 集成生态卡片 ---------- */
.int-card { padding: 22px; display: flex; flex-direction: column; }
.int-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.int-head .feature-icon { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 0; }
.int-head .feature-icon svg { width: 19px; height: 19px; }
.int-head .tag { height: 22px; font-size: 10px; padding: 0 9px; }
.int-card h3 { font-size: 15px; }
.int-card p { margin-top: 6px; font-size: 12.5px; line-height: 1.7; }
.int-card .tiny { margin-top: 10px; }

/* ---------- 8 模块流水线 ---------- */
.pipe { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; margin-bottom: 44px; }
.pipe-step {
  position: relative;
  padding: 14px 14px 15px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.pipe-step::after {
  content: "→";
  position: absolute; top: 50%; right: -11px; transform: translateY(-50%);
  font-size: 12px; font-weight: 700; color: var(--brand-300);
  line-height: 1;
}
.pipe-step:last-child::after { content: none; }
.pipe-step .pnum { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; color: var(--brand-600); }
.pipe-step b { display: block; margin-top: 5px; font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.pipe-step small { display: block; margin-top: 4px; font-size: 10.5px; line-height: 1.5; color: var(--text-3); }

.compare--why { min-width: 0; font-size: 13px; }
.compare--why td:last-child { color: var(--text); font-weight: 650; }

/* ---------- 响应式补充 ---------- */
@media (max-width: 1120px) {
  .pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pipe-step::after { content: none; }
  .mod-rail { gap: 26px; }
}
@media (max-width: 960px) {
  .mod-link { font-size: 13px; padding: 14px 0 12px; }
  .mod-rail { gap: 22px; }
}
@media (max-width: 720px) {
  .mod-num { display: none; }
  .mod-rail { gap: 20px; }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 34px; }
  .api-row .d { display: none; }
  .int-card { padding: 20px; }
  .mod-stats { gap: 10px 20px; }

  /* 权限矩阵：收紧内边距，让 4 列在 390 宽度内完整显示 */
  .compare--mini th, .compare--mini td { padding: 6px 7px; }
  .compare--mini thead th { font-size: 9px; letter-spacing: 0; }

  /* 对比表：手机端改为「逐行卡片」，避免横向滚动与裁切 */
  .why-table { border: 0; background: transparent; border-radius: 0; overflow: visible; }
  .compare--why { display: block; min-width: 0; }
  .compare--why thead { display: none; }
  .compare--why tbody { display: block; }
  .compare--why tr {
    display: block; margin-bottom: 10px; padding: 12px 14px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
  }
  .compare.compare--why td {
    display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: start; gap: 10px;
    padding: 4px 0;
    border: 0; text-align: left; white-space: normal;
  }
  .compare.compare--why td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 500; color: var(--text-3); line-height: 1.7;
  }
  .compare.compare--why td:first-child {
    display: block;
    padding-bottom: 8px; margin-bottom: 4px;
    font-size: 13.5px; font-weight: 700; color: var(--text);
    border-bottom: 1px dashed var(--line);
  }
  .compare--why td:first-child::before { content: none; }
}
