/* ==========================================================================
   detail.css — 工具详情页样式（一张纸版）
   --------------------------------------------------------------------------
   结构：.dt-page > .dt-wrap > .dt-sheet
           ├ .dt-hero      头部：面包屑 / 标题 + 参数标签 + 操作按钮
           ├ .dt-ws        工具自己的工作区（{% block tool_body %} 的内容）
           ├ .dt-doc       说明区：工具介绍 / 核心功能 / 使用方法 / 常见问题 / 更新日志
           └ .dt-rel       相关工具推荐
   整页只有一张白纸，内部只用 1px 细线分区：没有并排卡片、没有右侧悬浮栏。
   表单控件外观全部来自控件库（ui-kit.css / ui-form.css），本文件只管排版。
   ========================================================================== */

/* ---------- 1. 页面与纸面 ----------
   容器口径与栏目页（.page-wrap）完全一致：同样的 max-width 与 --page-gutter，
   内容左右边缘和栏目页的卡片网格对齐。
   纸面本身没有边框 / 圆角 / 阴影 —— 白底页面上下就是同一张纸，
   分区只靠内部 1px 细线。 */
.dt-page { background: var(--body-bg); }
.dt-wrap {
  max-width: var(--max-width); margin: 0 auto;
  padding: 20px var(--page-gutter) 56px;
}
.dt-sheet { background: transparent; border: 0; border-radius: 0; box-shadow: none; }

/* ---------- 2. 头部（紧凑：面包屑 + 一行标题/标签/操作） ---------- */
.tool-header {
  padding: 6px 0 14px;
  border-bottom: 1px solid var(--gray-200);
}
.dt-crumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px; line-height: 1.6; color: var(--gray-500);
  margin-bottom: 7px;
}
.dt-crumb a { color: var(--gray-500); transition: color .16s ease; }
.dt-crumb a:hover { color: var(--blue-700); }
.dt-crumb .dt-sep { color: var(--gray-300); }
.dt-hrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dt-hrow h1 {
  margin: 0; font-size: 23px; font-weight: 700; line-height: 1.35;
  letter-spacing: -.02em; color: var(--gray-900);
}
/* 参数标签行（工具页可在 {% block tool_badges %} 里追加 .itx-badge） */
.tool-header-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 12px; color: var(--gray-500);
}
.dt-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 999px; background: var(--surface-3); color: var(--gray-700);
  font-size: 11.5px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.dt-dim { color: var(--gray-500); font-variant-numeric: tabular-nums; }
.dt-hrow .dt-acts { margin-left: auto; display: flex; align-items: center; gap: 4px; }

/* 收藏按钮：胶囊，未收藏描边、已收藏红底 */
.dt-fav {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border: 1px solid var(--gray-200); border-radius: 999px;
  background: var(--surface); color: var(--gray-700);
  font-size: 12.5px; font-weight: 500; line-height: 1;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.dt-fav:hover { border-color: var(--red-500); color: var(--red-500); background: var(--tint-red); }
.dt-fav .heart { transition: transform .2s ease; fill: none; flex: none; }
.dt-fav .fav-count {
  font-size: 11px; font-weight: 400; color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}
.dt-fav.on { border-color: var(--red-500); color: var(--red-500); background: var(--tint-red); }
.dt-fav.on .heart { fill: currentColor; transform: scale(1.1); }
.dt-fav.on .fav-count { color: var(--red-500); }

/* 分享 / 扫码 / 反馈：图标按钮 */
.dt-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-600); transition: background .16s ease, color .16s ease;
}
.dt-icon:hover { background: var(--surface-3); color: var(--blue-700); }

/* 评分（部分工具页在用） */
.tool-score { display: inline-flex; align-items: center; gap: 6px; color: var(--gray-500); }
.tool-score .ui-rate { gap: 1px; }
.tool-score .ui-rate > i { width: 14px; height: 14px; }
.tool-score .ui-rate > i:hover { transform: none; }
.tool-score .rate-out { font-style: normal; color: var(--gray-500); }

