/* 万宝盒中文区（/cn/）—— 功能详解长文页
 * 复用 style.css 的主题变量，只补文章排版与导航。
 */

/* 中文区多了子导航条，吸顶高度比英文站高 —— 锚点跳转要留出空间 */
html { scroll-padding-top: 128px; }

/* ---------- 子导航：10 期横向条 ---------- */
.nav-sub {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(12px);
}
.nav-sub .wrap {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 24px;   /* 与 .wrap 左右内边距保持一致 */
}
.nav-sub .wrap::-webkit-scrollbar { display: none; }
.nav-sub a {
  flex: none;
  font-size: 13.5px;
  color: var(--text-2);
  text-decoration: none;
  padding: 5px 11px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.nav-sub a:hover { background: var(--surface-2); color: var(--text); }
.nav-sub a.on {
  background: var(--a1-soft);
  color: var(--a1);
  font-weight: 600;
}

/* ---------- 文章 hero ---------- */
.art-hero { max-width: 760px; margin: 26px 0 0; }
.art-hero h1 { margin: 14px 0 12px; font-size: clamp(30px, 5vw, 46px); line-height: 1.18; }

/* ---------- 两栏：目录 + 正文 ---------- */
.art-sec { padding: 52px 0 68px; }
.art-wrap {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}
@media (max-width: 940px) {
  .art-wrap { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- 目录 ---------- */
.toc {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding-right: 8px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
}
@media (max-width: 940px) {
  .toc { position: static; max-height: none; border-left: none; padding-left: 0; margin-bottom: 8px; }
  .toc h4 { display: none; }
  .toc { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
}
.toc h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-3);
  margin: 0 0 12px;
  font-weight: 600;
}
.toc a {
  display: block;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 0;
  transition: color .16s;
}
@media (max-width: 940px) {
  .toc a {
    flex: none;
    padding: 5px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
    font-size: 12.5px;
  }
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--a1); font-weight: 600; }
@media (max-width: 940px) {
  .toc a.active { background: var(--a1-soft); border-color: transparent; }
}

/* ---------- 正文排版（中文） ---------- */
.prose {
  max-width: 748px;
  font-size: 16.5px;
  line-height: 1.86;
  color: var(--text);
  letter-spacing: .008em;
}
.prose > * + * { margin-top: 1.15em; }
.prose p { margin: 0; }

.prose h2 {
  font-size: 25px;
  line-height: 1.4;
  margin-top: 2.2em;
  margin-bottom: -.35em;
  font-weight: 700;
  letter-spacing: -.01em;
  scroll-margin-top: 130px;
}
.prose h3 {
  font-size: 19px;
  margin-top: 1.8em;
  margin-bottom: -.5em;
  font-weight: 650;
  color: var(--text);
}
.prose h2 + p, .prose h3 + p { margin-top: 0; }

.prose strong { color: var(--text); font-weight: 650; }
.prose em { color: var(--text-2); font-style: normal; }

.prose a {
  color: var(--a1);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--a1) 35%, transparent);
}
.prose a:hover { border-bottom-color: var(--a1); }

.prose code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--a1);
}

.prose ul, .prose ol { padding-left: 1.35em; margin: 0; }
.prose li { margin: .42em 0; padding-left: .18em; }
.prose li::marker { color: var(--text-3); }

.prose blockquote {
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--a1);
  background: var(--a1-soft);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.78;
}

/* 截图：模拟手机宽度，居中 */
.prose .shot { margin: 1.9em auto; max-width: 348px; }
.prose .shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lift);
  background: var(--surface-2);
}
.prose .shot figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.6;
}

/* 模块补充说明（原「下载方式」小字） */
.art-note {
  margin-top: 2.4em !important;
  padding: 14px 18px;
  border: 1px dashed var(--border-2);
  border-radius: 12px;
  font-size: 14px !important;
  line-height: 1.75;
  color: var(--text-2);
  background: var(--surface-2);
}

/* ---------- 隐藏技巧 ---------- */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 18px; }
.tip {
  padding: 22px 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  transition: transform .2s, box-shadow .2s;
}
.tip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tip h3 { font-size: 16.5px; margin: 0 0 9px; font-weight: 650; }
.tip p { font-size: 14.5px; line-height: 1.78; color: var(--text-2); margin: 0; }
.tip strong { color: var(--text); font-weight: 650; }
.tip a { color: var(--a1); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--a1) 35%, transparent); }

/* ---------- 上一篇 / 下一篇 ---------- */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.pg {
  font-size: 14.5px;
  color: var(--text-2);
  text-decoration: none;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background .16s, color .16s, border-color .16s;
}
.pg:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.pg.next { margin-left: auto; text-align: right; }
@media (max-width: 560px) {
  .pager { flex-direction: column; }
  .pg.next { text-align: left; }
}

.dl-note { margin: 18px 0 0; font-size: 13.5px; color: var(--text-3); }

/* ---------- 总览页 ---------- */
.cn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 20px; }
.cn-card {
  display: block;
  padding: 24px 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cn-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--a1) 40%, var(--border));
}
.cn-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--a1);
  background: var(--a1-soft);
  border-radius: 7px;
  padding: 3px 9px;
  margin-bottom: 12px;
}
.cn-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 650; }
.cn-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.cn-card .cn-more { font-size: 13.5px; color: var(--a1); font-weight: 600; }
