/* 《智能物流信息技术》教材网站 - 样式表
 * 主题: data-mode="light|dark|eye-green|eye-brown"（护眼：浅绿/浅棕）
 * 断点: >=1024 桌面（固定目录）；640-1023 平板（抽屉目录）；<640 手机（单列） */

:root {
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --radius: 14px;
  --topbar-h: 64px;
  --content-max: 900px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --accent: #5b2d8e;
  --accent-2: #22d3ee;
  --rgb: 91 45 142;
}

[data-mode="light"] {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #111a2e;
  --muted: #5b6880;
  --border: #dce3ee;
  --shadow: 0 18px 40px -24px rgba(20, 30, 60, .35);
  --grid: rgba(60, 70, 110, .07);
  --code-bg: #eef2f8;
  --code-text: #111a2e;
  --tk-kw: #6d28d9;
  --tk-str: #047857;
  --tk-com: #64748b;
  --tk-num: #c2410c;
  --tk-title: #1d4ed8;
  --tk-type: #b45309;
  --tk-attr: #0e7490;
  --tk-meta: #9333ea;
  --tk-del: #b91c1c;
  --accent-text: var(--accent);
}

[data-mode="dark"] {
  --bg: #060b16;
  --surface: #0c1528;
  --surface-2: #122039;
  --text: #e6edf9;
  --muted: #97a6c2;
  --border: #1d2b47;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7);
  --grid: rgba(120, 160, 255, .09);
  --code-bg: #122039;
  --code-text: #e6edf9;
  --tk-kw: #c4a7ff;
  --tk-str: #86e3a8;
  --tk-com: #7b8aa6;
  --tk-num: #f78c6c;
  --tk-title: #82aaff;
  --tk-type: #ffcb6b;
  --tk-attr: #7fdbca;
  --tk-meta: #c792ea;
  --tk-del: #ff8b8b;
  --accent-text: color-mix(in srgb, var(--accent) 60%, #ffffff);
}

[data-mode="eye-green"] {
  --bg: #e9f1e1;
  --surface: #f3f8ee;
  --surface-2: #dfead3;
  --text: #26331f;
  --muted: #5e6f54;
  --border: #cbdac0;
  --shadow: 0 18px 40px -24px rgba(40, 70, 30, .35);
  --grid: rgba(70, 110, 60, .08);
  --code-bg: #dfead3;
  --code-text: #26331f;
  --tk-kw: #6b3fa0;
  --tk-str: #2f7d3a;
  --tk-com: #5e6f54;
  --tk-num: #b45309;
  --tk-title: #1f5f8b;
  --tk-type: #92400e;
  --tk-attr: #0f766e;
  --tk-meta: #7c3aed;
  --tk-del: #b91c1c;
  --accent-text: var(--accent);
}

[data-mode="eye-brown"] {
  --bg: #f1e6d4;
  --surface: #f7eedf;
  --surface-2: #e7d7bd;
  --text: #3a2a1a;
  --muted: #7a6450;
  --border: #d9c6a8;
  --shadow: 0 18px 40px -24px rgba(90, 60, 30, .35);
  --grid: rgba(120, 85, 50, .08);
  --code-bg: #e7d7bd;
  --code-text: #3a2a1a;
  --tk-kw: #6b3fa0;
  --tk-str: #3f6b2a;
  --tk-com: #7a6450;
  --tk-num: #a0461b;
  --tk-title: #1f5f8b;
  --tk-type: #8a5a00;
  --tk-attr: #0f6b5c;
  --tk-meta: #7c3aed;
  --tk-del: #9b1c1c;
  --accent: #8b5a2b;
  --accent-2: #c08a4a;
  --rgb: 139 90 43;
  --accent-text: var(--accent);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

/* 背景科技网格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus { left: 16px; z-index: 200; padding: 8px 12px; background: var(--surface); border-radius: 8px; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .3em; }

.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a {
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}
.topnav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

.icon-btn {
  appearance: none;
  flex: none;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { border-color: var(--accent-text); color: var(--accent-text); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

/* ---------- 主题面板 ---------- */
.theme-wrap { position: relative; margin-left: 4px; }

.theme-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 16px;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-label { margin: 2px 0 8px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.panel-label + .seg { margin-bottom: 16px; }

.seg {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 12px;
}
.seg button {
  appearance: none;
  border: 0;
  padding: 8px 2px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

/* ---------- 章节布局 ---------- */
.layout {
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 20px 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  max-height: calc(100vh - var(--topbar-h) - 40px);
  overflow-y: auto;
  padding: 4px 6px 16px 0;
  scrollbar-width: thin;
}

.sidebar-title {
  margin: 0 0 12px 10px;
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--muted);
}

.toc-ch { margin-bottom: 4px; }
.toc-ch > summary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  list-style: none;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
}
.toc-ch > summary::-webkit-details-marker { display: none; }
.toc-ch > summary::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: 8px 3px 0 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform .2s var(--ease);
}
.toc-ch[open] > summary::before { transform: rotate(45deg); }
.toc-ch > summary a { color: var(--text); }
.toc-ch > summary:hover { background: var(--surface-2); }

.toc-ch ul {
  margin: 2px 0 8px 14px;
  padding: 0 0 0 10px;
  list-style: none;
  border-left: 1px solid var(--border);
}
.toc-ch li a {
  display: block;
  margin-left: -11px;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.toc-ch li a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.toc-ch li a.is-active {
  color: var(--accent-text);
  background: var(--surface-2);
  border-left-color: var(--accent);
}

.content { min-width: 0; width: 100%; max-width: var(--content-max); }

.chapter-body {
  padding: 40px clamp(20px, 4vw, 52px) 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* ---------- 正文排版 ---------- */
.chapter-body h1 {
  position: relative;
  margin: 0 0 .9em;
  padding-bottom: .5em;
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.3;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}
.chapter-body h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 72px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.chapter-body h2 {
  margin: 2.2em 0 .8em;
  padding-left: 14px;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.4;
  border-left: 4px solid var(--accent);
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}
.chapter-body h3 { margin: 1.8em 0 .6em; font-size: 18px; line-height: 1.5; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.chapter-body h4 { margin: 1.4em 0 .5em; font-size: 16px; }

.chapter-body p { margin: .9em 0; }
.chapter-body p[align="center"] { text-align: center; }
.chapter-body ul, .chapter-body ol { padding-left: 1.6em; }
.chapter-body li { margin: .3em 0; }
.chapter-body li > p { margin: .4em 0; }
.chapter-body strong { color: var(--text); }

.chapter-body blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  color: var(--muted);
  background: var(--surface-2);
  border-left: 4px solid var(--accent-2);
  border-radius: 0 12px 12px 0;
}
.chapter-body blockquote p { margin: .4em 0; }

.chapter-body hr {
  height: 1px;
  margin: 2.4em 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.chapter-body code {
  padding: .15em .4em;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .88em;
  color: var(--accent-text);
  background: var(--surface-2);
  word-break: break-word;
}

.chapter-body pre.code {
  margin: 1.2em 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 13.5px;
  line-height: 1.6;
}
.chapter-body pre.code code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  word-break: normal;
}

/* 代码高亮配色（highlight.js 类名，随主题取 --tk-* 变量） */
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-meta .hljs-keyword { color: var(--tk-kw); }
.hljs-string, .hljs-regexp, .hljs-addition { color: var(--tk-str); }
.hljs-comment, .hljs-quote { color: var(--tk-com); font-style: italic; }
.hljs-number, .hljs-literal, .hljs-symbol { color: var(--tk-num); }
.hljs-title, .hljs-title.function_, .hljs-function .hljs-title { color: var(--tk-title); }
.hljs-type, .hljs-class .hljs-title, .hljs-title.class_ { color: var(--tk-type); }
.hljs-attr, .hljs-variable, .hljs-property, .hljs-params { color: var(--tk-attr); }
.hljs-meta, .hljs-doctag { color: var(--tk-meta); }
.hljs-deletion { color: var(--tk-del); }

.chapter-body .table-wrap {
  margin: 1.2em 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
.chapter-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.chapter-body th, .chapter-body td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.chapter-body th { background: var(--surface-2); font-weight: 600; }
.chapter-body tbody tr:last-child td { border-bottom: 0; }
.chapter-body tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }

/* 图片与图示 */
.figure { margin: 1.6em auto; text-align: center; }
.figure img {
  display: block;
  margin: 0 auto;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  box-sizing: border-box;
  max-width: 100%;
}
.figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.figure.diagram {
  padding: 14px;
  border-radius: 14px;
  background: #ffffff;
  overflow-x: auto;
}
.figure.diagram.diagram-30, .figure.diagram.diagram-60 { box-sizing: border-box; }
.figure.diagram.diagram-30 { width: 30%; }
.figure.diagram.diagram-60 { width: 60%; }
.diagram-svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }

/* 公式 */
.katex-display { margin: 1em 0; padding: 4px 0; overflow-x: auto; overflow-y: hidden; }

/* 上下章导航 */
.pager {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.pager-link:hover { border-color: var(--accent-text); transform: translateY(-2px); text-decoration: none; }
.pager-link span { font-size: 12.5px; letter-spacing: .08em; color: var(--muted); }
.pager-link strong { font-size: 15.5px; line-height: 1.5; }
.pager-link.next { text-align: right; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.footer-logo { width: 72px; height: 72px; object-fit: contain; flex: none; }
.footer-text p { margin: 2px 0; color: var(--muted); font-size: 14px; }
.footer-school { color: var(--text) !important; font-weight: 600; }

.scrim { display: none; }

/* ---------- 首页 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: -30%;
  height: 90%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 38%, transparent), transparent);
}

.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(56px, 10vh, 110px) 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent-text);
  font-size: 13px;
  letter-spacing: .12em;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

.hero-title {
  margin: 0 0 22px;
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: .03em;
}
.grad {
  background: linear-gradient(100deg, var(--accent-text) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  max-width: 640px;
  margin: 0 0 34px;
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--muted);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  color: #ffffff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.hero-stats { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 0; }
.hero-stats div { padding-left: 14px; border-left: 2px solid var(--accent); }
.hero-stats dt { font-size: 13px; color: var(--muted); }
.hero-stats dd { margin: 0; font-family: var(--mono); font-size: 30px; font-weight: 700; }

.section { max-width: 1200px; margin: 0 auto; padding: 72px 24px; }
.section-head { margin-bottom: 32px; }
.section-head h2 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 38px); }
.section-head p:not(.eyebrow) { margin: 0; color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.card-body { padding: 18px 22px 20px; }
.card-num { margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: var(--accent-text); }
.card h3 { margin: 6px 0 10px; font-size: 18px; line-height: 1.4; }

/* ---------- 平板 (640 - 1023) ---------- */
@media (max-width: 1023.98px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 20px 16px 0;
  }
  .menu-btn { display: inline-grid; }
  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    z-index: 90;
    width: min(330px, 86vw);
    max-height: none;
    padding: 16px 14px 28px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateX(-104%);
    transition: transform .3s var(--ease);
  }
  .toc-open .sidebar { transform: none; }
  .scrim {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--topbar-h);
    z-index: 80;
    background: rgba(5, 10, 20, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
  }
  .toc-open .scrim { opacity: 1; pointer-events: auto; }
  body.toc-open { overflow: hidden; }
  .chapter-body { padding: 32px 28px 40px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 手机 (< 640) ---------- */
@media (max-width: 639.98px) {
  :root { --topbar-h: 58px; }
  body { font-size: 15px; line-height: 1.75; }
  .topnav { display: none; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15px; }
  .brand img { width: 34px; height: 34px; }
  .topbar-inner { padding: 0 12px; gap: 10px; }
  .layout { padding: 14px 12px 0; }
  .chapter-body { padding: 22px 16px 28px; border-radius: 16px; }
  .chapter-body h1 { font-size: 24px; }
  .chapter-body h2 { font-size: 19px; margin-top: 1.8em; }
  .chapter-body h3 { font-size: 16.5px; }
  .chapter-body table { font-size: 13px; }
  .chapter-body th, .chapter-body td { padding: 8px 9px; }
  .chapter-body pre.code { font-size: 12.5px; padding: 12px; }
  .figure[style] { width: 100% !important; }
  .figure.diagram { padding: 8px; }
  .pager { grid-template-columns: 1fr; }
  .pager-link.next { grid-column: auto; text-align: left; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero-inner { padding: 48px 18px 64px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .hero-stats { gap: 12px 24px; }
  .hero-stats dd { font-size: 24px; }
  .section { padding: 48px 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .theme-wrap { margin-left: auto; }
  .theme-panel { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 教学动画嵌入（2026-10-23 站长更新） */
.anim-video { margin: 1.6em auto; max-width: 880px; width: 100%; box-sizing: border-box; }
.anim-video video { width: 100%; max-width: 100%; height: auto; display: block; background: #000; border-radius: 10px; box-shadow: 0 4px 18px rgba(20, 40, 60, .20); }
.anim-video figcaption { margin-top: .55em; text-align: center; font-size: .92em; color: #5a6a7a; }
@media (max-width: 640px) {
  .anim-video { margin: 1.1em auto; }
  .anim-video video { border-radius: 6px; }
  .anim-video figcaption { font-size: .85em; }
}
