@charset "UTF-8";

/* ============================================================
   SuperMemo 中文官网 — 全局通用样式 common.css
   主题色: 靛蓝 #6366F1 + 青色 #22D3EE ｜ 深色主题
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --sm-primary: #6366F1;       /* 靛蓝 Indigo */
  --sm-primary-light: #818CF8;
  --sm-primary-dark: #4F46E5;
  --sm-accent: #22D3EE;        /* 青色 Cyan — 与靛蓝和谐的冷色点缀 */
  --sm-accent-dark: #0891B2;
  --sm-bg: #080B16;
  --sm-bg-soft: #0E1322;
  --sm-bg-card: #141A2C;
  --sm-bg-elevated: #1B2236;
  --sm-border: #28324C;
  --sm-text: #E9ECF7;
  --sm-text-muted: #9AA3BD;
  --sm-text-dim: #6A7390;
  --sm-radius: 14px;
  --sm-radius-sm: 9px;
  --sm-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --sm-max: 1200px;
  --sm-nav-h: 72px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑",
    "Helvetica Neue", Arial, sans-serif;
  background: var(--sm-bg);
  color: var(--sm-text);
  line-height: 1.75;
  font-size: 16px;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- 中英混排排版：中文与英文间留白 ---------- */
/* 行内英文 / 数字片段统一用 .en 包裹，左右自动留白 */
.en {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  margin: 0 0.18em;
  letter-spacing: 0.02em;
}
.en:first-child { margin-left: 0; }
.en:last-child { margin-right: 0; }

