.guides-page {
  --guides-surface: #ffffff;
  --guides-surface-muted: #f8faf9;
  --guides-border: #dfe7e2;
  --guides-text-soft: #526158;
  min-width: 0;
  background: #f3f6f4;
}

.guides-main {
  padding: 7.25rem 1.5rem 4.5rem;
}

.guides-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2rem;
  width: min(1180px, 100%);
  margin: 0 auto;
  align-items: start;
}

.guides-sidebar {
  position: sticky;
  top: 6.5rem;
  min-width: 0;
}

.guides-list-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border: 1px solid var(--guides-border);
  border-radius: 0.75rem;
  background: var(--guides-surface);
  color: var(--text);
  font: 700 0.95rem/1.4 var(--font-body);
  cursor: pointer;
}

.guides-article-list {
  padding: 1.25rem;
  border: 1px solid var(--guides-border);
  border-radius: 0.875rem;
  background: var(--guides-surface);
  box-shadow: 0 12px 28px rgba(44, 71, 55, 0.06);
}

.guides-list-title {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-weight: 700;
}

.guides-list-link {
  display: block;
  padding: 0.75rem 0.875rem;
  border-left: 3px solid transparent;
  border-radius: 0.5rem;
  color: var(--guides-text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.guides-list-link-current,
.guides-list-link-current:hover {
  border-left-color: var(--primary);
  background: var(--primary-light);
  color: #057a45;
  font-weight: 700;
}

.guides-list-note {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--guides-border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.guides-article {
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid var(--guides-border);
  border-radius: 1rem;
  background: var(--guides-surface);
  box-shadow: 0 16px 38px rgba(44, 71, 55, 0.07);
}

.guides-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.guides-breadcrumb a {
  color: #057a45;
}

.guides-article-header {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--guides-border);
}

.guides-article-header h1 {
  max-width: 760px;
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.18;
}

.guides-lead {
  max-width: 720px;
  margin: 0 0 1.5rem;
  color: var(--guides-text-soft);
  font-size: 1.05rem;
}

.guides-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.guides-meta div {
  min-width: 0;
  padding: 0.75rem 0;
}

.guides-meta dt {
  margin-bottom: 0.2rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.guides-meta dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.guides-tip {
  margin: 1.75rem 0 2.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid rgba(7, 193, 96, 0.28);
  border-left: 4px solid var(--primary);
  border-radius: 0.75rem;
  background: #effaf3;
}

.guides-tip > strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #056c3d;
}

.guides-tip p {
  margin: 0;
  color: #365342;
}

.guides-warning {
  margin: 1.75rem 0 2.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #e6b5aa;
  border-left: 4px solid #b8422d;
  border-radius: 0.75rem;
  background: #fff4f1;
  color: #63271d;
}

.guides-warning > strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #762f22;
}

.guides-warning p {
  margin: 0;
}

.guides-recovery {
  margin-top: 2.5rem;
  padding: 1.25rem;
  border: 1px solid #e6b5aa;
  border-radius: 0.875rem;
  background: #fff8f6;
}

.guides-recovery .guides-step-number {
  background: #a93c29;
}

.guides-recovery-label {
  margin-bottom: 0.35rem !important;
  color: #8a3425 !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guides-directory {
  width: min(940px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 8.5rem 0 5rem;
}

.guides-directory-header {
  max-width: 720px;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--guides-border);
}

.guides-directory-kicker,
.guides-entry-meta {
  color: #087446;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.guides-directory-header h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
}

.guides-directory-header > p:last-child {
  color: var(--guides-text-soft);
  font-size: 1.08rem;
}

.guides-directory-list {
  margin-top: 3rem;
}

.guides-directory-list > h2 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.guides-directory-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--guides-border);
}

.guides-directory-entry h3 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
}

.guides-directory-entry p {
  max-width: 680px;
  margin: 0;
  color: var(--guides-text-soft);
}

.guides-entry-action {
  white-space: nowrap;
  color: #087446;
  font-weight: 700;
}

.guides-section {
  margin-top: 2.5rem;
}

.guides-section > h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.guides-step {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--guides-border);
}

.guides-step-number {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  background: var(--primary-light);
  color: #056c3d;
  font-weight: 800;
}

.guides-step h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
}

.guides-step p {
  margin: 0;
  color: var(--guides-text-soft);
}

.guides-article code,
.guides-article kbd {
  max-width: 100%;
  padding: 0.12em 0.38em;
  border: 1px solid #d7e0da;
  border-radius: 0.3rem;
  background: var(--guides-surface-muted);
  color: #17482e;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.guides-figure {
  margin: 1.5rem 0 2rem;
}

.guides-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--guides-border);
  border-radius: 0.875rem;
  background: var(--guides-surface-muted);
}

.guides-figure figcaption {
  margin-top: 0.625rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.guides-troubleshooting details {
  padding: 1rem 0;
  border-bottom: 1px solid var(--guides-border);
}

.guides-troubleshooting summary {
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.guides-troubleshooting details p {
  margin: 0.75rem 0 0;
  color: var(--guides-text-soft);
}

.guides-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--guides-border);
}

.guides-page .btn-primary {
  background: #057a45;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 122, 69, 0.24);
}

