/**
 * help-doc.css — 教程正文层（仅作用于 .help-doc 根节点内）
 * v1 — 与 docs/help/*.html 配套；变量与间距可在此统一改版
 */
.help-doc {
  --doc-primary: #6f42c1;
  --doc-secondary: #007bff;
  --doc-card-bg: #fff;
  --doc-page-bg: #f8f9fa;
  --doc-text: #212529;
  --doc-sub: #495057;
  --doc-border: #dee2e6;
  --doc-shadow: rgba(0, 0, 0, 0.05);
  --doc-info-bg: #e9e5f5;
  --doc-warn: #ffc107;
  --doc-danger: #dc3545;
  --doc-btn-hover: #5a32a3;
  --doc-stack: 10px;
  --doc-card-pad: 10px 12px;
  --doc-card-gap: 10px;
  --doc-content-max: min(960px, 100%);
}

.help-doc .guide-page-wrapper {
  background-color: var(--doc-page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--doc-text);
  padding: 16px 14px 20px;
  margin: 0 -10px;
  border-radius: 0;
}

.help-doc .guide-content-container {
  max-width: var(--doc-content-max);
  margin: 0 auto;
}

.help-doc .guide-header-section {
  text-align: center;
  margin-bottom: 12px;
}

.help-doc .guide-main-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--doc-text);
  line-height: 1.25;
  letter-spacing: 0.2px;
}

.help-doc .guide-sub-title {
  font-size: 13px;
  color: var(--doc-sub);
  line-height: 1.5;
  margin: 0;
}

.help-doc .guide-notice-bar {
  background-color: var(--doc-info-bg);
  border-left: 4px solid var(--doc-primary);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: var(--doc-stack);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #3e2d6b;
}

.help-doc .guide-notice-bar svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--doc-primary);
}

.help-doc .guide-notice-bar p {
  margin: 0;
  line-height: 1.5;
}

.help-doc .method-card {
  background-color: var(--doc-card-bg);
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--doc-shadow);
  margin-bottom: var(--doc-stack);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.help-doc .method-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.help-doc .method-card--featured {
  border-top: 4px solid var(--doc-secondary);
}

.help-doc .method-card--soft-top {
  border-top: 4px solid rgba(0, 123, 255, 0.45);
}

.help-doc .method-card-header {
  padding: var(--doc-card-pad);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.help-doc .header-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.help-doc .method-card-header svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: var(--doc-primary);
  flex-shrink: 0;
}

.help-doc .method-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--doc-text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.help-doc .badge {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border-radius: 999px;
  white-space: nowrap;
}

.help-doc .badge-recommend {
  background-color: var(--doc-secondary);
}

.help-doc .badge-warn {
  background-color: var(--doc-warn);
  color: #333;
}

.help-doc .badge-danger {
  background-color: var(--doc-danger);
}

.help-doc .method-card-body {
  padding: var(--doc-card-pad);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: var(--doc-card-gap);
}

.help-doc .card-desc {
  font-size: 13px;
  color: var(--doc-sub);
  line-height: 1.5;
  margin: 0;
}

.help-doc .card-desc p {
  margin: 0 0 4px;
}

.help-doc .card-desc ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.help-doc .card-desc li {
  margin-bottom: 2px;
}

.help-doc .guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--doc-primary);
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.15s ease, transform 0.15s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.help-doc .guide-btn:hover {
  background-color: var(--doc-btn-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.help-doc .guide-btn svg {
  width: 16px;
  height: 16px;
  margin-left: 8px;
}

.help-doc .guide-btn.secondary {
  background-color: #fff;
  border: 1px solid var(--doc-border);
  color: var(--doc-sub);
}

.help-doc .guide-btn.secondary:hover {
  background-color: #f1f1f1;
  color: var(--doc-text);
}

.help-doc .help-doc-legacy {
  margin-top: var(--doc-stack);
  border: 1px dashed var(--doc-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fafafa;
}

.help-doc .help-doc-legacy > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: var(--doc-sub);
  list-style: none;
}

.help-doc .help-doc-legacy > summary::-webkit-details-marker {
  display: none;
}

.help-doc .help-doc-legacy[open] > summary {
  margin-bottom: 8px;
}

.help-doc .help-doc-legacy > .method-card {
  margin-top: 10px;
}

.help-doc .help-doc-legacy > .method-card:first-of-type {
  margin-top: 8px;
}

@media (min-width: 768px) {
  .help-doc .guide-page-wrapper {
    padding: 16px 16px;
  }

  .help-doc .guide-btn {
    width: auto;
    align-self: flex-start;
  }
}

/* ========================================================
   首页引导门户（home-portal.php）
   布局原则：卡片优先 → 折叠须知 → 历史文章
   ======================================================== */

.help-doc.help-portal .guide-content-container {
  max-width: 100%;
  margin: 0;
}
.help-doc.help-portal .guide-page-wrapper {
  margin: 0;
  max-width: 100%;
  padding-top: 16px;
  padding-bottom: 24px;
  padding-left: 0;
  padding-right: 0;
  border-radius: 0;
  background: transparent;
}

/* 一句话标语 */
.help-portal-tagline {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--doc-sub);
  letter-spacing: 0.01em;
}

/* 设备卡片网格 */
.help-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.help-portal-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--doc-border);
  background: #fff;
  text-decoration: none;
  color: var(--doc-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.help-portal-card:hover {
  border-color: var(--doc-primary);
  box-shadow: 0 4px 16px rgba(111, 66, 193, 0.13);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--doc-text);
}