/* ---------- 通用容器 ---------- */
.sm-container {
  width: 100%;
  max-width: var(--sm-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 通用按钮 ---------- */
.sm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--sm-radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.sm-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* 主按钮 — 立即购买（突出） */
.sm-btn-primary {
  background: var(--sm-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.42);
}
.sm-btn-primary:hover {
  background: var(--sm-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.55);
}

/* 次按钮 — 下载试用（弱化） */
.sm-btn-ghost {
  background: transparent;
  color: var(--sm-text-muted);
  border-color: var(--sm-border);
}
.sm-btn-ghost:hover {
  color: var(--sm-text);
  border-color: var(--sm-primary-light);
}

/* ============================================================
   导航栏 nav.js 注入样式
   ============================================================ */
.sm-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--sm-nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(10, 14, 23, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--sm-border);
}
.sm-nav__inner {
  width: 100%;
  max-width: var(--sm-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* 品牌区 */
.sm-nav__brand { display: flex; align-items: center; gap: 12px; }
.sm-nav__logo { width: 40px; height: 40px; object-fit: contain; }
.sm-nav__brandtext { display: flex; flex-direction: column; line-height: 1.2; }
.sm-nav__name {
  font-size: 19px;
  font-weight: 700;
  color: var(--sm-text);
  letter-spacing: 0.02em;
}
.sm-nav__by { font-size: 11px; color: var(--sm-text-dim); letter-spacing: 0.02em; }

/* 桌面菜单 */
.sm-nav__inner { flex-wrap: nowrap; }
.sm-nav__menu { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; white-space: nowrap; }
.sm-nav__link {
  padding: 8px 14px;
  border-radius: var(--sm-radius-sm);
  font-size: 15px;
  color: var(--sm-text-muted);
  transition: color 0.18s ease, background 0.18s ease;
}
.sm-nav__link:hover { color: var(--sm-text); background: rgba(255, 255, 255, 0.05); }
.sm-nav__link.is-active { color: var(--sm-text); }

/* 桌面分组下拉 */
.sm-nav__item { position: relative; }
.sm-nav__trigger {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: none; cursor: pointer; font: inherit;
}
.sm-nav__trigger .caret { width: 13px; height: 13px; transition: transform 0.22s ease; }
.sm-nav__item:hover .sm-nav__trigger .caret { transform: rotate(180deg); }
.sm-nav__dropdown {
  position: absolute; top: calc(100% + 14px); left: 0;
  min-width: 210px; padding: 8px;
  background: rgba(13, 18, 30, 0.97);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--sm-border);
  border-radius: 14px;
  box-shadow: var(--sm-shadow);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
/* 悬停桥：补齐触发器与下拉间的空隙，避免移动时丢失 hover */
.sm-nav__dropdown::before {
  content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
}
.sm-nav__item:hover .sm-nav__dropdown,
.sm-nav__item:focus-within .sm-nav__dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.sm-nav__ditem {
  padding: 10px 12px; border-radius: 9px;
  font-size: 14px; color: var(--sm-text-muted); white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.sm-nav__ditem:hover { background: rgba(99, 102, 241, 0.16); color: #fff; }
.sm-nav__ditem.is-active { color: var(--sm-primary-light); background: rgba(99, 102, 241, 0.10); }

/* 语言切换（桌面） */
.sm-nav__lang { position: relative; }
.sm-nav__langbtn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: var(--sm-radius-sm);
  border: 1px solid var(--sm-border); background: transparent;
  color: var(--sm-text-muted); font: inherit; font-size: 14px; cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.sm-nav__langbtn:hover { color: var(--sm-text); border-color: var(--sm-primary-light); }
.sm-nav__langbtn > svg:first-child { width: 16px; height: 16px; }
.sm-nav__langbtn .caret { width: 12px; height: 12px; transition: transform 0.22s ease; }
.sm-nav__lang:hover .sm-nav__langbtn .caret { transform: rotate(180deg); }
.sm-nav__langmenu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 156px; padding: 6px;
  background: rgba(13, 18, 30, 0.97);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--sm-border);
  border-radius: 12px; box-shadow: var(--sm-shadow);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.sm-nav__langmenu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.sm-nav__lang:hover .sm-nav__langmenu,
.sm-nav__lang:focus-within .sm-nav__langmenu { opacity: 1; visibility: visible; transform: translateY(0); }
.sm-nav__langitem {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: var(--sm-text-muted); white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.sm-nav__langitem .lang-check { width: 15px; height: 15px; flex-shrink: 0; opacity: 0; transition: opacity 0.16s ease; }
.sm-nav__langitem:hover { background: rgba(99, 102, 241, 0.16); color: #fff; }
.sm-nav__langitem.is-active { color: var(--sm-primary-light); background: rgba(99, 102, 241, 0.10); }
.sm-nav__langitem.is-active .lang-check { opacity: 1; color: var(--sm-primary-light); }

/* 右侧动作区 */
.sm-nav__actions { display: flex; align-items: center; gap: 12px; }

/* 汉堡按钮 */
.sm-nav__burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius-sm);
  background: var(--sm-bg-card);
  cursor: pointer;
  position: relative;
}
.sm-nav__burger span {
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 2px;
  background: var(--sm-text);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.sm-nav__burger span:nth-child(1) { transform: translate(-50%, -7px); }
.sm-nav__burger span:nth-child(3) { transform: translate(-50%, 5px); }
.sm-nav__burger.is-open span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.sm-nav__burger.is-open span:nth-child(2) { opacity: 0; }
.sm-nav__burger.is-open span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- 移动端弹出菜单 ---------- */
.sm-mobile {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  overflow: hidden; /* 收起状态下面板被平移到右侧屏外，裁掉以免产生横向滚动条 */
}
.sm-mobile__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 13, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sm-mobile__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(82vw, 360px);
  background: linear-gradient(165deg, #131c2e 0%, #0c1322 100%);
  border-left: 1px solid var(--sm-border);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  padding: 26px 24px;
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sm-mobile.is-open { pointer-events: auto; }
.sm-mobile.is-open .sm-mobile__overlay { opacity: 1; }
.sm-mobile.is-open .sm-mobile__panel { transform: translateX(0); }

.sm-mobile__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--sm-border);
}
.sm-mobile__head img { width: 38px; height: 38px; }
.sm-mobile__head .nm { font-size: 18px; font-weight: 700; }
.sm-mobile__head .by { font-size: 11px; color: var(--sm-text-dim); }

.sm-mobile__links { display: flex; flex-direction: column; gap: 4px; }
.sm-mobile__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border-radius: var(--sm-radius-sm);
  font-size: 17px;
  color: var(--sm-text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.sm-mobile__link:hover,
.sm-mobile__link:active {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateX(-3px);
}
.sm-mobile__link svg { width: 18px; height: 18px; color: var(--sm-primary-light); }
.sm-mobile__link span { display: inline-flex; align-items: center; gap: 10px; }

/* 移动端分组手风琴 */
.sm-mobile__group { display: flex; flex-direction: column; }
.sm-mobile__acc {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; text-align: left; cursor: pointer; font: inherit;
  padding: 15px 16px;
  border-radius: var(--sm-radius-sm);
  font-size: 17px; color: var(--sm-text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}
.sm-mobile__acc > span { display: inline-flex; align-items: center; gap: 10px; }
.sm-mobile__acc > span svg { width: 18px; height: 18px; color: var(--sm-primary-light); }
.sm-mobile__acc .caret { width: 18px; height: 18px; color: var(--sm-text-dim); transition: transform 0.26s ease; }
.sm-mobile__group.is-open > .sm-mobile__acc { background: rgba(99, 102, 241, 0.12); border-color: rgba(99, 102, 241, 0.4); }
.sm-mobile__group.is-open > .sm-mobile__acc .caret { transform: rotate(180deg); }
.sm-mobile__sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s ease; }
.sm-mobile__group.is-open .sm-mobile__sub { grid-template-rows: 1fr; }
.sm-mobile__sub > div { overflow: hidden; }
.sm-mobile__sublink {
  display: block; margin: 3px 0 3px 14px;
  padding: 11px 16px; border-radius: var(--sm-radius-sm);
  font-size: 15px; color: var(--sm-text-muted);
  border-left: 2px solid var(--sm-border);
  transition: background 0.18s ease, color 0.18s ease;
}
.sm-mobile__sublink:hover, .sm-mobile__sublink:active { background: rgba(99, 102, 241, 0.12); color: #fff; }
.sm-mobile__sublink.is-active { color: var(--sm-primary-light); border-left-color: var(--sm-primary-light); }

/* 移动端语言切换 */
.sm-mobile__lang { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sm-border); }
.sm-mobile__langhead {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--sm-text-dim); margin-bottom: 12px;
}
.sm-mobile__langhead svg { width: 16px; height: 16px; color: var(--sm-primary-light); }
.sm-mobile__langgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sm-mobile__langitem {
  padding: 11px 14px; border-radius: var(--sm-radius-sm);
  font-size: 15px; color: var(--sm-text-muted); text-align: center;
  background: rgba(255, 255, 255, 0.02); border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.sm-mobile__langitem:hover, .sm-mobile__langitem:active { background: rgba(99, 102, 241, 0.12); color: #fff; }
.sm-mobile__langitem.is-active { color: var(--sm-primary-light); border-color: rgba(99, 102, 241, 0.45); background: rgba(99, 102, 241, 0.12); }

.sm-mobile__cta { margin-top: 24px; padding-top: 24px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--sm-border); }
.sm-mobile__cta .sm-btn { width: 100%; justify-content: center; padding: 14px; }

/* ============================================================
   页脚 footer.js 注入样式
   ============================================================ */
.sm-footer {
  background: linear-gradient(180deg, #0a0e17 0%, #070a11 100%);
  border-top: 1px solid var(--sm-border);
  padding: 56px 0 28px;
  margin-top: 40px;
}
.sm-footer__inner {
  max-width: var(--sm-max);
  margin: 0 auto;
  padding: 0 24px;
}
.sm-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--sm-border);
}
.sm-footer__brand { display: flex; align-items: center; gap: 14px; }
.sm-footer__brand img { width: 48px; height: 48px; }
.sm-footer__brand .nm { font-size: 22px; font-weight: 700; }
.sm-footer__brand .by { font-size: 12px; color: var(--sm-text-dim); }

.sm-footer__contact { display: flex; flex-direction: column; gap: 10px; }
.sm-footer__contact .row { display: flex; align-items: center; gap: 10px; color: var(--sm-text-muted); font-size: 15px; }
.sm-footer__contact .row svg { width: 18px; height: 18px; color: var(--sm-primary-light); flex-shrink: 0; }
.sm-footer__contact .row a:hover { color: var(--sm-text); }

.sm-footer__note {
  margin: 28px 0 22px;
  padding: 18px 20px;
  background: var(--sm-bg-card);
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  color: var(--sm-text-muted);
  font-size: 14px;
  line-height: 1.85;
}
.sm-footer__note .en-note { display: block; margin-top: 8px; color: var(--sm-text-dim); font-size: 13px; }

.sm-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  color: var(--sm-text-dim);
  font-size: 13px;
}

/* ============================================================
   响应式断点
   ============================================================ */
@media (max-width: 1100px) {
  .sm-nav__menu { display: none; }
  .sm-nav__actions .sm-btn { display: none; }
  .sm-nav__lang { display: none; }
  .sm-nav__burger { display: block; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .sm-nav__by { display: none; }
  .sm-footer__top { flex-direction: column; gap: 26px; }
}

/* ============================================================
   文档 / 文章页通用样式（教程类页面共享）
   ============================================================ */
.doc-main { padding-top: var(--sm-nav-h); }

/* 文档页眉 */
.doc-head {
  position: relative;
  padding: 76px 0 56px;
  background:
    radial-gradient(760px 320px at 50% -10%, rgba(99, 102, 241, 0.18), transparent 65%),
    linear-gradient(180deg, #080B16 0%, #0E1322 100%);
  overflow: hidden;
}
.doc-head__inner { max-width: 860px; margin: 0 auto; padding: 0 24px; }
/* 带电梯目录（.doc-layout, 1120px）的页面：英雄区与正文左对齐 */
.doc-head--wide .doc-head__inner { max-width: 1120px; }
.doc-head .doc-tag { font-size: 13px; font-weight: 600; color: var(--sm-accent); letter-spacing: 0.08em; text-transform: uppercase; }
.doc-head h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: #fff; margin: 14px 0 14px; line-height: 1.22; }
.doc-head .lead { font-size: 17px; color: var(--sm-text-muted); line-height: 1.8; max-width: 680px; }

/* 面包屑 */
.doc-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--sm-text-dim); margin-bottom: 22px; }
.doc-crumb a { color: var(--sm-text-muted); }
.doc-crumb a:hover { color: var(--sm-primary-light); }
.doc-crumb .sep { color: var(--sm-text-dim); }

/* 文档主体 */
.doc-section { padding: 56px 0 40px; }
.doc-wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.doc-body { font-size: 16px; color: var(--sm-text-muted); line-height: 1.9; }
.doc-body > * + * { margin-top: 18px; }
.doc-body h2 {
  font-size: 24px; color: #fff; font-weight: 700;
  margin: 44px 0 6px; padding-left: 14px; position: relative; line-height: 1.3;
  scroll-margin-top: calc(var(--sm-nav-h) + 20px);
}
.doc-body h3 { scroll-margin-top: calc(var(--sm-nav-h) + 20px); }
[id] { scroll-margin-top: calc(var(--sm-nav-h) + 20px); }
.doc-body h2::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, var(--sm-primary-light), var(--sm-accent));
}
.doc-body h3 { font-size: 19px; color: var(--sm-text); font-weight: 700; margin: 30px 0 4px; }
.doc-body p { color: var(--sm-text-muted); }
.doc-body strong, .doc-body b { color: var(--sm-text); font-weight: 600; }
.doc-body a:not(.sm-btn) { color: var(--sm-primary-light); }
.doc-body a:not(.sm-btn):hover { text-decoration: underline; }
/* 按钮在文档正文中保持自身配色，避免被链接色覆盖 */
.doc-body a.sm-btn { text-decoration: none; }
.doc-body a.sm-btn-primary { color: #fff; }
.doc-body a.sm-btn-ghost { color: var(--sm-text-muted); }

/* 列表 */
.doc-body ul, .doc-body ol { padding-left: 4px; }
.doc-body ul li, .doc-body ol li {
  position: relative; padding-left: 26px; margin-top: 12px;
  color: var(--sm-text-muted); line-height: 1.8;
}
.doc-body ul li::before {
  content: ""; position: absolute; left: 6px; top: 11px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--sm-primary-light);
}
.doc-body ol { counter-reset: docol; }
.doc-body ol li { counter-increment: docol; }
.doc-body ol li::before {
  content: counter(docol);
  position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--sm-primary-light);
  background: rgba(99, 102, 241, 0.14);
}