.guides-page .btn-primary:hover {
  background: #04653a;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(5, 122, 69, 0.3);
}

.guides-footer-contact a {
  color: rgba(255, 255, 255, 0.65);
}

.guides-fallback-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 1.5rem;
}

.guides-fallback {
  width: min(620px, 100%);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--guides-border);
  border-radius: 1rem;
  background: var(--guides-surface);
  box-shadow: 0 16px 38px rgba(44, 71, 55, 0.08);
  text-align: center;
}

.guides-fallback-label {
  margin: 0 0 0.5rem;
  color: #057a45;
  font-weight: 700;
}

.guides-fallback h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
}

.guides-fallback p {
  margin: 0.625rem 0;
  color: var(--guides-text-soft);
}

.guides-page a:focus-visible,
.guides-page button:focus-visible,
.guides-page summary:focus-visible {
  outline: 3px solid rgba(7, 193, 96, 0.42);
  outline-offset: 3px;
}

@media (max-width: 980px) {

  .guides-shell {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 1.25rem;
  }

  .guides-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .guides-main {
    padding: 5.75rem 1rem 3rem;
  }

  .guides-shell {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .guides-sidebar {
    position: static;
    width: 100%;
  }

  .guides-list-toggle {
    display: flex;
  }

  .guides-article-list {
    margin-top: 0.625rem;
    box-shadow: none;
  }

  .guides-page.guides-js:not(.guides-list-open) .guides-article-list {
    display: none;
  }

  .guides-article {
    width: 100%;
    padding: 1.25rem;
    border-radius: 0.75rem;
  }

  .guides-article-header h1 {
    font-size: 2rem;
  }

  .guides-meta {
    grid-template-columns: 1fr 1fr;
  }

  .guides-next-actions,
  .guides-next-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .guides-directory {
    width: min(100% - 2rem, 940px);
    padding-top: 6.75rem;
  }

  .guides-directory-entry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .guides-main {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .guides-meta {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .guides-step {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .guides-step-number {
    width: 2rem;
    height: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guides-page *,
  .guides-page *::before,
  .guides-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* --- Tutorial Chapters (安装及使用教程 21章) --- */

/* 教程章节页侧边栏较长（约25个链接），限高并内部滚动；旧3篇链接少不受影响 */
.guides-article-list {
  max-height: calc(100dvh - 9rem);
  overflow-y: auto;
}

/* 侧边栏第二分组标题（"其他操作指导"）与上分组的间距分隔 */
.guides-list-title-gap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--guides-border);
}

/* 真实截图：取消 .guides-figure 的 16/9 强制比例与 100% 宽度，按原始尺寸显示（超出列宽才等比缩小），避免拉伸变形 */
.guides-figure-shot img {
  aspect-ratio: auto;
  width: auto;
  max-width: 100%;
}

.guides-figure-shot a {
  display: block;
  width: fit-content;  /* 点击区域收缩到图片实际宽度，避免小图右侧出现隐形可点空白 */
  max-width: 100%;
  margin-inline: auto;  /* 图片水平居中 */
  cursor: zoom-in;
}

.guides-figure-shot figcaption {
  text-align: center;  /* 图注随图片居中 */
}

/* 教程主页章节目录 */
.guides-chapters {
  margin-top: 1rem;
}

.guides-chapters > h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.1rem;
}

.guides-chapter {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--guides-border);
}

.guides-chapter-num {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: var(--primary-light);
  color: #056c3d;
  font-weight: 800;
}

.guides-chapter h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
}

.guides-chapter h3 a {
  color: var(--text);
}

.guides-chapter h3 a:hover {
  color: #057a45;
}

.guides-chapter p {
  margin: 0;
  color: var(--guides-text-soft);
  font-size: 0.92rem;
}

.guides-chapter > a {
  white-space: nowrap;
  color: #087446;
  font-weight: 700;
}

/* 章节页底部 上一章/下一章 */
.guides-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--guides-border);
}

.guides-prev-next a {
  display: block;
  padding: 1rem 1.125rem;
  border: 1px solid var(--guides-border);
  border-radius: 0.75rem;
  background: var(--guides-surface-muted);
  color: var(--text);
}

.guides-prev-next a:hover {
  border-color: var(--primary);
}

.guides-prev-next .pn-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.guides-prev-next .next {
  text-align: right;
}

/* 截图占位符：教程图片由用户后期手动补充，占位框标明应展示的内容 */
.guides-figure-ph-box {
  display: grid;
  place-content: center;
  gap: 0.4rem;
  min-height: 8.5rem;
  padding: 1.5rem;
  border: 2px dashed #b9c9bf;
  border-radius: 0.875rem;
  background: var(--guides-surface-muted);
  color: var(--text-muted);
  text-align: center;
}

.guides-figure-ph-box strong {
  color: #8a6d3b;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.guides-figure-ph-box span {
  font-size: 0.92rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .guides-chapter {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .guides-chapter > a {
    grid-column: 2;
    justify-self: start;
  }

  .guides-prev-next {
    grid-template-columns: 1fr;
  }

  .guides-prev-next .next {
    text-align: left;
  }
}
