/* DisplayFusion Help / 用户手册 */
.help-hero { padding-bottom: 36px; }
.help-hero .hero-en { font-size: .55em; font-weight: 500; color: var(--color-text-mute); margin-left: 12px; letter-spacing: .02em; }
.help-hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.help-hero-meta .meta-pill {
  background: rgba(4,96,186,.08); color: var(--color-primary);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(4,96,186,.18);
}
.help-hero-meta .meta-pill strong { font-weight: 700; margin-right: 4px; }

/* 悬浮胶囊搜索（复用 advanced-settings 的样式逻辑） */
.help-search-pill {
  position: fixed;
  top: 82px;
  left: 50%; transform: translateX(-50%);
  z-index: 30;
  width: min(440px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 16px;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  box-shadow: 0 6px 24px -8px rgba(15,23,42,.18), 0 2px 6px -2px rgba(15,23,42,.08);
  transition: width .18s ease, box-shadow .18s ease, top .18s ease;
}
.help-search-pill:hover { box-shadow: 0 10px 28px -8px rgba(15,23,42,.22), 0 3px 8px -2px rgba(15,23,42,.1); }
.help-search-pill:focus-within {
  width: min(560px, calc(100vw - 32px));
  border-color: rgba(4,96,186,.4);
  box-shadow: 0 12px 32px -8px rgba(4,96,186,.28), 0 0 0 4px rgba(4,96,186,.1);
}
.help-search-pill svg.search-icon { width: 16px; height: 16px; color: var(--color-text-mute); flex-shrink: 0; }
.help-search-pill input {
  flex: 1; min-width: 0; height: 28px;
  border: 0; outline: 0; background: transparent; color: var(--color-text);
  font-size: 13.5px; font-family: inherit; padding: 0;
}
.help-search-pill input::placeholder { color: #94a3b8; }
.help-search-pill .clear-btn {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%; border: 0; background: #e2e8f0; color: #475569;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.help-search-pill .clear-btn:hover { background: #cbd5e1; }
.help-search-pill .kbd {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px; font-weight: 600; color: #64748b;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 5px;
  padding: 2px 6px; flex-shrink: 0;
}
.help-search-pill:focus-within .kbd { display: none; }
.help-search-pill.scrolled { top: 76px; background: rgba(255,255,255,.94); }

/* 主体布局 */
.help-layout {
  max-width: 1280px; margin: 0 auto;
  padding: 32px 32px 80px;
  display: grid; grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: flex-start;
}

/* 左侧 TOC */
.help-toc {
  position: sticky; top: 140px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}
.help-toc::-webkit-scrollbar { width: 4px; }
.help-toc::-webkit-scrollbar-thumb { background: rgba(15,23,42,.18); border-radius: 4px; }

.help-toc-group { margin-bottom: 18px; }
.help-toc-group-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--color-text-mute); text-transform: uppercase;
  margin: 0 0 8px; padding: 0 8px;
}
.help-toc a {
  display: block;
  padding: 5px 12px;
  font-size: 13px; line-height: 1.5;
  color: var(--color-text);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all .12s;
}
.help-toc a:hover { background: #eff6ff; color: var(--color-primary); }
.help-toc a.active {
  background: #eff6ff;
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

/* 内容区 */
.help-main { min-width: 0; max-width: 880px; }
.help-section { scroll-margin-top: 130px; margin-bottom: 56px; }
.help-section:first-child { margin-top: 0; }
.help-section h2 {
  font-size: 26px; font-weight: 700;
  letter-spacing: -.3px; color: var(--color-text);
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
}
.help-section h2 .en {
  display: block;
  font-size: 13px; font-weight: 400;
  color: var(--color-text-mute);
  margin-top: 4px; letter-spacing: 0;
}
.help-section .lead {
  font-size: 15px; line-height: 1.8;
  color: var(--color-text); margin: 14px 0 18px;
}
.help-section img {
  display: block;
  max-width: 100%; height: auto;
  margin: 16px 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: zoom-in;
}
.help-section ul {
  margin: 12px 0 16px;
  padding-left: 22px;
  list-style: none;
}
.help-section ul li {
  position: relative;
  font-size: 14px; line-height: 1.75;
  margin-bottom: 8px;
  color: var(--color-text);
}
.help-section ul li::before {
  content: "";
  position: absolute;
  left: -16px; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}
.help-section ul li strong { color: var(--color-text); font-weight: 600; }
.help-section ul ul { margin: 8px 0 4px; }
.help-section ul ul li::before { background: #cbd5e1; }
.help-section p { font-size: 14.5px; line-height: 1.8; margin: 10px 0; }
.help-section code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  background: #f1f5f9; padding: 2px 6px; border-radius: 4px;
  color: var(--color-primary-dark, #0a4d92);
}
.help-section a { color: var(--color-primary); text-decoration: none; border-bottom: 1px dotted rgba(4,96,186,.4); }
.help-section a:hover { border-bottom-color: var(--color-primary); }
.help-section strong { color: var(--color-text); font-weight: 600; }

.help-tip {
  margin: 14px 0;
  padding: 12px 16px;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  font-size: 13.5px; line-height: 1.7;
  color: #78350f;
}
.help-note {
  margin: 14px 0;
  padding: 12px 16px;
  background: #eff6ff;
  border-left: 3px solid var(--color-primary);
  border-radius: 6px;
  font-size: 13.5px; line-height: 1.7;
  color: #1e3a8a;
}

/* Lightbox */
.help-lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.85);
  cursor: zoom-out;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.help-lightbox.open { display: flex; }
.help-lightbox img { max-width: 92vw; max-height: 88vh; box-shadow: 0 20px 60px rgba(0,0,0,.6); border-radius: 8px; }

/* Mobile */
@media (max-width: 980px) {
  .help-layout { grid-template-columns: 1fr; padding: 24px 18px 60px; }
  .help-toc {
    position: static; max-height: none; overflow: visible;
    padding-right: 0; margin-bottom: 14px;
  }
  .help-toc-group { margin-bottom: 10px; }
  .help-toc a { padding: 6px 12px; border-left: 0; border-radius: 6px; font-size: 13.5px; }
  .help-search-pill { top: 72px; width: calc(100vw - 24px); }
  .help-search-pill .kbd { display: none; }
}
@media (max-width: 560px) {
  .help-section h2 { font-size: 22px; }
  .help-section { margin-bottom: 40px; }
}
