/* OpenStock 官网样式 —— 与产品端 lab_theme.css 同一套配色（深色，红涨绿跌）
   无外链 CDN / 无字体下载 / 无构建步骤，纯静态即可部署。 */

:root {
  color-scheme: dark;
  --bg: #0f1115;
  --bg-soft: #12151c;
  --card: #1a1d24;
  --card-hover: #222630;
  --text: #e6e8ec;
  --muted: #9aa1ad;
  --dim: #6b7280;
  --border: #2a2e37;
  --border-hover: #3a4050;
  --accent: #4f6bff;
  --accent-soft: rgba(79, 107, 255, 0.14);
  --link: #7aa2ff;
  --ok: #86efac;
  --warn: #f59e0b;
  --up: #ef4444;
  --down: #22c55e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --code-bg: rgba(0, 0, 0, 0.32);
  --topbar-bg: rgba(18, 21, 28, 0.94);
  --badge-bg: rgba(0, 0, 0, 0.2);
  --note-warn-fg: #f0e0c0;
  --note-danger-fg: #ffd9da;
  --note-info-fg: #d6e2ff;
  --note-info-bg: rgba(122, 162, 255, 0.08);
  --note-strong: #ffffff;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Mono", monospace;
}

/* ---------- 浅色主题 ----------
   调色板与产品端 main/shared/主题/lab_theme.css 的 html[data-theme="light"] 保持一致，
   免得官网和插件看起来是两个产品。切换逻辑见 assets/site.js 的 initTheme()。 */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fb;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --text: #1f2937;
  --muted: #64748b;
  --dim: #94a3b8;
  --border: #e6ebf2;
  --border-hover: #cbd5e1;
  --accent: #4f6bff;
  --accent-soft: rgba(79, 107, 255, 0.10);
  --link: #2563eb;
  --ok: #059669;
  --warn: #d97706;
  --up: #dc2626;
  --down: #059669;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --code-bg: rgba(15, 23, 42, 0.06);
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --badge-bg: rgba(15, 23, 42, 0.04);
  --note-warn-fg: #7c4a03;
  --note-danger-fg: #8a1c1f;
  --note-info-fg: #1e3a8a;
  --note-info-bg: rgba(37, 99, 235, 0.06);
  --note-strong: #111827;
}

html[data-theme] { background: var(--bg); }

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* 吸顶导航高 60px：页内锚点（docs 左侧目录、disclaimer）跳过去时把标题顶到导航条下面
     ⇒ 用 scroll-padding 给滚动容器留出这段空间，否则 h2 正好被 .topbar 盖住。
     76 = 60（导航）+ 16（留白），与 .toc 的 sticky top 78px 同一口径。 */
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.3; margin: 0 0 12px; font-weight: 650; }
h1 { font-size: 34px; letter-spacing: -0.4px; }
h2 { font-size: 24px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }

code, pre, .mono { font-family: var(--mono); font-size: 13px; }

code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 14px;
  line-height: 1.65;
}
pre code { background: none; border: 0; padding: 0; white-space: pre; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand img {
  width: 34px; height: 34px; display: block;
  border-radius: 8px; object-fit: cover;   /* 用户提供的方版 logo：圆角贴合深色底 */
}
.brand .tag {
  font-size: 11px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 8px; font-weight: 400;
}

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 6px 9px; border-radius: 8px; font-size: 14px;
  white-space: nowrap;
}
.nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--card); }
/* ⚠️ 这两个必须带 .topbar 前缀：通用块里的 .btn 与它们同优先级、且在文件里更靠后
   ⇒ 只写 .nav-toggle / .theme-btn 会被 .btn 的 display/padding 覆盖（窄屏菜单按钮曾因此常显）。
   （"菜单"只在 ≤900px 显示，桌面端顶栏已经带导航） */
.topbar .nav-toggle { display: none; }
/* 深浅色切换：放顶栏、移动端也保留（.nav 在窄屏会收起，按钮不能跟着消失） */
.topbar .theme-btn { padding: 6px 10px; font-size: 15px; line-height: 1; flex: none; }

/* ---------- 统一顶栏（2026-11-05：全站与首页同一套外观） ----------
   这里自带一份 --ts-* 变量：子页的 body 上没有 .ts-body 类，
   不能指望首页 home.css 里那套声明，否则深/浅色都取不到值。 */