.help-portal-card__icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.help-portal-card__title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.help-portal-card__arrow {
  color: var(--doc-primary);
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.14s, transform 0.14s;
}
.help-portal-card:hover .help-portal-card__arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* 使用须知折叠块 */
.help-portal-notice {
  margin-bottom: 12px;
  border: 1px solid #e8e3f5;
  border-radius: 10px;
  background: #faf8ff;
  overflow: hidden;
}
.help-portal-notice__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.12s;
}
.help-portal-notice__summary::-webkit-details-marker {
  display: none;
}
.help-portal-notice[open] > .help-portal-notice__summary {
  background: #f3eeff;
  border-bottom: 1px solid #e0d5f5;
}
.help-portal-notice__summary:hover {
  background: #f3eeff;
}
.help-portal-notice__label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--doc-primary);
  white-space: nowrap;
}
.help-portal-notice__hint {
  font-size: 12px;
  color: var(--doc-sub);
  flex: 1;
}
.help-portal-notice__body {
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--doc-text);
}
.help-portal-notice__body p {
  margin: 0 0 0.7em;
}
.help-portal-notice__body p:last-child {
  margin-bottom: 0;
}
.help-portal-notice__body a {
  color: var(--doc-primary);
  font-weight: 600;
  border-bottom: 1px solid rgba(111, 66, 193, 0.3);
  text-decoration: none;
}
.help-portal-notice__body a:hover {
  border-bottom-color: var(--doc-primary);
}

/* 历史文章折叠块 */
.help-portal-archive {
  margin-top: 4px;
  border: 1px dashed #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fafafa;
}
.help-portal-archive > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #aaa;
  list-style: none;
}
.help-portal-archive > summary::-webkit-details-marker {
  display: none;
}
.help-portal-archive[open] > summary {
  color: var(--doc-sub);
  margin-bottom: 8px;
}
.help-portal-archive__list {
  margin: 8px 0 0;
  padding-left: 1.1em;
  font-size: 13px;
  line-height: 1.5;
}
.help-portal-archive__list li {
  margin: 0.25em 0;
}
.help-portal-archive__list a {
  color: var(--doc-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.help-portal-archive__list a:hover {
  border-bottom-color: var(--doc-secondary);
}

@media (max-width: 600px) {
  .help-portal-grid {
    grid-template-columns: 1fr 1fr;
  }
  .help-portal-notice__hint {
    display: none;
  }
}

/* ========================================================
   教程安装引导页组件（windows / macos / android / ios 通用）
   ======================================================== */

/* 英雄区：标题 + 标签 + 副标题 */
.install-hero {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--doc-border);
}
.install-hero__badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--doc-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.install-hero__sub {
  margin: 0;
  font-size: 14px;
  color: var(--doc-sub);
  line-height: 1.6;
}

/* 步骤列表 */
.install-steps {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.install-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f2f2f5;
}
.install-step:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}
.install-step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--doc-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.install-step__content {
  flex: 1;
}
.install-step__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--doc-text);
  line-height: 1.3;
}
.install-step__desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--doc-sub);
  line-height: 1.55;
}

/* 主 CTA 按钮（全宽，更突出） */
.install-cta-btn {
  display: flex !important;
  justify-content: center;
  font-size: 15px !important;
  padding: 13px 20px !important;
  border-radius: 10px !important;
  margin-bottom: 8px;
  box-shadow: 0 3px 12px rgba(111, 66, 193, 0.25);
}
.install-cta-btn:hover {
  box-shadow: 0 5px 18px rgba(111, 66, 193, 0.35) !important;
  transform: translateY(-1px);
}
.install-cta-note {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  margin: 0 0 18px;
}

/* 遇到问题提示条 */
.install-faq-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: #f8f9fc;
  border: 1px solid #e8e8ee;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--doc-sub);
  line-height: 1.5;
  margin-bottom: 18px;
}
.install-faq-tip__icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.install-faq-tip strong {
  color: var(--doc-text);
}

@media (min-width: 768px) {
  .install-steps {
    gap: 0;
  }
}

/* 旧方案区块：直接展示（不折叠），顶部红色警示线 + 不推荐标识 */
.install-legacy {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 2px dashed #fcc;
}
.install-legacy__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--doc-sub);
  line-height: 1.4;
}
.install-legacy .method-card {
  margin-bottom: var(--doc-card-gap);
}
.install-legacy .method-card:last-child {
  margin-bottom: 0;
}
