/* ==========================================================================
   自建大模型 · 免费 API 名录 · 从买到自用
   依托 supply.css 的 s-* 骨架，这里只补本页专有块。
   设计约束：
     · 手机优先（这一页最可能的入口是别人转发链接后在手机上看）
     · 表格必须能横向滚动而不撑破页面 —— 技术内容塞在手机上最容易溢出
     · 代码块可一键复制（手抄命令是最常见的失败来源）
   ========================================================================== */

.sh-wrap { max-width: 880px; }

/* ---------- 顶部说明 ---------- */
.sh-hero__t { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -.4px; margin: 0 0 10px; line-height: 1.3; }
.sh-hero__s { font-size: var(--fs-md); color: var(--text-secondary); line-height: 1.75; margin: 0 0 16px; }
.sh-hero__s b { color: var(--text-primary); }

/* 三条路：自建 / 白嫖免费额度 / 直接买 —— 让人先选路，再往下看 */
.sh-roads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sh-road {
  border: 1px solid var(--border-subtle); border-radius: var(--r-md);
  padding: 12px; background: #fff;
}
.sh-road__n { font-size: var(--fs-xs); color: var(--brand-700); font-weight: var(--fw-semibold); }
.sh-road__t { font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin: 4px 0 6px; }
.sh-road__d { font-size: var(--fs-xs); color: var(--text-tertiary); line-height: 1.6; margin: 0; }
/* 卡片里的行内链接也要够点得中（正文行内链接 16px 高在手机上偏小）。
   用 inline-block + 上下 padding 撑开可点区域，靠负 margin 抵消视觉行距影响。 */
.sh-road__d a {
  color: var(--brand-700); text-decoration: underline;
  display: inline-block; min-height: 24px; line-height: 24px;
  padding: 0 2px; margin: -4px 0;
}
@media (max-width: 620px) {
  /* 窄屏三列会挤成一列竖排的窄条，读起来像三个标签而不是三条路 */
  .sh-roads { grid-template-columns: 1fr; }
}

/* ---------- 章节 ---------- */
.sh-h2 {
  font-size: var(--fs-lg); font-weight: var(--fw-bold);
  margin: 0 0 6px; letter-spacing: -.2px;
}
.sh-sub { font-size: var(--fs-sm); color: var(--text-tertiary); margin: 0 0 14px; line-height: 1.7; }

/* ---------- 表格：手机上横向滚动，不撑破 ---------- */
.sh-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--sp-4)); padding: 0 var(--sp-4);
}
.sh-tb { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
.sh-tb th, .sh-tb td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.sh-tb thead th {
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-tertiary);
  white-space: nowrap; background: var(--bg-subtle);
}
.sh-tb tbody tr:last-child td { border-bottom: 0; }
.sh-tb code { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--bg-subtle); padding: 1px 5px; border-radius: 4px; }
.sh-tb .sh-num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 标签 */
.sh-tag {
  display: inline-block; padding: 1px 7px; border-radius: var(--r-full);
  font-size: 11px; font-weight: var(--fw-medium); white-space: nowrap;
}
.sh-tag--ok { background: var(--success-50, #ECFDF5); color: var(--success-700); }
.sh-tag--warn { background: var(--warning-50, #FFFBEB); color: var(--warning-700, #B45309); }
.sh-tag--no { background: var(--danger-50, #FEF2F2); color: var(--danger-700); }

/* ---------- 代码块 + 复制 ---------- */
.sh-code {
  position: relative; margin: 8px 0 0;
  background: #0F172A; color: #E2E8F0;
  border-radius: var(--r-md); padding: 12px 44px 12px 12px;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  line-height: 1.75; overflow-x: auto; white-space: pre;
}
/* 深色块里的注释压暗一档：跟正文同亮度会分不清"这是说明还是命令" */
.sh-code .c { color: #7C8AA5; }
.sh-code__copy {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,.12); color: #E2E8F0; border: 0;
  border-radius: 6px; padding: 4px 8px; font-size: 11px; cursor: pointer;
  font-family: var(--font-sans);
  /* 触控目标下限 24px：原来只有 23px（11px 字 + 8px 内边距），
     ui-audit 的 tiny-tap-target 判据在 6 个视口全都报了。
     手机上 23px 与 24px 的差别是真的点得中/点不中，不是洁癖。 */
  min-height: 24px; display: inline-flex; align-items: center; justify-content: center;
}
.sh-code__copy:hover { background: rgba(255,255,255,.22); }
.sh-code__copy.is-done { background: var(--success-600); color: #fff; }

/* ---------- 步骤 ---------- */
.sh-steps { list-style: none; margin: 0; padding: 0; counter-reset: sh; }
.sh-steps > li {
  position: relative; padding: 0 0 18px 34px; border-left: 2px solid var(--border-subtle);
  margin-left: 10px;
}
.sh-steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.sh-steps > li::before {
  counter-increment: sh; content: counter(sh);
  position: absolute; left: -11px; top: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-600); color: #fff;
  font-size: 11px; font-weight: var(--fw-bold);
  display: grid; place-items: center;
}
.sh-steps__t { font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin: 0 0 4px; }
.sh-steps__d { font-size: var(--fs-xs); color: var(--text-secondary); line-height: 1.7; margin: 0; }
.sh-steps__d + .sh-code { margin-top: 8px; }

/* ---------- 警示 ---------- */
.sh-warn {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--warning-200, #FDE68A); background: var(--warning-50, #FFFBEB);
  border-radius: var(--r-md); padding: 12px; margin: 14px 0 0;
  font-size: var(--fs-sm); color: #78350F; line-height: 1.7;
}
.sh-warn__i { flex: none; font-size: 15px; line-height: 1.5; }
.sh-warn b { color: #92400E; }

/* ---------- 结论卡 ---------- */
.sh-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.sh-verdict__b {
  border: 1px solid var(--border-subtle); border-radius: var(--r-md);
  padding: 12px; background: #fff;
}
.sh-verdict__h { font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.sh-verdict__l { margin: 0; padding-left: 16px; font-size: var(--fs-xs); color: var(--text-secondary); line-height: 1.85; }
@media (max-width: 620px) { .sh-verdict { grid-template-columns: 1fr; } }

/* ---------- 服务 CTA ---------- */
.sh-cta { text-align: center; }
.sh-cta__t { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin: 0 0 8px; }
.sh-cta__d { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.8; margin: 0 0 14px; }
.sh-cta__r { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 外链列表：一行一个，带域名，方便核对是不是官方 */
.sh-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-link {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-sm);
  padding: 9px 11px; text-decoration: none; background: #fff;
  transition: border-color .15s, background .15s;
}
.sh-link:hover { border-color: var(--brand-300, #C7D2FE); background: var(--brand-50); }
.sh-link__n { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-primary); }
.sh-link__d { font-size: 11px; color: var(--text-tertiary); }
@media (max-width: 620px) { .sh-links { grid-template-columns: 1fr; } }

.sh-src { font-size: var(--fs-xs); color: var(--text-tertiary); line-height: 1.8; margin: 10px 0 0; }
/* 行内文字链接：只有 16px 高，手指点不中（ui-audit 在 5 个视口都报了）。
   用 inline-block + min-height 撑开可点区域，但**不改变视觉行距** ——
   靠 line-height 与 min-height 对齐，段落不会被顶开。 */
.sh-src a {
  color: var(--text-tertiary); text-decoration: underline;
  display: inline-block; min-height: 24px; line-height: 24px;
  vertical-align: middle;
}