.topbar-ts {
  --ts-surface: #ffffff; --ts-line: #e8eef9; --ts-text: #1d2129;
  --ts-muted: #6b7280; --ts-blue: #4f6bff; --ts-blue-soft: #eef2ff; --ts-dim: #9aa3b2;
  background: var(--ts-surface);
  border-bottom: 1px solid var(--ts-line);
  backdrop-filter: none;
}
html[data-theme="dark"] .topbar-ts {
  --ts-surface: #161a22; --ts-line: #242a35; --ts-text: #e6e8ec;
  --ts-muted: #9aa1ad; --ts-blue: #4f6bff; --ts-blue-soft: rgba(79, 107, 255, 0.16);
}
.topbar-ts .wrap { height: 64px; gap: 20px; }
.topbar-ts .brand { color: var(--ts-text); font-size: 17px; font-weight: 700; letter-spacing: 0.01em; }
.topbar-ts .brand img { border-radius: 9px; }
.topbar-ts .nav { gap: 2px; flex-wrap: nowrap; }
.topbar-ts .nav a {
  color: var(--ts-text); font-size: 14px; padding: 7px 9px;
  border-radius: 8px; white-space: nowrap;
}
.topbar-ts .nav a:hover { background: var(--ts-blue-soft); color: var(--ts-blue); }
.topbar-ts .nav a.active { background: none; color: var(--ts-blue); font-weight: 600; }
.topbar-ts .theme-btn { background: var(--ts-surface); border-color: var(--ts-line); color: var(--ts-muted); }
.ts-cta-mini {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: linear-gradient(135deg, #6c8dff, #4f6bff);
  color: #fff !important; font-size: 14px; font-weight: 600;
  padding: 8px 20px; border-radius: 999px; border: 0;
  box-shadow: 0 6px 16px rgba(79, 107, 255, 0.28);
}
.ts-cta-mini:hover { text-decoration: none; filter: brightness(1.05); }
/* 中等宽度：先收掉「免费下载」和品牌副标题，并把导航压紧，别让 10 项换行 */
@media (max-width: 1120px) {
  .ts-cta-mini { display: none; }
  .brand .tag { display: none; }
  .topbar-ts .nav a { padding: 7px 6px; font-size: 13px; }
}

/* ---------- 通用块 ---------- */
.section { padding: 54px 0; }
.section.tight { padding: 34px 0; }
.section-head { margin-bottom: 22px; }
.section-head p { color: var(--muted); max-width: 760px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 14px; margin: 0; }
.card .ico { font-size: 20px; display: block; margin-bottom: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 10px; padding: 9px 16px; font-size: 14px; cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--card-hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #4157f0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; border-radius: 20px; padding: 2px 9px;
  border: 1px solid var(--border); color: var(--muted); background: var(--badge-bg);
  white-space: nowrap;
}
.badge.ready { color: var(--ok); border-color: rgba(134, 239, 172, 0.35); background: rgba(134, 239, 172, 0.08); }
.badge.deps { color: var(--warn); border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.08); }
.badge.config { color: var(--muted); border-color: var(--border); }
.badge.accent { color: var(--accent); border-color: rgba(79, 107, 255, 0.4); background: var(--accent-soft); }