/* 能力标签：工具页在 {% block tool_badges %} 里写 span.itx-badge.色 */
.tool-header-meta .itx-badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--gray-700);
  font-size: 11.5px; font-weight: 500; line-height: 1;
  white-space: nowrap; letter-spacing: .1px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}
.tool-header-meta .itx-badge .ui-i { width: 12px; height: 12px; opacity: .9; }

/* ---------- 3. 工作区（工具自己的界面，纸面上的一块，不再单独成卡） ---------- */
.tool-workspace {
  padding: 18px 0 22px;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  margin: 0;
}
.tool-workspace textarea, .tool-workspace input { max-width: 100%; }
.tool-demo { min-height: 220px; }
.tool-demo textarea { width: 100%; min-height: 180px; padding: 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.tool-result { padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); white-space: pre-wrap; }
/* 少数老页面用标签页：把标签条压成纸面上的一条，不再单独做底色块 */
.tool-workspace .ws-tabs {
  padding: 0; margin: 0 0 16px;
  background: transparent; border-bottom: 1px solid var(--gray-200);
  border-radius: 0;
}
.tool-workspace .ws-tabs .ui-tab { padding: 10px 14px; font-size: 14px; }
.tool-workspace .ws-pane { padding: 0; }
.workspace-body { padding: 0; }
.tool-workspace .ui-upload { margin-bottom: 22px; }

