/* ============ 执行手册 ============ */
body.handbook-body {
  background: var(--bg);
}

/* 顶部粘性导航 */
.hb-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.hb-nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hb-nav .back {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  margin-right: 10px;
}
.hb-nav .back:hover { text-decoration: underline; }
.hb-nav a.sec-link {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.hb-nav a.sec-link:hover { background: #F3EDE3; color: var(--ink); }
.hb-nav a.sec-link.active {
  background: var(--primary);
  color: var(--light-on-dark);
}
.hb-nav .spacer { flex: 1; }
#reset-btn {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#reset-btn:hover { background: var(--accent); color: #fff; }

/* 正文 */
.hb-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 120px;
}
.hb-header { margin-bottom: 8px; }
.hb-header .kicker { margin-bottom: 10px; }
.hb-header h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--primary);
  margin: 0 0 14px;
}
.hb-header .meta {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.hb-header .meta span { display: block; }

.hb-section { margin-top: 52px; scroll-margin-top: 76px; }
.hb-section h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.sec-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  font-variant-numeric: tabular-nums;
}
.hb-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-soft);
  margin: 26px 0 10px;
}
.hb-section .rule { margin: 12px 0 18px; }
.hb-section p { font-size: 14px; line-height: 1.8; margin: 8px 0; }
.hb-section ol, .hb-section ul.plain { font-size: 14px; line-height: 1.8; padding-left: 22px; margin: 8px 0; }
.hb-section li { margin: 4px 0; }
.hb-section code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  background: #F6EEE2;
  border-radius: 4px;
  padding: 2px 6px;
  color: #A34E00;
  word-break: break-all;
}
.note-line { font-size: 13.5px; background: #F6F0E6; border-radius: 8px; padding: 12px 16px; }

/* 勾选项 */
.chk-list { list-style: none; margin: 14px 0 0; padding: 0; }
.chk-list li { margin: 0; }
label.chk {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.65;
  transition: background 0.15s;
}
label.chk:hover { background: #F5EFE5; }
label.chk input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid var(--primary-soft);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
label.chk input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
label.chk input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
label.chk .txt { flex: 1; transition: color 0.2s; }
label.chk input:checked ~ .txt {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(138, 126, 116, 0.6);
}
.print-mark { display: none; }

/* 表格（干净细线 + 深棕表头） */
.hb-section table.st {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 6px;
  font-size: 13px;
  color: var(--ink);
}
.hb-section table.st th {
  background: var(--primary);
  color: var(--light-on-dark);
  font-weight: 700;
  font-size: 13px;
  text-align: left;
  padding: 8px 12px;
}
.hb-section table.st td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 1.6;
  vertical-align: top;
}
.hb-section table.st td b { font-weight: 700; }

/* 打印样式 */
@media print {
  .hb-nav { display: none !important; }
  body.handbook-body { background: #fff; }
  .hb-main { padding: 0 8px 40px; max-width: 100%; }
  .hb-section { margin-top: 30px; page-break-inside: avoid; }
  label.chk { page-break-inside: avoid; }
  label.chk input { display: none; }
  .print-mark { display: inline-block; width: 20px; flex: none; font-size: 14px; }
  label.chk input:checked ~ .txt { text-decoration: none; color: var(--ink); }
  a { color: var(--ink) !important; text-decoration: none !important; }
}