.note {
  border-left: 3px solid var(--warn);
  background: rgba(245, 158, 11, 0.07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px; margin: 0 0 16px; color: var(--note-warn-fg); font-size: 14px;
}
.note.danger { border-color: var(--accent); background: var(--accent-soft); color: var(--note-danger-fg); }
.note.info { border-color: var(--link); background: var(--note-info-bg); color: var(--note-info-fg); }
.note b { color: var(--note-strong); }

/* ---------- 首页 hero ---------- */
.hero { padding: 76px 0 30px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 40% 40% -10%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { font-size: 42px; margin-bottom: 14px; }
.hero .lead { font-size: 17px; color: var(--muted); max-width: 720px; margin-bottom: 22px; }
.hero .meta { color: var(--dim); font-size: 13px; margin-top: 18px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 26px; font-weight: 700; font-family: var(--mono); }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- 插件目录 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
input[type="search"] {
  flex: 1 1 240px; min-width: 200px;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 9px 13px; font-family: inherit; font-size: 14px;
}
input[type="search"]:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  border-radius: 20px; padding: 5px 13px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.chip:hover { background: var(--card-hover); color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: rgba(229, 72, 77, 0.45); color: var(--text); }

.plugins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plugin {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 9px;
  color: inherit; text-decoration: none;      /* 整张卡就是一个链接 */
}
.plugin:hover { border-color: var(--border-hover); text-decoration: none; }
.plugin .top { display: flex; align-items: flex-start; gap: 10px; }
.plugin .ico { font-size: 20px; line-height: 1.2; }
.plugin .meta { min-width: 0; }               /* 让名字/目录能省略号截断 */
.plugin .name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plugin .slug {
  color: var(--dim); font-family: var(--mono); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 描述最多两行 ⇒ 再长也不会把卡片撑高（完整介绍在详情页） */
.plugin .desc {
  color: var(--muted); font-size: 13px; margin: 0; flex: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.plugin .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.plugin .more { margin-top: auto; color: var(--dim); font-size: 12px; }
.plugin:hover .more { color: var(--accent); }
.empty { color: var(--muted); padding: 26px 0; text-align: center; }

/* ---------- 插件详情页（plugin.html） ---------- */
.crumbs { color: var(--dim); font-size: 13px; margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.p-title { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.p-title .ico { font-size: 30px; line-height: 1; }
.p-title h2 { margin: 0; }
.p-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.p-spec { width: 100%; border-collapse: collapse; font-size: 13px; }
.p-spec th, .p-spec td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.p-spec th { color: var(--dim); font-weight: 500; width: 76px; white-space: nowrap; }
.p-spec td { word-break: break-all; }
@media (max-width: 900px) { .p-detail { grid-template-columns: 1fr; } }

/* ---------- 文档 ---------- */
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 34px; align-items: start; }
.toc { position: sticky; top: 78px; font-size: 14px; }
.toc a { display: block; color: var(--muted); padding: 4px 0; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc .t { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; margin: 14px 0 4px; }
.doc-body h2 { margin-top: 34px; padding-top: 6px; }
.doc-body h2:first-child { margin-top: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps > li {
  counter-increment: s; position: relative;
  padding: 0 0 22px 42px; border-left: 1px solid var(--border); margin-left: 13px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(s); position: absolute; left: -14px; top: -2px;
  width: 27px; height: 27px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--border); color: var(--muted);
  display: grid; place-items: center; font-size: 13px; font-family: var(--mono);
}
.steps h3 { margin-bottom: 6px; }
table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: var(--bg-soft); }
td code { white-space: nowrap; }
details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 10px; background: var(--card); }
details summary { cursor: pointer; font-weight: 600; }
details p:last-child { margin-bottom: 0; }

.copy {
  float: right; font-size: 12px; color: var(--muted); background: var(--card);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; cursor: pointer; font-family: inherit;
}
.copy:hover { color: var(--text); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: 30px 0; margin-top: 40px; color: var(--muted); font-size: 13px;
}
.footer .cols { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer ul { list-style: none; padding: 0; margin: 6px 0 0; }
.footer li { margin: 3px 0; }
.footer .fine { margin-top: 18px; color: var(--dim); font-size: 12px; max-width: 760px; }

.page-head { padding: 44px 0 8px; }
.page-head p { color: var(--muted); max-width: 780px; }

@media (max-width: 900px) {
  .grid.c3, .grid.c4, .plugins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg-soft);
    border-bottom: 1px solid var(--border); padding: 10px 22px; flex-direction: column; }
  .topbar .nav-toggle { display: inline-flex; margin-left: auto; }
}
@media (max-width: 620px) {
  .grid.c2, .grid.c3, .grid.c4, .plugins, .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 46px 0 20px; }
}

/* ---------- 下载区块（数字与校验值由 site.js 从 dl/latest.json 注入） ---------- */
.dl-box {
  margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 18px 20px;
}
.dl-box-main {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
}
.dl-box-name code { font-size: 15px; }
.dl-box-meta { margin-top: 6px; color: var(--muted); font-size: 14px; }
.dl-box-meta b { color: var(--text); }
.dl-box-meta .dot { color: var(--dim); }
.dl-box-btn { flex: 0 0 auto; }              /* 必须在本文件后部：与 .btn 同优先级，靠顺序取胜 */
.dl-box-verify { margin: 16px 0 0; }
.dl-box-verify pre { margin: 10px 0 8px; }
.dl-box-verify code { white-space: normal; word-break: break-all; }
@media (max-width: 560px) {
  .dl-box-btn { width: 100%; justify-content: center; }
}

/* 下载点击后的即时反馈（见 site.js 的 initDownloadFeedback） */
.dl-hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.dl-hint.warn { color: var(--warn); }
.dl-hint a { color: var(--link); }
.btn.is-loading { opacity: .75; }

/* ---------- 首页 0.4.11 改版：tushare 式落地页（居中 hero / 三栏能力 / 区块标题居中）
   只新增类，不改动 .hero / .stats / .card 等旧类 —— 其它 7 个页面完全不受影响。 ---------- */
.hero-center { text-align: center; padding: 74px 0 34px; }
.hero-center::before {                     /* 光晕从偏左改成居中，否则居中排版会显得歪 */
  inset: -55% 12% 28% 12%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
}
.hero-center h1 { font-size: 46px; letter-spacing: -0.8px; margin-bottom: 16px; }
/* 760px：一句话里塞了 6 个功能名，660 会断在难看的字上（2026-11-03 首页改版） */
.hero-center .lead { margin: 0 auto 28px; max-width: 760px; line-height: 1.9; }
.hero-center .btn-row { justify-content: center; }
.hero-center .stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 440px; margin: 34px auto 0;
}
.hero-center .meta { margin-top: 16px; }

/* 版本徽标：小圆点 + 版本号 + 日期 */
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--border); background: var(--card);
  border-radius: 20px; padding: 4px 14px; margin-bottom: 20px;
}
.hero-badge b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.hero-badge .sep { color: var(--dim); }
.hero-badge i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.16);
}