/* 键盘按键 */
.doc-body kbd, .kbd {
  display: inline-block;
  font-family: "Segoe UI", Consolas, monospace;
  font-size: 12.5px; color: var(--sm-text);
  padding: 2px 8px; border-radius: 6px;
  background: var(--sm-bg-elevated);
  border: 1px solid var(--sm-border);
  border-bottom-width: 2px;
}

/* ------------------------------------------------------------
   超长文档：基于滚动的按需渲染（content-visibility）
   仅渲染视口附近的重型区块（配图/表格/提示框/时间线/资源卡），
   离屏内容跳过布局与绘制，大幅降低初次加载与滚动时的卡顿。
   contain-intrinsic-size 的 auto 关键字会记住首次渲染后的真实
   高度，避免反复进出视口时产生布局抖动。
   ------------------------------------------------------------ */
.doc-figure,
.doc-body table,
.doc-timeline,
.il-quote,
.doc-callout,
.doc-links {
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}

/* 图片 / 配图 */
.doc-figure {
  margin: 28px 0;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  overflow: hidden;
  background: var(--sm-bg-card);
}
.doc-figure img { width: 100%; display: block; }
.doc-figure figcaption {
  position: relative;
  padding: 14px 18px; text-align: center;
  font-size: 14px; color: var(--sm-text-muted);
  border-top: 1px solid var(--sm-border);
}
.doc-figure figcaption::before {
  content: ""; position: absolute; top: -7px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px; background: var(--sm-bg-card);
  border-left: 1px solid var(--sm-border); border-top: 1px solid var(--sm-border);
}

