:root {
  --red: #2f7fd1;
  --red-dark: #1b5aa0;
  --red-light: #4da3ff;
  --gold: #39d0ff;
  --gold-light: #8ce6ff;
  --ink: #e8f1fb;
  --ink-soft: #9db2c9;
  --paper: #060c18;
  --paper-2: #0a1424;
  --line: rgba(120, 170, 230, .18);
  --shadow: 0 14px 40px rgba(0, 0, 0, .55);
  --serif: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 12% 0%, rgba(47, 127, 209, .18), transparent 60%),
    radial-gradient(900px 500px at 88% 12%, rgba(57, 208, 255, .12), transparent 55%),
    var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1180px, 92vw); margin: 0 auto; }

/* 顶部通告 */
.topbar {
  background: rgba(4, 9, 18, .9);
  border-bottom: 1px solid var(--line);
  color: #a9c3dc;
  font-size: 13px;
  letter-spacing: .05em;
}

.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 9px 0; flex-wrap: wrap;
}

.topbar .badge {
  color: #06121f;
  background: linear-gradient(90deg, var(--gold), #2f7fd1);
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* 页头 */
.site-header {
  background: rgba(8, 16, 30, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}

.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 0; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 16px; }

.brand img {
  width: 58px; height: 58px; border-radius: 14px;
  border: 1px solid rgba(57, 208, 255, .45);
  box-shadow: 0 0 24px rgba(57, 208, 255, .25);
  background: #0b1526;
}

.brand h1 {
  font-size: 27px; letter-spacing: .14em; line-height: 1.2;
  background: linear-gradient(90deg, #ffffff, #8ce6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.brand .en {
  display: block; font-size: 11px; letter-spacing: .42em;
  color: #6f8aa6; text-transform: uppercase; margin-top: 4px;
}

.header-meta { margin-left: auto; text-align: right; font-size: 13px; color: var(--ink-soft); }
.header-meta strong { color: var(--gold); font-size: 15px; }

/* 导航 */
.nav {
  background: rgba(10, 20, 36, .78);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
}

.nav .wrap { display: flex; flex-wrap: wrap; }

.nav a {
  color: #b8cde2; padding: 15px 30px; font-size: 15px; letter-spacing: .12em;
  border-right: 1px solid var(--line); transition: color .2s, background .2s;
  position: relative;
}

.nav a:hover { color: #fff; background: rgba(47, 127, 209, .12); }

.nav a.active { color: #fff; font-weight: 700; }
.nav a.active::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 8px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--red-light));
  box-shadow: 0 0 12px rgba(57, 208, 255, .8);
}

/* 主视觉 */
.hero { position: relative; overflow: hidden; }

.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(90, 150, 220, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 150, 220, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(800px 500px at 50% 10%, #000, transparent 75%);
  pointer-events: none;
}

.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px;
  align-items: center; padding: 78px 0 82px;
}

.hero .kicker {
  display: inline-block; border: 1px solid rgba(57, 208, 255, .5);
  color: var(--gold-light); font-size: 12px; letter-spacing: .34em;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 22px;
  background: rgba(57, 208, 255, .06);
}

.hero h2 {
  font-size: 52px; line-height: 1.26; letter-spacing: .02em; margin-bottom: 18px;
  font-weight: 800;
}

.hero h2 em {
  font-style: normal;
  background: linear-gradient(90deg, #4da3ff, #8ce6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero p.lead { font-size: 17px; color: #a9c3dc; max-width: 620px; margin-bottom: 30px; }
.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 8px; font-size: 15px;
  letter-spacing: .08em; border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}

.btn-gold {
  background: linear-gradient(135deg, #2f7fd1, #39d0ff);
  color: #04121f; font-weight: 700;
  box-shadow: 0 10px 28px rgba(57, 208, 255, .28);
}

.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(57, 208, 255, .45); }

.btn-ghost { border-color: rgba(140, 230, 255, .45); color: #d8f3ff; }
.btn-ghost:hover { background: rgba(57, 208, 255, .12); }

.hero-figure { text-align: center; }

.hero-figure img {
  width: min(300px, 70%); margin: 0 auto; border-radius: 26px;
  border: 1px solid rgba(57, 208, 255, .35);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 60px rgba(47, 127, 209, .28);
}

/* 栏目标题 */
.section { padding: 76px 0; }
.section.alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { margin-bottom: 44px; }

.section-head .num { color: var(--gold); font-size: 13px; letter-spacing: .4em; font-family: var(--mono); }

.section-head h3 {
  font-size: 34px; letter-spacing: .04em; padding-bottom: 14px;
  position: relative; font-weight: 800;
}

.section-head h3::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 74px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red-light));
  box-shadow: 0 0 14px rgba(57, 208, 255, .7);
}

.section-head p { color: var(--ink-soft); margin-top: 14px; max-width: 760px; }

/* 网格 */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, rgba(47, 127, 209, .1), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 26px;
  transition: transform .18s, box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--red-light), var(--gold));
  opacity: .7;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(57, 208, 255, .45);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .5), 0 0 40px rgba(47, 127, 209, .18);
}

