/* ==========================================================================
   VPNPF — ai.css
   AI 工具加速专题页专属样式:页头 / 章节骨架 / 工具 chips /
   工具与线路对照表 / 线路类型深墨图例 / 网页端与 API 对比 /
   失败现象网格 / 结尾入口面板
   颜色、圆角、字体一律引用 :root 设计令牌,组件内不写死设计值。
   ========================================================================== */

/* ---------- 页面骨架 ---------- */
.ai-doc.wrap {
  max-width: 1120px;
  padding-top: 36px;
  padding-bottom: 8px;
}

.ai-head { max-width: 880px; }
.ai-head h1 { margin-top: 12px; }
.ai-head .lead { margin-top: 16px; font-size: 18px; }

.ai-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ai-head .facts { margin-top: 18px; }

.ai-sections > section + section { margin-top: 60px; }
.ai-sections > section > h2 { margin-bottom: 8px; }
.ai-sections .callout { margin-top: 24px; }

.ai-note {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 78ch;
}
.ai-note + .table-scroll { margin-top: 18px; }

/* ---------- 工具与线路对照表 ---------- */
.table-scroll .ai-table { min-width: 860px; font-size: 14px; }

.ai-table thead th {
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  background: var(--bg-panel2);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
.ai-table tbody th,
.ai-table tbody td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  word-break: keep-all;
}
.ai-table tbody tr:last-child th,
.ai-table tbody tr:last-child td { border-bottom: 0; }
.ai-table tbody th { white-space: nowrap; font-weight: 500; }
.ai-table .ai-pick { color: var(--accent-dark); white-space: nowrap; }

/* ---------- 线路类型深墨图例 ---------- */
.ai-legend {
  margin-top: 26px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
  box-shadow: inset 0 1px 0 var(--hl-ink), 0 26px 50px -24px var(--shadow-ink);
}
.ai-legend-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.ai-legend-item {
  min-width: 0;
  padding: 22px 24px;
  border-left: 1px solid var(--rule-ink);
}
.ai-legend-item:first-child { border-left: 0; }
.ai-legend-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--on-ink);
}
.ai-legend-name i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-light);
  flex-shrink: 0;
}
.ai-legend-note {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--on-ink-muted);
}

/* ---------- 网页端与 API 对比 ---------- */
.ai-compare { display: grid; grid-template-columns: 1fr 1fr; }
.ai-compare > div {
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--border);
}
.ai-compare > div:first-child {
  padding-left: 0;
  padding-right: 28px;
  border-left: 0;
}
.ai-compare h3 { font-size: 17px; }
.ai-compare ul {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ai-compare li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}
.ai-compare li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 失败现象网格 ---------- */
.ai-symptoms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.ai-symptoms > li {
  min-width: 0;
  padding: 20px 26px 20px 0;
  border-bottom: 1px solid var(--border);
}
.ai-symptoms > li:nth-child(even) {
  padding-left: 26px;
  padding-right: 0;
  border-left: 1px solid var(--border);
}
.ai-symptoms h3 { font-size: 15.5px; }
.ai-symptoms p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- 结尾入口面板 ---------- */
.ai-cta { margin-top: 26px; }
.ai-cta h3 { font-size: 18px; }
.ai-cta p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 74ch;
}
.ai-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .ai-legend-grid { grid-template-columns: 1fr; }
  .ai-legend-item {
    padding: 18px 20px;
    border-left: 0;
    border-top: 1px solid var(--rule-ink);
  }
  .ai-legend-item:first-child { border-top: 0; }

  .ai-compare { grid-template-columns: 1fr; }
  .ai-compare > div,
  .ai-compare > div:first-child {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }
  .ai-compare > div + div {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 768px) {
  .ai-doc.wrap { padding-top: 24px; }
  .ai-head .lead { font-size: 16px; }
  .ai-sections > section + section { margin-top: 46px; }

  .ai-symptoms { grid-template-columns: 1fr; }
  .ai-symptoms > li { padding-left: 0; padding-right: 0; }
  .ai-symptoms > li:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }
}