/* =====================================================================
 * 说明页（help.html）专用样式
 * 颜色全部走 styles.css 的变量，深浅色自动跟随
 * ===================================================================== */

.hp-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.hp-h1 {
  font-size: 28px;
  line-height: 1.3;
  margin: 8px 0 12px;
  color: var(--text-primary);
}

.hp-lead {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin: 0 0 22px;
}

.hp-lead b { color: var(--text-primary); }

/* ---- 目录 ---- */
.hp-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 0 0 28px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hp-toc a {
  display: block;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  line-height: 1.5;
}

.hp-toc a:hover,
.hp-toc a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* ---- 章节 ---- */
.hp-sec {
  margin: 0 0 40px;
  scroll-margin-top: 76px;
}

.hp-sec > h2 {
  font-size: 21px;
  line-height: 1.4;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
  color: var(--text-primary);
}

.hp-h3 {
  font-size: 16px;
  line-height: 1.5;
  margin: 22px 0 10px;
  color: var(--text-primary);
}

.hp-p {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.hp-p b { color: var(--text-primary); }

.hp-ul {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.hp-ul li { margin-bottom: 6px; }
.hp-ul b { color: var(--text-primary); }

.hp-ul-warn li::marker { color: #C0392B; }

/* ---- 提示块 ---- */
.hp-note {
  margin: 14px 0;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-secondary);
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.hp-note b { color: var(--text-primary); }

/* ---- 表格 ---- */
.hp-tw {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.hp-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.7;
  min-width: 640px;
}

.hp-tbl th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.hp-tbl td {
  padding: 10px 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.hp-tbl tr:last-child td { border-bottom: 0; }
.hp-tbl b { color: var(--text-primary); }

.hp-tbl code,
.hp-p code,
.hp-ul code,
.hp-note code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  /* break-all 会把人名/文件名从中间劈开（featureTable... .tx|t），只在必要时断 */
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ---- 代码（表的样例） ---- */
.hp-code {
  margin: 0 0 14px;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  white-space: pre;
}

/* ---- 联合分析分步 ---- */
.hp-step {
  margin: 0 0 18px;
  padding: 4px 0 2px 14px;
  border-left: 2px solid var(--border-strong);
}

.hp-step .hp-h3 { margin-top: 10px; }

/* ---- 术语表 ---- */
.hp-dl {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.85;
}

.hp-dl dt {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 10px;
}

.hp-dl dd {
  margin: 2px 0 0;
  color: var(--text-secondary);
}

.hp-back {
  margin: 36px 0 0;
  font-size: 14px;
}

.hp-back a { color: var(--accent); }

@media (max-width: 640px) {
  .hp-h1 { font-size: 23px; }
  .hp-sec > h2 { font-size: 18px; }
  .hp-toc { grid-template-columns: 1fr; padding: 12px; }
}

/* 第一列是「组学 / 目录 / 编号」这类短词，别让 2~3 个字被挤成两行 */
.hp-tbl td:first-child { white-space: nowrap; }
.hp-tbl td:first-child code { white-space: nowrap; }