.card .idx { font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: .3em; }
.card h4 { font-size: 20px; margin: 10px 0; letter-spacing: .03em; }
.card p { font-size: 14.5px; color: var(--ink-soft); }

/* 数据 */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(90deg, rgba(47, 127, 209, .16), rgba(57, 208, 255, .08));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}

.stats .item { padding: 30px 18px; text-align: center; border-right: 1px solid var(--line); }
.stats .item:last-child { border-right: 0; }

.stats .num {
  font-family: var(--mono); font-size: 40px; line-height: 1.1;
  background: linear-gradient(90deg, #8ce6ff, #4da3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.stats .label { font-size: 13px; letter-spacing: .18em; color: #8fa9c4; margin-top: 8px; }

/* 截图 */
.shots { display: grid; gap: 26px; grid-template-columns: repeat(4, 1fr); }
.shot { text-align: center; }

.shot img {
  width: 100%; border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  background: #0b1526;
}

.shot figcaption { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); }
.shot figcaption b { color: var(--gold-light); }

/* 图文 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.split.rev .txt { order: 2; }

.split img {
  border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .55), 0 0 50px rgba(47, 127, 209, .12);
}

.split h3 { font-size: 30px; margin-bottom: 16px; letter-spacing: .03em; font-weight: 800; }
.split p { color: var(--ink-soft); margin-bottom: 14px; }

.checklist { list-style: none; margin-top: 18px; }
.checklist li { padding: 8px 0 8px 30px; position: relative; font-size: 15px; }

.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 9px;
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-light), var(--gold));
  color: #04121f; font-size: 12px; font-weight: 700;
}

/* 表格 */
table { width: 100%; border-collapse: collapse; background: rgba(255, 255, 255, .03); border-radius: 12px; overflow: hidden; }
th, td { padding: 14px 18px; border: 1px solid var(--line); text-align: left; font-size: 14.5px; }
th { background: rgba(47, 127, 209, .22); color: #dff3ff; letter-spacing: .06em; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .02); }

/* 步骤 */
.steps { counter-reset: step; display: grid; gap: 18px; }

.step {
  background: linear-gradient(180deg, rgba(47, 127, 209, .09), rgba(255, 255, 255, .015));
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 22px 26px 22px 76px; position: relative;
}

.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 22px; top: 20px;
  font-family: var(--mono); font-size: 22px; color: var(--gold);
}

.step h4 { font-size: 19px; margin-bottom: 6px; color: #dff3ff; }
.step p { font-size: 14.5px; color: var(--ink-soft); }

/* 代码 */
code {
  font-family: var(--mono); background: rgba(57, 208, 255, .12);
  color: var(--gold-light); padding: 1px 6px; border-radius: 4px; font-size: .92em;
}

pre.code {
  background: #03080f; color: #cfe8ff; padding: 22px 24px; border-radius: 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.9;
  overflow-x: auto; box-shadow: var(--shadow);
}

/* 提示 */
.notice {
  background: rgba(57, 208, 255, .07);
  border: 1px solid rgba(57, 208, 255, .28);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 18px 22px; margin: 22px 0; font-size: 14.5px; color: #bcd8ef;
}

.notice b { color: var(--gold-light); }

/* 页脚 */
.site-footer { background: #04090f; border-top: 1px solid var(--line); color: #93aac2; }
.site-footer .wrap { padding: 48px 0 30px; }

.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.foot-grid h5 { color: var(--gold-light); font-size: 16px; margin-bottom: 14px; letter-spacing: .1em; }
.foot-grid a { display: block; font-size: 14px; color: #8fa9c4; padding: 4px 0; }
.foot-grid a:hover { color: #fff; }
.foot-grid p { font-size: 13.5px; color: #7e96b0; }

.copyright {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: #6d849d;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.copyright a { color: #cbb79c; text-decoration: underline; text-underline-offset: 2px; }
.copyright a:hover { color: #fff; }

/* 内页头 */
.page-head {
  background: linear-gradient(135deg, rgba(47, 127, 209, .22), rgba(57, 208, 255, .06));
  border-bottom: 1px solid var(--line);
  padding: 46px 0;
}

.page-head h2 { font-size: 38px; letter-spacing: .06em; font-weight: 800; }
.page-head p { color: var(--ink-soft); margin-top: 10px; }
.crumb { font-size: 13px; color: #8fa9c4; margin-bottom: 12px; }
.crumb a:hover { color: #fff; }

/* 下载卡片 */
.dl-card {
  background: linear-gradient(180deg, rgba(47, 127, 209, .12), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: 14px; padding: 34px;
  transition: border-color .2s, box-shadow .2s;
}

.dl-card:hover { border-color: rgba(57, 208, 255, .45); box-shadow: 0 18px 46px rgba(0, 0, 0, .5); }
.dl-card h4 { font-size: 24px; margin-bottom: 8px; }
.dl-card .ver { font-family: var(--mono); font-size: 12.5px; color: var(--gold); letter-spacing: .18em; margin-bottom: 16px; }
.dl-card .meta { font-size: 13.5px; color: var(--ink-soft); margin: 16px 0 22px; }
.dl-card .meta span { display: inline-block; margin-right: 18px; }

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h2 { font-size: 38px; }
  .grid-3, .grid-4, .shots { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split.rev .txt { order: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .grid-3, .grid-4, .shots { grid-template-columns: 1fr; }
  .nav a { padding: 12px 18px; font-size: 14px; }
  .hero h2 { font-size: 30px; }
  .header-meta { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* ===== 动效 ===== */

/* 顶部滚动进度条 */
#scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--red));
  z-index: 9999; pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, .18);
}

/* 滚动后导航栏加深 */
body.scrolled .nav { box-shadow: 0 6px 24px rgba(0, 0, 0, .14); }
body.scrolled .site-header { box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }

/* 进入视窗：方向位移 + 模糊渐显 */
[data-reveal] {
  opacity: 0;
  filter: blur(12px);
  transition:
    opacity .9s cubic-bezier(.22, 1, .36, 1),
    filter .9s cubic-bezier(.22, 1, .36, 1),
    transform .9s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, filter, transform;
}

[data-reveal="up"] { transform: translate3d(0, 48px, 0); }
[data-reveal="left"] { transform: translate3d(-56px, 0, 0); }
[data-reveal="right"] { transform: translate3d(56px, 0, 0); }

[data-reveal].in {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0);
}

/* 视差（用 translate 属性，避免覆盖入场位移） */
.hero-figure img,
.split img { translate: 0 var(--parallax, 0px); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; filter: none; transform: none; transition: none; }
  .hero-figure img, .split img { translate: none; }
  #scroll-progress { display: none; }
}

/* ===== 增强动效 ===== */

/* 主标题逐行上升 */
.hero-line { display: block; overflow: hidden; }
.hero-line > span {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  animation: heroLineUp 1s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes heroLineUp { to { transform: translateY(0); opacity: 1; } }

/* Hero 网格缓慢漂移 */
.hero::after, .hero::before { animation: gridDrift 22s linear infinite; }
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}

/* 唱片轻浮动 */
.hero-figure img { animation: floaty 6.5s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* 按钮光泽扫过 */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.btn:hover::after { animation: btnShimmer .9s ease; }
@keyframes btnShimmer { to { left: 150%; } }

/* 章节标题下划线展开 */
.section-head h3::after {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1s cubic-bezier(.22, 1, .36, 1) .15s;
}
.section-head.in h3::after { transform: scaleX(1); }

/* 卡片光晕跟随鼠标 */
.card, .dl-card { position: relative; }
.card::after, .dl-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--gold), transparent 68%);
  opacity: 0;
  transition: opacity .35s;
}
.card:hover::after, .dl-card:hover::after { opacity: .16; }

/* 截图悬停上浮 */
.shot img { transition: transform .55s cubic-bezier(.22, 1, .36, 1), box-shadow .55s; }
.shot:hover img { transform: translateY(-10px) scale(1.02); }

/* 数据条扫光 */
.stats .item { position: relative; overflow: hidden; }
.stats .item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.stats .item.in::after { animation: statSweep 1.1s ease .25s forwards; }
@keyframes statSweep { to { transform: translateX(120%); } }

/* 导航链接下划线滑入 */
.nav a { position: relative; }
.nav a::before {
  content: "";
  position: absolute; left: 30px; right: 30px; bottom: 9px; height: 1px;
  background: currentColor;
  opacity: .7;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.nav a:hover::before { transform: scaleX(1); }

/* 返回顶部 */
#to-top {
  position: fixed; right: 26px; bottom: 30px;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--red, var(--navy, #333));
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s, transform .3s, box-shadow .3s;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
  z-index: 9000;
}
#to-top.show { opacity: 1; transform: none; pointer-events: auto; }
#to-top:hover { box-shadow: 0 14px 32px rgba(0, 0, 0, .22); }

@media (prefers-reduced-motion: reduce) {
  .hero-line > span { animation: none; transform: none; opacity: 1; }
  .hero::after, .hero::before,
  .hero-figure img,
  .btn::after,
  .stats .item::after { animation: none; }
  .card::after, .dl-card::after { display: none; }
  .shot img { transition: none; }
  .nav a::before { transition: none; }
}

/* ===== 移动端适配 ===== */
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 980px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { gap: 32px; }
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  table { font-size: 12px; }
  th, td { padding: 8px 9px; word-break: normal; overflow-wrap: break-word; }
  .section { padding: 54px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head h3 { font-size: 25px; }
  .page-head { padding: 36px 0; }
  .page-head h2 { font-size: 28px; }
  .hero .wrap { padding: 48px 0 54px; }
  .hero p.lead { font-size: 15px; }
  .stats .num { font-size: 30px; }
  .stats .item { padding: 22px 12px; }
  .card { padding: 22px 20px; }
  .step { padding: 20px 18px 20px 62px; }
  .step::before { left: 16px; top: 20px; font-size: 20px; }
  .foot-grid { gap: 22px; }
  .copyright { flex-direction: column; gap: 6px; }
  pre.code { font-size: 12px; padding: 16px 18px; line-height: 1.8; }
  .hero-figure img { width: min(240px, 72%); }
  .split img { border-radius: 12px; }
  #to-top { right: 16px; bottom: 18px; width: 42px; height: 42px; font-size: 16px; }
  .btn { padding: 12px 24px; }
}

/* 移动端导航：单行横向滑动 */
@media (max-width: 720px) {
  .nav .wrap {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav .wrap::-webkit-scrollbar { display: none; }
  .nav a { flex: 0 0 auto; white-space: nowrap; }
  .topbar .wrap { justify-content: flex-start; }
}

/* 系统「减弱动态效果」偏好下：保留轻量入场动画，去掉模糊/视差/旋转等重动效 */
html.motion-lite [data-reveal] {
  filter: none;
  transform: translate3d(0, 18px, 0);
  transition: opacity .5s ease, transform .5s ease;
}
html.motion-lite [data-reveal="left"] { transform: translate3d(-18px, 0, 0); }
html.motion-lite [data-reveal="right"] { transform: translate3d(18px, 0, 0); }
html.motion-lite [data-reveal].in { transform: translate3d(0, 0, 0); }

html.motion-lite .hero::after,
html.motion-lite .hero::before,
html.motion-lite .hero-figure img,
html.motion-lite .btn::after,
html.motion-lite .stats .item::after { animation: none; }

html.motion-lite .card::after,
html.motion-lite .dl-card::after { display: none; }

html.motion-lite .hero-figure img,
html.motion-lite .split img { translate: none; }

html.motion-lite .section-head h3::after { transform: none; }
html.motion-lite .section-head h3::after { transform: scaleX(1); }

/* ===== 文档页固定目录（配置说明 / 使用指南）===== */
body.doc-page .section h3,
body.doc-page .section h4 { scroll-margin-top: 96px; }

.doc-toc {
  position: fixed;
  top: 112px;
  right: 20px;
  width: 232px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 14px 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 25;
  transform: translateX(calc(100% + 28px));
  transition: transform .28s ease;
}

.doc-toc.open { transform: translateX(0); }

.doc-toc::-webkit-scrollbar { display: none; }

.doc-toc::before {
  content: "目录";
  display: block;
  padding: 2px 12px 10px;
  font-size: 11px;
  letter-spacing: .34em;
  color: var(--gold);
}

.doc-toc-list { display: flex; flex-direction: column; }

.doc-toc-item {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: color .18s, background .18s, border-color .18s;
}

.doc-toc-item.lvl1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  color: var(--ink);
  font-weight: 600;
}

.doc-toc-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.doc-toc-caret {
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s;
}

.doc-toc-item.lvl1.open .doc-toc-caret { transform: rotate(-135deg); }

.doc-toc-sub { display: none; }
.doc-toc-sub.open { display: block; }

.doc-toc-item.lvl2 { padding-left: 22px; font-size: 12.5px; }
.doc-toc-item:hover { color: var(--ink); background: rgba(0, 0, 0, .04); }
.doc-toc-item.active {
  color: var(--ink);
  font-weight: 700;
  border-left-color: var(--gold);
  background: rgba(0, 0, 0, .06);
}

.doc-toc-toggle {
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 26;
  padding: 10px 16px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

@media (min-width: 1280px) {
  body.doc-page .section > .wrap,
  body.doc-page .page-head > .wrap {
    width: 880px;
    margin-left: calc((100vw - 1152px) / 2);
    margin-right: auto;
  }
  body.doc-page .doc-toc {
    right: calc((100vw - 1152px) / 2);
    transform: translateX(0);
  }
  body.doc-page .doc-toc-toggle { display: none; }
}