/* 提示框 callout（图标徽标 + 卡片，无括号竖条） */
.doc-callout {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 22px; border-radius: var(--sm-radius);
  background: var(--sm-bg-card);
  border: 1px solid var(--sm-border);
  font-size: 15px; color: var(--sm-text-muted); line-height: 1.8;
}
.doc-callout .ic,
.doc-callout > svg {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.14);
  color: var(--sm-primary-light);
}
.doc-callout > svg { padding: 9px; }
.doc-callout.accent .ic,
.doc-callout.accent > svg { background: rgba(34, 211, 238, 0.16); color: var(--sm-accent); }
.doc-callout .ic svg { width: 22px; height: 22px; }

/* 资源链接列表卡片 */
.doc-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.doc-links a {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 16px 18px; border-radius: 12px;
  background: var(--sm-bg-card); border: 1px solid var(--sm-border);
  font-size: 14.5px; color: var(--sm-text); line-height: 1.6;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.doc-links a:hover { transform: translateY(-3px); border-color: rgba(99,102,241,0.5); text-decoration: none; }
.doc-links a svg { width: 17px; height: 17px; color: var(--sm-primary-light); flex-shrink: 0; margin-top: 2px; }
.doc-links a small { display: block; color: var(--sm-text-dim); font-size: 12.5px; margin-top: 3px; }

@media (max-width: 640px) {
  .doc-links { grid-template-columns: 1fr; }
  .doc-section { padding: 40px 0 36px; }
}

/* ============================================================
   电梯式竖排目录（通用组件，配合 js/toc.js）
   用法：.doc-layout > .doc-layout__main + aside.elevator
   ============================================================ */
.doc-layout {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) 220px;
  gap: 56px; align-items: start;
}
.doc-layout__main { min-width: 0; }

.elevator { position: sticky; top: calc(var(--sm-nav-h) + 24px); }
.elevator .t { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sm-text-dim); margin-bottom: 16px; padding-left: 18px; }
.elevator nav { position: relative; }
.elevator nav::before {
  content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px;
  width: 2px; border-radius: 2px; background: var(--sm-border);
}
.elevator a {
  position: relative; display: block;
  padding: 9px 0 9px 18px;
  font-size: 14px; line-height: 1.5; color: var(--sm-text-dim);
  transition: color 0.2s ease;
}
.elevator a::before {
  content: ""; position: absolute; left: 0; top: 15px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--sm-bg); border: 2px solid var(--sm-border);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.elevator a:hover { color: var(--sm-text); }
.elevator a.active { color: var(--sm-primary-light); font-weight: 600; }
.elevator a.active::before {
  border-color: var(--sm-accent); background: var(--sm-accent);
  transform: scale(1.15); box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .elevator {
    position: static; order: -1; margin-bottom: 32px;
    background: var(--sm-bg-card); border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius); padding: 18px 20px;
  }
  .elevator nav::before { display: none; }
  .elevator a { padding: 7px 0 7px 18px; }
}
