/* ============================================================
   dsh.textwork.cn — 子页面（安装教程 / 更新日志）
   依赖 assets/site.css 的设计变量与基础样式
   ============================================================ */

.doc-main { padding: 0 0 40px; }

/* 面包屑 */
.breadcrumb {
  padding: 18px 0 0;
  font-size: 12.5px;
  color: var(--text-faint);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.breadcrumb a:hover { color: var(--text-dim); }
.breadcrumb .sep { color: var(--line-strong); }

/* 页头 */
.doc-hero { padding: 26px 0 34px; border-bottom: 1px solid var(--line); }
.doc-hero h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800; letter-spacing: -0.4px;
}
.doc-hero h1 .grad-text { background: linear-gradient(100deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc-hero p.lead { margin-top: 16px; max-width: 760px; }

/* 通用区块 */
.doc-section { padding: 34px 0; border-bottom: 1px solid var(--line); }
.doc-section:last-of-type { border-bottom: none; }
.doc-section h2 {
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 700; margin-bottom: 8px;
}
.doc-section > .container > p.section-sub { color: var(--text-dim); font-size: 14.5px; margin-bottom: 22px; }

/* 步骤 */
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.step-list li {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,0.025);
  padding: 16px 18px;
}
.step-list .num {
  flex: none; width: 28px; height: 28px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), #5a3bf0);
}
.step-list b { display: block; font-size: 15px; margin-bottom: 3px; }
.step-list span { font-size: 13.5px; color: var(--text-dim); }
.step-list code, .code-inline {
  font-family: var(--mono); font-size: 12.5px;
  background: rgba(77,107,254,0.12); color: #a5b6ff;
  padding: 1px 6px; border-radius: 6px;
}

/* 代码块 */
.code-block {
  margin: 14px 0 0; padding: 14px 18px;
  background: #0a101f; border: 1px solid var(--line-strong); border-radius: 12px;
  font-family: var(--mono); font-size: 13px; line-height: 1.95;
  overflow-x: auto; color: #c7d6ff;
}
.code-block .c { color: var(--text-faint); }
.code-block .p { color: var(--green); }

/* 下载卡 */
.dl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.dl-card {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  padding: 18px 20px;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.dl-card:hover { border-color: rgba(77,107,254,0.75); transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0,0,0,0.4); }
.dl-card h3 { font-size: 15.5px; }
.dl-card p { font-size: 12.5px; color: var(--text-dim); }
.dl-card .btn { margin-top: 6px; align-self: flex-start; }
.dl-card .size { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }

/* FAQ */
.faq { display: grid; gap: 12px; margin: 0; }
.faq details {
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,0.025);
  padding: 14px 18px;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer; font-size: 14.5px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-faint); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 10px; font-size: 13.5px; color: var(--text-dim); }
.faq code { font-family: var(--mono); font-size: 12.5px; background: rgba(77,107,254,0.12); color: #a5b6ff; padding: 1px 6px; border-radius: 6px; }

/* 提示条 */
.note {
  margin-top: 16px; padding: 12px 16px;
  border-left: 3px solid var(--brand-2);
  background: rgba(56,189,248,0.07);
  border-radius: 0 12px 12px 0;
  font-size: 13px; color: var(--text-dim);
}
.note b { color: var(--text); }

/* 相关链接 */
.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a {
  font-size: 13.5px; padding: 9px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--text-dim); transition: all 0.2s ease;
}
.related a:hover { border-color: var(--brand); color: var(--text); background: rgba(77,107,254,0.1); }

/* 更新日志 */
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.log-item {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; background: rgba(255,255,255,0.025);
}
.log-item header { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.log-item .ver { font-family: var(--mono); font-size: 14px; color: #a5b6ff; font-weight: 600; }
.log-item .date { font-size: 12.5px; color: var(--text-faint); }
.log-item ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 13.5px; line-height: 1.9; }
.log-item .tag {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid rgba(77,107,254,0.4); background: rgba(77,107,254,0.12);
  color: #9db2ff;
}

/* 插件页 */
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.plugin-card {
  border: 1px solid var(--line-strong); border-radius: 18px;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.plugin-card:hover { border-color: rgba(77,107,254,0.7); transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,0.4); }
.plugin-card h3 { font-size: 19px; }
.plugin-card .pkg { font-family: var(--mono); font-size: 12.5px; color: #a5b6ff; }
.plugin-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.8; }
.plugin-card code { font-family: var(--mono); font-size: 12.5px; background: rgba(77,107,254,0.12); color: #a5b6ff; padding: 1px 6px; border-radius: 6px; }
.plugin-card ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 13.5px; line-height: 1.9; }
.plugin-card .links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.plugin-card .links a {
  font-size: 13px; padding: 8px 16px; border: 1px solid var(--line-strong);
  border-radius: 999px; color: var(--text-dim); transition: all 0.2s ease;
}
.plugin-card .links a:hover { border-color: var(--brand); color: var(--text); background: rgba(77,107,254,0.1); }
.plugin-card .links a.primary { background: linear-gradient(100deg, var(--brand), #5a3bf0); color: #fff; border-color: transparent; }

/* 元信息 / 能力表 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.meta-table, .feature-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.meta-table th, .meta-table td, .feature-table th, .feature-table td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top;
}
.meta-table tr:last-child th, .meta-table tr:last-child td,
.feature-table tr:last-child th, .feature-table tr:last-child td { border-bottom: none; }
.meta-table th, .feature-table th { color: var(--text); font-weight: 600; white-space: nowrap; }
.meta-table td, .feature-table td { color: var(--text-dim); }
.meta-table code, .feature-table code, .doc-section code {
  font-family: var(--mono); font-size: 12.5px; background: rgba(77,107,254,0.12);
  color: #a5b6ff; padding: 1px 6px; border-radius: 6px;
}
.meta-table a, .doc-section a { color: #9db2ff; }

/* 演示视频与图 */
.demo-video {
  width: 100%; height: auto; display: block;
  border-radius: 14px; border: 1px solid var(--line-strong); background: #0b1120;
}
.demo-figure { margin: 0; }
.demo-figure img {
  width: 100%; height: auto; display: block;
  border-radius: 14px; border: 1px solid var(--line-strong); background: #fff;
}
.demo-figure figcaption { margin-top: 10px; font-size: 12.5px; color: var(--text-faint); line-height: 1.8; }
.install-cmd { margin-top: 14px; }

@media (max-width: 560px) {
  .doc-hero { padding: 18px 0 26px; }
  .dl-cards { grid-template-columns: 1fr; }
}