/* ---------- 4. 表单排版（控件外观全部来自控件库） ---------- */
.form-section { margin-bottom: 24px; }
.form-section-title {
  font-size: 14px; font-weight: 600; margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 8px;
}
.form-section-title::before { content: ''; width: 3px; height: 15px; background: var(--blue-500); border-radius: 2px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.form-label .required { color: var(--red-500); margin-left: 2px; }
.form-label .val { font-family: var(--font-mono); font-weight: 600; color: var(--blue-700); }
.form-hint { font-size: 12px; color: var(--gray-500); }
.form-group .ui-panel { max-width: 320px; }

.choice-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-wrap .ui-choice-btn { height: 34px; }

.switch-list { margin-top: 16px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--gray-100);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info .t-name { font-size: 14px; font-weight: 500; }
.toggle-info .t-desc { font-size: 12px; color: var(--gray-500); }

/* 操作条与结果区（老页面在用） */
.action-bar {
  display: flex; gap: 12px; padding: 16px 0 0;
  background: transparent; border-top: 1px solid var(--gray-100); margin-top: 16px;
}
.action-bar .ui-btn.grow { flex: 1; }
.result-area {
  margin: 16px 0 0; padding: 18px; background: var(--surface-2);
  border-radius: var(--radius-sm); border: 1px solid var(--gray-200);
  text-align: center; display: none;
}
.result-area.show { display: block; }
.result-area h4 {
  font-size: 15px; font-weight: 600; margin-bottom: 14px; color: var(--green-500);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.result-item { background: var(--surface); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.result-item .ri-icon { font-size: 26px; margin-bottom: 8px; }
.result-item .ri-name { font-size: 12px; font-weight: 500; margin-bottom: 2px; word-break: break-all; }
.result-item .ri-size { font-size: 11px; color: var(--gray-500); }

/* ---------- 5. 说明区：纸面上的一段一段，只有横线，没有卡片 ---------- */
.dt-doc { padding: 0; }
.detail-section:last-child { border-bottom: 0; }
/* 正文左侧一条深灰竖条（照参考站 tool.bugscaner.com 的做法）：
   竖条只伴随正文，标题那一行没有竖条，段与段之间也不相连。
   实现：竖条绝对定位在区块左缘，标题用自带底色把它那一段盖掉 ——
   标题换行、变长都不会错位，也不用给 244 个工具页的内容再套一层容器。 */
.detail-section {
  position: relative; overflow: visible;
  padding: 40px 0 40px 24px; margin: 0;
  border-top: 1px solid var(--gray-200);
  border-left: 0;
  background: transparent; border-radius: 0; box-shadow: none;
}
.detail-section::before {
  content: ''; position: absolute; left: 0; top: 40px; bottom: 40px;
  width: 3px; background: var(--dt-bar); z-index: 0;
}
.detail-section > h2:first-child {
  position: relative; z-index: 1;
  margin: 0 0 0 -24px; padding-left: 0; padding-bottom: 20px;
  background: var(--body-bg);
}
.detail-section h2 {
  font-size: 21px; font-weight: 600; margin: 0 0 14px;
  letter-spacing: -.01em; color: #333333;
  padding: 0; border: 0; display: block;
}
.detail-section p {
  font-size: 14.5px; color: var(--gray-700); line-height: 1.9;
  margin: 0 0 10px; max-width: 60em;
}
.detail-section > :last-child { margin-bottom: 0; }
.detail-section ul, .detail-section ol { padding-left: 20px; margin: 0 0 10px; max-width: 60em; }
.detail-section li { font-size: 14.5px; color: var(--gray-700); line-height: 1.9; margin-bottom: 4px; }
.detail-section strong, .detail-section b { color: var(--gray-900); font-weight: 600; }
.detail-section code {
  font-family: var(--font-mono); font-size: 12.5px; padding: 1px 5px; border-radius: 4px;
  background: var(--surface-3); color: var(--gray-900);
}
.detail-section table { width: 100%; max-width: 60em; border-collapse: collapse; font-size: 13.5px; }
.detail-section th, .detail-section td { padding: 9px 12px; border-bottom: 1px solid var(--gray-100); text-align: left; }
.detail-section th { font-weight: 600; color: var(--gray-700); background: var(--surface-2); }

.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; margin-top: 2px; }
.feature-item { display: flex; gap: 11px; padding: 0; background: none; border: 0; }
.feature-item:hover { transform: none; border-color: transparent; box-shadow: none; }
.feature-item .fi-ico {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: var(--surface-3); color: var(--gray-700);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.feature-item .fi-n { font-size: 13.5px; font-weight: 600; color: var(--gray-900); line-height: 1.5; }
.feature-item .fi-d { font-size: 12.5px; color: var(--gray-600); line-height: 1.6; }

/* 5.0 工具页正文里的小标题：老页面给 h3 写了内联的左侧彩条 / 缩进，
   在新的纸面排版里会像多出来一个项目符号，这里统一收掉（只动内联那两条）。 */
.detail-section h3 {
  font-size: 14.5px; font-weight: 600; color: var(--gray-900);
  margin: 20px 0 8px; padding: 0; border: 0; line-height: 1.6;
}
.detail-section h3[style] { border-left: 0 !important; padding-left: 0 !important; }
.detail-section h4 { font-size: 13.5px; font-weight: 600; color: var(--gray-700); margin: 16px 0 6px; }

/* 5.1 常见问题：提问加粗、回答常规，靠细线分隔 */
.faq-list { margin-top: 2px; }
.faq-item { padding: 0 0 12px; margin: 0 0 12px; border-bottom: 1px solid var(--gray-100); }
.faq-item:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.faq-item .q { font-size: 14px; font-weight: 600; color: var(--gray-900); line-height: 1.8; }
.faq-item .a { font-size: 14px; color: var(--gray-600); line-height: 1.85; }

/* 5.2 更新日志：单列时间轴，与正文同一左起线 */
.detail-section .ui-timeline { padding-left: 20px; margin-top: 4px; }
.detail-section .ui-timeline::before { left: 4px; top: 7px; bottom: 7px; }
.detail-section .ui-tl-item { padding-bottom: 14px; }
.detail-section .ui-tl-item:last-child { padding-bottom: 0; }
.detail-section .ui-tl-item::before { left: -20px; top: 6px; width: 9px; height: 9px; border-width: 2px; }
.detail-section .ui-tl-item.primary::before { box-shadow: 0 0 0 3px var(--blue-50); }
.detail-section .ui-tl-time { font-size: 11.5px; letter-spacing: .02em; color: var(--gray-500); }
.detail-section .ui-tl-title { font-size: 14px; font-weight: 600; color: var(--gray-700); line-height: 1.7; }
.detail-section .ui-tl-text { font-size: 13px; color: var(--gray-600); line-height: 1.8; margin-top: 1px; }

/* ---------- 6. 相关工具推荐 ---------- */
.dt-rel { padding: 40px 0 32px; border-top: 1px solid var(--gray-200); }
.dt-rel h2 {
  font-size: 21px; font-weight: 600; margin: 0 0 18px;
  letter-spacing: -.01em; color: #333333;
}
.dt-rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 26px; }
.dt-rel-empty { font-size: 13px; color: var(--gray-500); }

.related-tool {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; margin: 0 -8px; border-radius: 8px;
  transition: background .16s ease;
}
.related-tool:hover { background: var(--surface-2); }
.related-tool:hover .rt-name { color: var(--blue-700); }
.rt-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: var(--surface-3);
}
.rt-icon svg { width: 18px; height: 18px; display: block; stroke-width: 1.7; }
.rt-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.rt-name {
  display: block; font-size: 13px; font-weight: 500; line-height: 1.4;
  color: var(--gray-900); transition: color .16s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rt-cat {
  display: block; font-size: 11.5px; color: var(--gray-500); line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 7. 弹层 ---------- */
.qr-box {
  width: 176px; height: 176px; margin: 0 auto;
  padding: 9px; background: var(--surface);
  border: 1px solid var(--gray-200); border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-tip { font-size: 11.5px; color: var(--gray-500); margin-top: 12px; }
.fb-types { margin-bottom: 12px; }

/* 宽屏（≥1280）：横向空间用起来 —— 核心功能三列、相关工具四列。
   正文仍保持 56em，中文一行不至于太长。 */
@media (min-width: 1280px) {
  .feature-list { grid-template-columns: repeat(3, 1fr); gap: 16px 28px; }
  .dt-rel-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1100px) {
  .dt-rel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dt-wrap { padding: 16px 16px 44px; }
  .tool-header { padding-top: 0; }
  .dt-hrow h1 { font-size: 20px; }
}
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .feature-list { grid-template-columns: 1fr; gap: 14px; }
  .dt-rel-grid { grid-template-columns: 1fr; }
  .dt-hrow .dt-acts { margin-left: 0; width: 100%; }
  .action-bar { flex-direction: column-reverse; }
  .action-bar .ui-btn { width: 100%; }
  .detail-section { padding: 28px 0 28px 18px; }
  .detail-section::before { top: 28px; bottom: 28px; width: 2px; }
  .detail-section > h2:first-child { margin: 0 0 0 -18px; padding-left: 0; padding-bottom: 14px; }
  .detail-section h2, .dt-rel h2 { font-size: 18px; }
}
@media (max-width: 560px) {
  .dt-hrow h1 { font-size: 18.5px; }
  /* 窄屏只保留「收藏」两字，数量让位给按钮宽度 */
  .dt-fav .fav-count { display: none; }
  .dt-fav { padding: 0 12px; }
  .result-grid { grid-template-columns: 1fr; }
  .tool-workspace .ws-tabs .ui-tab { padding: 9px 12px; font-size: 13px; }
}
/* 触屏设备没有 hover，取消收藏按钮常驻可见 */
@media (hover: none) {
  .fav-del { opacity: .6; }
}

/* ---------- 9. 颜色契约：能力标签按语义着色（其余保持中性） ---------- */
.tool-header-meta .itx-badge { --badge-accent: var(--primary); }
.tool-header-meta .itx-badge:nth-child(2), .tool-header-meta .itx-badge.green { --badge-accent: var(--green-500); }
.tool-header-meta .itx-badge.amber { --badge-accent: var(--yellow-500); }
.tool-header-meta .itx-badge.violet { --badge-accent: var(--detail-badge-violet); }
.tool-header-meta .itx-badge.blue { --badge-accent: var(--primary); }
html .tool-header-meta .itx-badge,
html[data-theme="dark"] .tool-header-meta .itx-badge.violet {
  background: color-mix(in srgb, var(--badge-accent) 10%, var(--surface));
  color: color-mix(in srgb, var(--badge-accent) 55%, var(--gray-900));
  border-color: color-mix(in srgb, var(--badge-accent) 22%, var(--surface));
}

/* ==========================================================================
   10. Apple（iPhone）配色：文字三档墨色 + 一组系统色
   --------------------------------------------------------------------------
   详情页原来只有「黑 / 灰 / 蓝」三色，正文与图标全是灰底灰字，读起来发闷。
   这里换成 Apple 官网那套：文字 #1d1d1f → #424245 → #6e6e73 三档，
   图标用系统色（蓝/橙/紫/绿/粉/青）区分，底色只给 12% 的淡染，不抢内容。
   只作用于 .dt-page，站点其它页面与控件库配色不受影响。
   ========================================================================== */
.dt-page {
  --ap-ink: #1d1d1f;      /* 标题、正文重点 */
  --ap-ink-2: #424245;    /* 正文 */
  --ap-muted: #6e6e73;    /* 辅助信息 */
  --ap-hair: #e8e8ed;     /* 分隔线 */
  --ap-fill: #f5f5f7;     /* 极浅底 */
  --ap-blue: #0071e3;
  --ap-indigo: #5856d6;
  --ap-purple: #af52de;
  --ap-pink: #ff2d55;
  --ap-red: #ff3b30;
  --ap-orange: #ff9500;
  --ap-green: #34c759;
  --ap-teal: #30b0c7;
  --dt-bar: #494747;      /* 与参考站同色 */
}
html[data-theme="dark"] .dt-page {
  --ap-ink: #f5f5f7;
  --ap-ink-2: #d2d2d7;
  --ap-muted: #a1a1a6;
  --ap-hair: #2c2c2e;
  --ap-fill: #1c1c1e;
  --ap-blue: #0a84ff;
  --ap-indigo: #5e5ce6;
  --ap-purple: #bf5af2;
  --ap-pink: #ff375f;
  --ap-red: #ff453a;
  --ap-orange: #ff9f0a;
  --ap-green: #30d158;
  --ap-teal: #64d2ff;
  --dt-bar: #8e8e93;
}

/* 文字：三档墨色 */
.dt-crumb, .dt-crumb a { color: var(--ap-muted); }
.dt-crumb a:hover { color: var(--ap-blue); }
.dt-crumb .dt-sep { color: var(--ap-hair); }
.dt-hrow h1 { color: var(--ap-ink); }
.tool-header-meta { color: var(--ap-muted); }
.dt-tag { background: var(--ap-fill); color: var(--ap-ink-2); }
/* 文字：说明区按参考站的双色方案（h2 #333 / 正文与竖条同色 #494747），
   其余辅助文字仍走 Apple 灰阶 */
.detail-section h2, .dt-rel h2 { color: #333333; }
.detail-section h3 { color: #333333; }
.detail-section strong, .detail-section b { color: #333333; }
.detail-section p, .detail-section li { color: #494747; }
.detail-section h4 { color: var(--ap-ink-2); }
.detail-section a { color: var(--ap-blue); }
.detail-section code { background: var(--ap-fill); color: #333333; }
.faq-item .q { color: #333333; }
.faq-item .a { color: #494747; }
.feature-item .fi-n { color: #333333; }
.feature-item .fi-d { color: var(--ap-muted); }
.rt-name { color: var(--ap-ink); }
.rt-cat { color: var(--ap-muted); }
.dt-rel-empty { color: var(--ap-muted); }
.related-tool:hover .rt-name { color: var(--ap-blue); }
.detail-section .ui-tl-title { color: var(--ap-ink-2); }
.detail-section .ui-tl-text, .detail-section .ui-tl-time { color: var(--ap-muted); }
.detail-section th, .detail-section td { border-bottom-color: var(--ap-hair); }
.detail-section th { background: var(--ap-fill); color: #333333; }
html[data-theme="dark"] .detail-section h2, html[data-theme="dark"] .dt-rel h2,
html[data-theme="dark"] .detail-section h3,
html[data-theme="dark"] .detail-section strong, html[data-theme="dark"] .detail-section b,
html[data-theme="dark"] .faq-item .q, html[data-theme="dark"] .feature-item .fi-n,
html[data-theme="dark"] .detail-section th { color: var(--ap-ink); }
html[data-theme="dark"] .detail-section p, html[data-theme="dark"] .detail-section li,
html[data-theme="dark"] .faq-item .a { color: var(--ap-ink-2); }

/* 核心功能图标：六色轮转，底色只做 12% 淡染 */
.feature-item { --fi-c: var(--ap-blue); }
.feature-item:nth-child(6n+2) { --fi-c: var(--ap-orange); }
.feature-item:nth-child(6n+3) { --fi-c: var(--ap-purple); }
.feature-item:nth-child(6n+4) { --fi-c: var(--ap-green); }
.feature-item:nth-child(6n+5) { --fi-c: var(--ap-pink); }
.feature-item:nth-child(6n) { --fi-c: var(--ap-teal); }
.feature-item .fi-ico {
  background: color-mix(in srgb, var(--fi-c) 13%, transparent);
  color: var(--fi-c);
}

/* 相关工具图标：同一工具始终同色（按 id 落到 6 个色位），一屏里自然有层次 */
.rt-icon { background: color-mix(in srgb, var(--rt-c, var(--ap-blue)) 12%, transparent); color: var(--rt-c, var(--ap-blue)); }
.rt-c0 { --rt-c: var(--ap-blue); }
.rt-c1 { --rt-c: var(--ap-indigo); }
.rt-c2 { --rt-c: var(--ap-purple); }
.rt-c3 { --rt-c: var(--ap-teal); }
.rt-c4 { --rt-c: var(--ap-orange); }
.rt-c5 { --rt-c: var(--ap-green); }

/* 收藏 / 分享等头部小按钮：走系统红与系统蓝 */
.dt-fav:hover, .dt-fav.on { border-color: var(--ap-red); color: var(--ap-red); background: color-mix(in srgb, var(--ap-red) 8%, transparent); }
.dt-fav.on .fav-count { color: var(--ap-red); }
.dt-icon:hover { color: var(--ap-blue); }

/* 顶部能力标签：三个一组的彩色胶囊（蓝 / 绿 / 紫），比原来的灰底灰字更像 iOS 标签 */
.dt-page .tool-header-meta .itx-badge { --badge-accent: var(--ap-blue); }
.dt-page .tool-header-meta .itx-badge:nth-child(2) { --badge-accent: var(--ap-green); }
.dt-page .tool-header-meta .itx-badge:nth-child(3) { --badge-accent: var(--ap-purple); }
.dt-page .tool-header-meta .itx-badge:nth-child(4) { --badge-accent: var(--ap-orange); }
.dt-page .tool-header-meta .itx-badge:nth-child(5) { --badge-accent: var(--ap-teal); }
.dt-page .tool-header-meta .itx-badge.blue { --badge-accent: var(--ap-blue); }
.dt-page .tool-header-meta .itx-badge.green { --badge-accent: var(--ap-green); }
.dt-page .tool-header-meta .itx-badge.violet { --badge-accent: var(--ap-purple); }
.dt-page .tool-header-meta .itx-badge.amber { --badge-accent: var(--ap-orange); }
.dt-page .tool-header-meta .itx-badge {
  background: color-mix(in srgb, var(--badge-accent) 12%, transparent);
  color: color-mix(in srgb, var(--badge-accent) 72%, var(--ap-ink));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--badge-accent) 20%, transparent);
}

/* ==========================================================================
   11. 净化版（参考 uiedtool.com 实测）：白页 + 白卡 + 单主色
   --------------------------------------------------------------------------
   A 层次：页面纯白；工作区 / 说明区各小节 / 相关工具 = 白卡
           （14px 圆角 + 1px 浅灰描边 + 极轻阴影），替代 1px 横线分区。
   B 配色：全详情页只留一个主色 --dt-accent（紫 #6c54ff，深色 #8b7bff），
           功能图标 / 相关工具图标 / 链接 / 选择器高亮全部收敛到这一个色。
   C 按钮：主按钮实色主色、软按钮中性灰、soft.red 保留红色危险语义。
   D 输入框：白底 + #d1d5db 描边 + 8px 圆角（深色模式回退主题线色）。
   E 层级：h1 30px 居中，h2 降回 17px，拉开标题对比。
   F 减碎件：头部能力标签 / dt-tag 胶囊压平成一行灰色小字（·分隔）。
   G 设置区：.tp-opts 短控件两列网格，长控件（滑块 / 宽输入 / 上传）独占整行。
   只作用于 .dt-page，栏目页 / 首页 / 控件库不受影响。
   ========================================================================== */
.dt-page {
  --dt-card: #ffffff;
  --dt-card-line: #ececf0;
  --dt-card-shadow: 0 1px 2px rgba(17, 24, 39, .04);
  --dt-accent: #6c54ff;
  --dt-danger: #f56c6c;
  --dt-input-line: #d1d5db;
  --ui-primary: var(--dt-accent);   /* 让 ui-kit 的选中 / 聚焦 / 开关等跟随主色 */
}
html[data-theme="dark"] .dt-page {
  --dt-card: var(--ap-fill);
  --dt-card-line: var(--ap-hair);
  --dt-card-shadow: none;
  --dt-accent: #8b7bff;
  --dt-danger: #ff7875;
  --dt-input-line: var(--ap-hair);
}

/* ---- A. 头部：居中大标题，胶囊压平成一行小字；面包屑靠左；收藏行并入 meta 行 ---- */
.dt-page .tool-header { padding: 8px 0 20px; border-bottom: 0; text-align: center; }
.dt-page .dt-crumb { justify-content: flex-start; text-align: left; }
.dt-page .dt-hrow {
  flex-direction: row; flex-wrap: wrap;
  justify-content: center; align-items: center; gap: 10px 12px;
}
.dt-page .dt-hrow h1 { flex: 0 0 100%; font-size: 30px; }   /* 标题独占一行居中，第二行 = meta + 收藏 */
.dt-page .dt-hrow .dt-acts { margin-left: 0; width: auto; }
.dt-page .dt-tag {
  background: transparent; height: auto; padding: 0;
  color: var(--ap-muted); font-weight: 400;
}
.dt-page .dt-tag + .dt-tag::before { content: '·'; margin-right: 8px; color: var(--dt-card-line); }
.dt-page .tool-header-meta .itx-badge {
  background: transparent; height: auto; padding: 0;
  color: var(--ap-muted); font-weight: 400;
  box-shadow: none;
}
.dt-page .tool-header-meta .itx-badge + .itx-badge::before { content: '·'; margin-right: 8px; color: var(--dt-card-line); }
html[data-theme="dark"] .dt-page .dt-tag,
html[data-theme="dark"] .dt-page .tool-header-meta .itx-badge { color: var(--ap-muted); }

/* ---- A2. 不用白卡：回退「一张纸 + 1px 细线」版式（第 3/5/6 节的规则直接生效） ---- */

/* ---- E. 标题层级 ---- */
.dt-page .detail-section h2, .dt-page .dt-rel h2 { font-size: 17px; }

/* ---- B. 单主色 ---- */
.dt-page .feature-item { --fi-c: var(--dt-accent); }
.dt-page .rt-icon { --rt-c: var(--dt-accent); }
.dt-page .detail-section a { color: var(--dt-accent); }
.dt-page .dt-crumb a:hover { color: var(--dt-accent); }
.dt-page .related-tool:hover .rt-name { color: var(--dt-accent); }
.dt-page .dt-icon:hover { color: var(--dt-accent); }
.dt-page .form-section-title::before { background: var(--dt-accent); }
.dt-page .detail-section .ui-tl-item.primary::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--dt-accent) 14%, transparent); }

/* ---- C. 按钮体系 ---- */
.dt-page .ui-btn.primary {
  background: var(--dt-accent); color: #fff; box-shadow: none;
}
.dt-page .ui-btn.primary:hover {
  background: color-mix(in srgb, var(--dt-accent) 86%, #000);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--dt-accent) 24%, transparent);
  transform: translateY(-1px);
}
.dt-page .ui-btn.soft { background: #f1f3f5; color: #374151; box-shadow: none; }
.dt-page .ui-btn.soft:hover { background: #e9ecef; }
.dt-page .ui-btn.soft.red { background: color-mix(in srgb, var(--dt-danger) 9%, #fff); color: var(--dt-danger); }
.dt-page .ui-btn.soft.red:hover { background: color-mix(in srgb, var(--dt-danger) 16%, #fff); }
html[data-theme="dark"] .dt-page .ui-btn.soft { background: var(--ap-hair); color: var(--ap-ink-2); }
html[data-theme="dark"] .dt-page .ui-btn.soft:hover { background: #38383c; }
html[data-theme="dark"] .dt-page .ui-btn.soft.red { background: color-mix(in srgb, var(--dt-danger) 16%, var(--dt-card)); color: var(--dt-danger); }

/* ---- D. 输入框 ---- */
.dt-page .ui-input, .dt-page .ui-textarea, .dt-page .ui-select > .ui-select-trigger {
  border-color: var(--dt-input-line); border-radius: 8px;
}
/* 聚焦时边框转透明，交给 --ui-focus 的 2px 纯色圈（与 ui-kit 范本一致） */
.dt-page .ui-input:focus-within, .dt-page .ui-textarea:focus-within { border-color: transparent; }
.dt-page .ui-input > input, .dt-page .ui-input > textarea,
.dt-page .ui-textarea > textarea, .dt-page .ui-textarea > input { font-size: 14px; }

/* ---- G. 设置区两列网格（≥761px；窄屏沿用 tool-page.css 的单列） ---- */
@media (min-width: 761px) {
  .dt-page .tp-opts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    justify-content: center;
    gap: 10px 40px;
  }
  .dt-page .tp-opt:has(.ui-slider), .dt-page .tp-opt:has(textarea),
  .dt-page .tp-opt:has(.ui-textarea), .dt-page .tp-opt:has(.ui-upload),
  .dt-page .tp-opt:has(.tp-key), .dt-page .tp-opt:has(.tp-sel-wide) { grid-column: 1 / -1; }
}

/* ---- 响应式补充 ---- */
@media (max-width: 900px) {
  .dt-page .dt-hrow h1 { font-size: 24px; }
}
@media (max-width: 768px) {
  .dt-page .dt-hrow h1 { font-size: 22px; }
}

/* ==========================================================================
   常见问题：无外边框流式折叠（默认折叠状态）
   ========================================================================== */
.detail-section .faq-list {
  margin-top: 6px;
  border: none;
  background: transparent;
}
.detail-section details.faq-item {
  border: none;
  border-bottom: 1px solid var(--gray-100);
  padding: 13px 0;
  background: transparent;
  transition: all 0.2s ease;
}
.detail-section details.faq-item:last-child {
  border-bottom: none;
}
.detail-section details.faq-item summary.faq-q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gray-800);
  user-select: none;
  padding: 2px 0;
  transition: color 0.16s ease;
}
.detail-section details.faq-item summary.faq-q::-webkit-details-marker,
.detail-section details.faq-item summary.faq-q::marker {
  display: none;
}
.detail-section details.faq-item summary.faq-q:hover {
  color: var(--blue-600);
}
.detail-section details.faq-item .caret {
  margin-left: auto;
  color: var(--gray-400);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.detail-section details.faq-item[open] summary.faq-q {
  color: var(--blue-600);
}
.detail-section details.faq-item[open] summary.faq-q .caret {
  transform: rotate(180deg);
  color: var(--blue-600);
}
.detail-section details.faq-item .faq-a {
  padding: 8px 0 4px;
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.8;
}
.detail-section details.faq-item .faq-a p {
  margin: 0;
}

html[data-theme="dark"] .detail-section details.faq-item {
  border-color: var(--ap-line, #334155);
}
html[data-theme="dark"] .detail-section details.faq-item summary.faq-q {
  color: var(--ap-ink, #f1f5f9);
}
html[data-theme="dark"] .detail-section details.faq-item summary.faq-q:hover,
html[data-theme="dark"] .detail-section details.faq-item[open] summary.faq-q {
  color: #60a5fa;
}
html[data-theme="dark"] .detail-section details.faq-item .faq-a {
  color: var(--ap-ink-2, #94a3b8);
}