.link-arrow { font-size: 14px; color: var(--muted); padding: 9px 4px; }
.link-arrow:hover { color: var(--text); text-decoration: none; }

/* 三栏能力：不用卡片框，靠留白分层（更接近 tushare 的克制感） */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 40px; }
.feat .k {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 10px;
}
.feat h3 { font-size: 19px; margin-bottom: 9px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.section-head.center { text-align: center; }
.section-head.center h2 { font-size: 27px; }
/* 700px：首页三场景那句在 640 会把「面。」挤成孤字（2026-11-03） */
.section-head.center p { margin-left: auto; margin-right: auto; max-width: 700px; }
.btn-row.center { justify-content: center; }

/* 三档包对照 */
.pkg { display: flex; flex-direction: column; gap: 12px; }
.pkg-head { display: flex; align-items: center; gap: 9px; }
.pkg-head h3 { margin: 0; font-size: 18px; }
.pkg .size { color: var(--dim); font-size: 12px; line-height: 1.7; }
.pkg .size code { font-size: 11.5px; }
.pkg ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.pkg ul li { margin: 3px 0; }
.pkg ul b { color: var(--text); font-weight: 600; }
.pkg .btn-row { margin-top: auto; padding-top: 4px; }

/* 三步流程条 */
.flow {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 10px 14px; margin-top: 26px; font-size: 13px; color: var(--muted);
}
.flow b {
  display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: 4px;
  border-radius: 50%; border: 1px solid var(--border); color: var(--text);
  font-family: var(--mono); font-size: 11px; font-weight: 500;
}
.flow .arw { color: var(--dim); }

/* 数据源 */
.sources { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sources .badge { font-size: 13px; padding: 5px 14px; }
.src-note { text-align: center; color: var(--dim); font-size: 12px; margin: 16px auto 0; max-width: 620px; }

@media (max-width: 900px) {
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 26px; }
  .hero-center h1 { font-size: 38px; }
}
@media (max-width: 620px) {
  .feats { grid-template-columns: 1fr; }
  .hero-center { padding: 52px 0 24px; }
  .hero-center h1 { font-size: 31px; }
  .hero-center .lead { font-size: 15.5px; }
  .hero-center .stats { grid-template-columns: 1fr 1fr; }
  .section-head.center h2 { font-size: 23px; }
}

/* ---------- 注册码购买（assets/license-buy.js 画出来的二维码） ---------- */
/* 二维码周围要留白（含静区），深色主题下也必须白底黑块 —— 别跟着主题改颜色 */
.qr-svg { display: inline-block; background: #fff; padding: 10px; border-radius: 10px; line-height: 0; }
.qr-svg svg { width: 190px; height: 190px; display: block; }

/* ---------- 平台介绍（左侧 JSON 目录树 + 右侧 page.md 正文） ----------
   结构与数据源见 assets/docs.js、平台介绍/list.json。
   只做「窄侧栏 + 宽正文」的文档布局，配色全部复用上面的变量。 */
.docs {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
/* 帮助文档页的目录项 = 图标 + 标题（不再带数据源角标，见 assets/plugin-docs.js）。
   ★ 2026-11-21 用户要求：左栏宽度在原 250~290px 基础上**再减三分之一** → 约 167~193px；
   没有角标占位后，6 字标题在这个宽度里也不会折行。其它用 .docs 的页面（平台介绍）保持原宽度。 */
.docs.docs-pd {
  grid-template-columns: minmax(168px, 194px) minmax(0, 1fr);
}
.docs-side {
  position: sticky; top: 78px; max-height: calc(100vh - 100px); overflow-y: auto;
  padding-right: 6px; font-size: 14px;
}
.docs-side-head {
  color: var(--dim); font-size: 12px; letter-spacing: 0.08em;
  margin-bottom: 6px; padding-left: 10px;
}
.docs-side .empty { text-align: left; padding: 10px; }
.docs-tree { display: flex; flex-direction: column; gap: 2px; }
.dt-node {
  display: flex; align-items: center; gap: 7px; width: 100%;
  background: none; border: 0; border-radius: 8px;
  color: var(--text); font: inherit; font-weight: 600; text-align: left;
  padding: 6px 10px; cursor: pointer;
}
.dt-node:hover { background: var(--card); }
.dt-caret {
  flex: none; width: 0; height: 0;
  border-left: 5px solid var(--dim);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  display: inline-block; transform-origin: 50% 50%; transition: transform 0.15s;
}
.dt-group.open > .dt-node .dt-caret { transform: rotate(90deg); }
.dt-children { display: none; flex-direction: column; gap: 1px; }
.dt-group.open > .dt-children { display: flex; }
.dt-leaf {
  display: block; position: relative; color: var(--muted);
  padding: 5px 10px; border-radius: 8px; line-height: 1.5;
}
.dt-leaf:hover { background: var(--card); color: var(--text); text-decoration: none; }
/* 目录项单行布局：图标 | 标题（可省略号）| 数据源角标（不压缩、靠右）
   以前标题是普通 span，宽度不够就按汉字换行，「个股估值分析」会被折成「个股/估值/分析」三行。 */
.dt-leaf {
  display: flex; align-items: center; gap: 6px; min-width: 0;
}
.dt-leaf .dt-ico { flex: none; width: 16px; text-align: center; font-size: 13px; }
.dt-leaf .dt-name {
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dt-leaf .dt-bdgs { flex: none; display: flex; gap: 2px; margin-left: auto; }
.dt-leaf .dt-bdg {
  flex: none; white-space: nowrap; font-size: 10px; line-height: 1.7; padding: 0 4px;
  font-weight: 400; color: var(--dim); border: 1px solid var(--border); border-radius: 4px;
}
.dt-leaf.on { background: var(--card-hover); color: var(--text); font-weight: 600; }
.dt-leaf.on::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px; background: var(--accent);
}

.docs-body { min-width: 0; }
.docs-body .crumbs { color: var(--dim); font-size: 13px; margin-bottom: 16px; }
.docs-body .crumbs .sep { margin: 0 6px; color: var(--border-hover); }

/* 帮助文档（文档/index.html）：正文是插件自带的独立 HTML（iframe），
   高度由该页面自己 postMessage 上报，所以这里不写死 height。 */
.pd-frame {
  display: block; width: 100%; min-height: 420px;
  border: 0; background: transparent;
}
/* 2026-11-10 用户要求：整页只留**页面级**一根滚动条。
   正文 iframe 撑到内容全高（不再自滚），左栏也不再自己滚 ⇒ 页面滚，目录用 sticky 跟着走。
   align-self:stretch 让左栏占满整行高度，sticky 才有可吸附的范围。 */
.docs-side.pd-side { max-height: none; overflow: visible; align-self: stretch; }
@media (max-width: 900px) {
  .docs-side.pd-side { max-height: none; overflow: visible; }
}

.docs-article h1 { font-size: 30px; letter-spacing: -0.4px; margin: 0 0 20px; }
.docs-article h2 {
  font-size: 21px; margin: 34px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.docs-article h3 { font-size: 17px; margin: 24px 0 8px; }
.docs-article h4 { font-size: 15px; margin: 20px 0 6px; }
.docs-article > h1:first-child,
.docs-article > h2:first-child { margin-top: 0; }
.docs-article ul, .docs-article ol { margin: 0 0 14px; padding-left: 24px; }
.docs-article li { margin: 4px 0; }
.docs-article li > ul, .docs-article li > ol { margin: 4px 0 0; }
.docs-article img {
  max-width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.docs-article blockquote {
  margin: 0 0 16px; padding: 10px 16px;
  border-left: 3px solid var(--border-hover); background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted);
}
.docs-article blockquote p:last-child { margin-bottom: 0; }
.docs-article hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.docs-article table { margin: 0 0 16px; }
.docs-article th { font-weight: 600; }
.docs-article .empty { text-align: left; padding: 16px 0; }
.docs-article pre { position: relative; }

@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 20px; }
  .docs-side {
    position: static; max-height: none; overflow: visible;
    border-bottom: 1px solid var(--border); padding-bottom: 12px;
  }
}

/* ---------- 插件目录（左侧插件树 + 右侧详情，assets/plugins.js） ----------
   骨架复用上面 .docs / .dt-*，这里只加插件侧的搜索、图标与详情排版。 */
.pl-search {
  margin: 0 0 8px; padding: 2px 0 8px;
  position: sticky; top: 0; z-index: 2; background: var(--bg);
}
.pl-search input[type="search"] { width: 100%; min-width: 0; flex: none; }
.dt-count {
  margin-left: auto; color: var(--dim); font-size: 12px;
  font-variant-numeric: tabular-nums; font-weight: 400;
}
.plugin-side .dt-leaf {
  display: flex; align-items: center; gap: 8px;
}
.pl-leaf .ico { width: 20px; flex: none; text-align: center; }
.pl-leaf .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-leaf .lock { margin-left: auto; font-size: 11px; line-height: 1; flex: none; }
.pl-overview { margin-bottom: 6px; }

#pl-detail { min-width: 0; }
.pl-article .p-title { margin-bottom: 6px; }
.pl-article .p-title h2 { font-size: 26px; }
.pl-article .p-desc { color: var(--muted); max-width: 780px; }
.pl-article .p-desc p { margin: 0 0 8px; }
.pl-article .p-desc p:last-child { margin-bottom: 0; }
.pl-spec-full { margin-top: 24px; }
.pl-spec-full h3 { margin-bottom: 10px; }
.pl-spec-full .pl-spec-card { padding: 4px 14px; }
.pl-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.pl-actions { margin-top: 16px; }
.pl-spec-wrap { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 24px; }
.pl-spec-card { padding: 0; overflow: hidden; }
.pl-spec-note { color: var(--dim); font-size: 12px; margin-top: 10px; }
.pl-shots { margin-top: 28px; }
.pl-shots h3 { margin-bottom: 12px; }
.pl-buy {
  margin: 16px 0 0; padding: 16px 18px;
  border: 1px solid var(--border); background: var(--card); border-radius: var(--radius);
}
.pl-buy h3 { margin-bottom: 8px; }
.pl-buy p { color: var(--muted); font-size: 14px; }

.pl-overview-body h1 { font-size: 30px; letter-spacing: -0.4px; }
.pl-stats { margin: 24px 0 26px; }
.pl-tiers { margin-bottom: 8px; }
.pl-tiers .card p { line-height: 1.75; }

@media (max-width: 900px) {
  .pl-spec-wrap { grid-template-columns: 1fr; }
}

/* 发布模式切换（2026-12-01）：完整包 / 在线安装器两套文案。
   由 site.js 按 download.json 里有没有 setup 档切换；默认显示完整包口径（与当前发布一致）。 */
.is-off { display: none !important; }
