/* ============================================================================
   首页样式（2026-11-03）：一比一参考 tushare.pro 的落地页语言
   —— 白底浅色 / 蓝色渐变 hero / 玻璃统计条 / 圆角 tab 数据区 / 步骤卡 / 青色标签
   只在 <body class="ts-body"> 上生效（仅 index.html），不改变其它页面。
   配色全部走变量，浅色=参考站原样，深色=同一套结构的暗色版。
   ========================================================================== */

/* 首页把强调色从红换成参考站的蓝（按钮 / 链接 / 小标题跟着变） */
body.ts-body {
  --accent: #4F6BFF;
  --accent-soft: rgba(79, 107, 255, 0.12);
  --link: #4F6BFF;
  --ts-bg: #f7faff;
  --ts-surface: #ffffff;
  --ts-line: #e8eef9;
  --ts-line-soft: #eff3fb;
  --ts-text: #1d2129;
  --ts-muted: #6b7280;
  --ts-dim: #9aa3b2;
  --ts-blue: #4f6bff;
  --ts-blue-deep: #2f49d6;
  --ts-blue-soft: #eef2ff;
  --ts-tag-bg: #eff3ff;
  --ts-tag-fg: #5b7cfa;
  background: var(--ts-bg);
  color: var(--ts-text);

  /* ★ 2026-11-05：子页（buy / 插件目录 / 文档 / 平台介绍 / 声明）现在也挂 ts-body。
     把 site.css 那套老变量指向 ts 值 —— card / table / .docs 目录树 / .plugin 卡 /
     .note / .btn 全都吃这几个变量，于是不用逐个改样式就能跟首页同一套配色。
     --border-hover / --shadow / --topbar-bg 保持 site.css 的原值（那边已按深浅色分好）。 */
  --bg: var(--ts-bg);
  --bg-soft: var(--ts-line-soft);
  --card: var(--ts-surface);
  --card-hover: var(--ts-line-soft);
  --text: var(--ts-text);
  --muted: var(--ts-muted);
  --dim: var(--ts-dim);
  --border: var(--ts-line);
}
html[data-theme="dark"] body.ts-body {
  --ts-bg: #0e1116;
  --ts-surface: #161a22;
  --ts-line: #242a35;
  --ts-line-soft: #1d222b;
  --ts-text: #e6e8ec;
  --ts-muted: #9aa1ad;
  --ts-dim: #6b7280;
  --ts-blue-soft: rgba(79, 107, 255, 0.16);
  --ts-tag-bg: rgba(79, 107, 255, 0.14);
  --ts-tag-fg: #97abff;
}

/* ---------- 顶栏：样式已上移到 site.css（2026-11-05 全站统一，所有页面共用一套） ---------- */

/* ---------- hero ---------- */
.ts-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 62px 0 0;
  background:
    radial-gradient(900px 420px at 18% 12%, #eaf3ff 0%, rgba(234, 243, 255, 0) 62%),
    radial-gradient(760px 400px at 84% 6%, #d9ecfe 0%, rgba(217, 236, 254, 0) 58%),
    linear-gradient(180deg, #edf4ff 0%, #e6effd 46%, var(--ts-bg) 100%);
}
html[data-theme="dark"] .ts-hero {
  background:
    radial-gradient(900px 420px at 18% 12%, #16233c 0%, rgba(22, 35, 60, 0) 62%),
    radial-gradient(760px 400px at 84% 6%, #101c30 0%, rgba(16, 28, 48, 0) 58%),
    linear-gradient(180deg, #101724 0%, #0e1116 100%);
}
.ts-hero-inner { position: relative; z-index: 1; }
.ts-hero h1 {
  font-size: 46px; line-height: 1.24; letter-spacing: -1.2px; font-weight: 700;
  margin: 0 0 16px; color: var(--ts-text);
}
.ts-grad {
  background: linear-gradient(96deg, #7d8cff 0%, #4f6bff 52%, #3a54e8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ts-hero .ts-sub {
  color: var(--ts-muted); font-size: 16px; line-height: 1.85;
  max-width: 880px; margin: 0 auto 30px;
}
.ts-hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.ts-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 34px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
}
.ts-btn:hover { text-decoration: none; }
.ts-btn-primary {
  background: linear-gradient(135deg, #7288ff, #4f6bff 60%, #4157f0);
  color: #fff; box-shadow: 0 10px 24px rgba(79, 107, 255, 0.32);
}
.ts-btn-primary:hover { filter: brightness(1.06); }
.ts-btn-ghost { background: var(--ts-surface); color: var(--ts-text); border-color: var(--ts-line); }
.ts-btn-ghost:hover { border-color: #cfd9f2; color: var(--ts-blue); }
html[data-theme="dark"] .ts-btn-ghost:hover { border-color: #3b465c; }

/* 玻璃统计条：通栏（参考站是横贯整屏的浅玻璃带，不是一张圆角卡） */
.ts-stats {
  margin-top: 46px; padding: 26px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(6px);
}
.ts-stats-inner { display: flex; align-items: center; justify-content: center; }
html[data-theme="dark"] .ts-stats {
  border-top-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}
html[data-theme="dark"] .ts-stats-inner { color: inherit; }
.ts-stat { flex: 1 1 0; text-align: center; }
.ts-stat-num {
  font-size: 30px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--ts-blue-deep); margin: 0 0 4px; line-height: 1.2;
}
html[data-theme="dark"] .ts-stat-num { color: #8fa4ff; }
.ts-stat-num small { font-size: 20px; font-weight: 700; }
.ts-stat-label { margin: 0; font-size: 13px; color: var(--ts-muted); }
.ts-stat-sep { width: 1px; height: 34px; background: rgba(140, 160, 200, 0.28); flex: none; }

/* ---------- 通用区块 ---------- */
.ts-section { padding: 62px 0; }
.ts-sec-head { text-align: center; margin-bottom: 28px; }
.ts-sec-head h2 {
  font-size: 34px; font-weight: 700; letter-spacing: -0.8px;
  margin: 0 0 12px; color: var(--ts-text);
}
.ts-sec-head p { color: var(--ts-muted); font-size: 15px; margin: 0 auto; max-width: 760px; }

/* ---------- tab 数据区（参考站 section-data 同构） ---------- */
.ts-tabs-wrap { position: relative; }
.ts-tabs-wrap > input { position: absolute; opacity: 0; pointer-events: none; }
.ts-tabbar {
  display: flex; align-items: center; justify-content: space-between; gap: 2px;
  background: var(--ts-surface); border: 1px solid var(--ts-line);
  border-radius: 12px; padding: 6px 10px; overflow-x: auto;
}
.ts-tabbar label {
  flex: 0 0 auto; text-align: center; white-space: nowrap; cursor: pointer;
  padding: 11px 22px; border-radius: 9px; font-size: 15px; color: #3a4152;
}
html[data-theme="dark"] .ts-tabbar label { color: var(--ts-muted); }
.ts-tabbar label:hover { color: var(--ts-blue); }
.ts-panes { margin-top: 14px; }
.ts-pane { display: none; }

.ts-panel {
  display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 0;
  background: var(--ts-surface); border: 1px solid var(--ts-line);
  border-radius: 16px; overflow: hidden;
}
.ts-panel-left {
  padding: 26px 24px; border-right: 1px solid var(--ts-line);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--ts-blue-soft), transparent 78%);
}
.ts-panel-title { font-size: 21px; font-weight: 700; margin: 0 0 16px; }
.ts-checks { list-style: none; margin: 0 0 auto; padding: 0; }
.ts-checks li {
  position: relative; padding-left: 24px; margin: 0 0 12px;
  font-size: 13.5px; line-height: 1.7; color: var(--ts-muted);
}
.ts-checks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ts-blue-soft); color: var(--ts-blue);
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 700;
}
.ts-panel-left .ts-btn { margin-top: 18px; height: 42px; padding: 0 22px; font-size: 14px; }

.ts-items {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 30px; padding: 26px 26px 30px;
}
.ts-item { min-width: 0; }
.ts-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ts-item-head svg { width: 17px; height: 17px; flex: none; color: var(--ts-blue); }
.ts-item-title { font-size: 15px; font-weight: 600; color: var(--ts-text); margin: 0; }
.ts-item-desc {
  margin: 0 0 10px; font-size: 13px; line-height: 1.7; color: var(--ts-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ts-tag {
  display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 5px;
  background: var(--ts-tag-bg); color: var(--ts-tag-fg);
}

/* tab 选中态（纯 CSS，无需 JS） */
#ts-tab-1:checked ~ .ts-tabbar label[for="ts-tab-1"],
#ts-tab-2:checked ~ .ts-tabbar label[for="ts-tab-2"],
#ts-tab-3:checked ~ .ts-tabbar label[for="ts-tab-3"] {
  background: var(--ts-blue-soft); color: var(--ts-blue); font-weight: 600;
}
#ts-tab-1:checked ~ .ts-panes #ts-pane-1,
#ts-tab-2:checked ~ .ts-panes #ts-pane-2,
#ts-tab-3:checked ~ .ts-panes #ts-pane-3 { display: block; }

/* ---------- 步骤区 ---------- */
.ts-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ts-step {
  background: var(--ts-surface); border: 1px solid var(--ts-line);
  border-radius: 14px; padding: 20px 22px; position: relative;
}
.ts-step b {
  display: block; font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; color: var(--ts-blue); margin-bottom: 10px;
}
.ts-step h3 { font-size: 16px; margin: 0 0 6px; }
.ts-step p { margin: 0; font-size: 13px; color: var(--ts-muted); line-height: 1.7; }
.ts-step::after {
  content: "›"; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  color: #c3cfeb; font-size: 22px; line-height: 1;
}
.ts-step:last-child::after { display: none; }

.ts-feats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px; margin-top: 22px;
  border-top: 1px solid var(--ts-line); padding-top: 24px;
}
.ts-feat h4 { font-size: 14px; margin: 0 0 5px; color: var(--ts-text); }
.ts-feat p { margin: 0; font-size: 13px; color: var(--ts-muted); line-height: 1.7; }

/* ---------- 结尾 CTA ---------- */
.ts-cta {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 20px; padding: 56px 24px;
  background:
    radial-gradient(600px 260px at 22% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
    linear-gradient(120deg, #5d7bff 0%, #4f6bff 46%, #3b51e8 100%);
  color: #fff;
}
.ts-cta h2 { font-size: 30px; margin: 0 0 12px; color: #fff; letter-spacing: -0.6px; }
.ts-cta p { margin: 0 auto 26px; max-width: 640px; color: rgba(255, 255, 255, 0.86); font-size: 15px; }
.ts-cta .ts-btn { background: #fff; color: var(--ts-blue-deep); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
.ts-cta .ts-btn:hover { color: var(--ts-blue-deep); }
.ts-cta-note { margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, 0.78); }

/* ---------- 卖点一：多数据源条（2026-11-04 新增） ---------- */
.ts-sources-sec { padding: 36px 0 0; }
.ts-sources {
  background: var(--ts-surface); border: 1px solid var(--ts-line);
  border-radius: 18px; padding: 26px 28px 22px;
  box-shadow: 0 10px 30px rgba(79, 107, 255, 0.06);
}
html[data-theme="dark"] .ts-sources { box-shadow: none; }
.ts-sources-head { text-align: center; margin-bottom: 20px; }
.ts-sources-head h2 { font-size: 22px; margin: 0 0 8px; color: var(--ts-text); letter-spacing: -0.4px; }
.ts-sources-head p { margin: 0 auto; max-width: 680px; font-size: 13.5px; line-height: 1.75; color: var(--ts-muted); }
.ts-source-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ts-source {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 12px 13px; border-radius: 12px;
  border: 1px solid var(--ts-line-soft); background: var(--ts-bg);
}
.ts-source-mark {
  flex: none; width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; letter-spacing: -0.2px;
  background: var(--brand, #4f6bff);
}
.ts-source-body { min-width: 0; display: block; }
.ts-source-name {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--ts-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ts-source-note {
  display: block; font-size: 11.5px; color: var(--ts-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ts-sources-foot { margin: 14px 0 0; text-align: center; font-size: 11.5px; color: var(--ts-dim); }

/* ---------- 卖点二：三张能力卡 ---------- */
.ts-sell { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ts-sell-card {
  background: var(--ts-surface); border: 1px solid var(--ts-line);
  border-radius: 16px; padding: 24px 22px 20px;
}
.ts-sell-ico {
  width: 34px; height: 34px; border-radius: 10px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ts-blue-soft); color: var(--ts-blue);
}
.ts-sell-ico svg { width: 18px; height: 18px; }
.ts-sell-card h3 { font-size: 16.5px; margin: 0 0 9px; color: var(--ts-text); }
.ts-sell-card > p { margin: 0 0 12px; font-size: 13px; line-height: 1.75; color: var(--ts-muted); }
.ts-sell-card ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ts-line-soft); padding-top: 12px; }
.ts-sell-card li {
  position: relative; padding-left: 17px;
  font-size: 12.5px; line-height: 1.9; color: var(--ts-muted);
}
.ts-sell-card li::before {
  content: "•"; position: absolute; left: 3px; top: 0;
  color: var(--ts-blue); font-weight: 700;
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .ts-source-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-sell { grid-template-columns: 1fr; }

  .ts-hero h1 { font-size: 34px; }
  .ts-panel { grid-template-columns: 1fr; }
  .ts-panel-left { border-right: 0; border-bottom: 1px solid var(--ts-line); }
  .ts-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-steps { grid-template-columns: 1fr; }
  .ts-step::after { display: none; }
  .ts-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .ts-hero { padding-top: 40px; }
  .ts-hero h1 { font-size: 27px; }
  .ts-hero .ts-sub { font-size: 14.5px; }
  .ts-stats { flex-wrap: wrap; gap: 18px 0; padding: 20px 0 24px; }
  .ts-stat { flex: 1 1 44%; }
  .ts-stat-sep { display: none; }
  .ts-stat-num { font-size: 24px; }
  .ts-sec-head h2 { font-size: 24px; }
  .ts-items { grid-template-columns: 1fr; }
  .ts-tabbar label { padding: 10px 12px; font-size: 14px; }
  .ts-cta h2 { font-size: 22px; }
  .ts-cta { padding: 38px 18px; }
  .ts-sources { padding: 20px 16px 18px; }
  .ts-sources-head h2 { font-size: 18px; }
  .ts-source-row { grid-template-columns: 1fr; gap: 8px; }
  .ts-sell-card { padding: 20px 18px; }
}

/* ============================================================================
   子页统一外壳（2026-11-05）
   buy.html / plugin.html / 文档 / 插件目录 / 平台介绍 / 声明 都挂 body.ts-body，
   配色由上面的变量重映射接管；这里只把「标题尺度与留白」对齐首页。
   ========================================================================== */
/* 子页头部：复用首页 .ts-hero 那套渐变底，做成「迷你 hero」 */
body.ts-body .page-head {
  position: relative; overflow: hidden;
  padding: 58px 0 26px;
  background:
    radial-gradient(900px 420px at 18% 12%, #eaf3ff 0%, rgba(234, 243, 255, 0) 62%),
    radial-gradient(760px 400px at 84% 6%, #d9ecfe 0%, rgba(217, 236, 254, 0) 58%),
    linear-gradient(180deg, #edf4ff 0%, #e6effd 46%, var(--ts-bg) 100%);
}
html[data-theme="dark"] body.ts-body .page-head {
  background:
    radial-gradient(900px 420px at 18% 12%, #16233c 0%, rgba(22, 35, 60, 0) 62%),
    radial-gradient(760px 400px at 84% 6%, #101c30 0%, rgba(16, 28, 48, 0) 58%),
    linear-gradient(180deg, #101724 0%, #0e1116 100%);
}
body.ts-body .page-head > .wrap { position: relative; z-index: 1; }
body.ts-body .page-head h2,
body.ts-body .page-head h1 {
  font-size: 36px; letter-spacing: -0.9px; font-weight: 700; margin: 0 0 12px;
}
body.ts-body .page-head p {
  color: var(--ts-muted); font-size: 15.5px; line-height: 1.8; max-width: 820px;
}
/* 只有内容型页面（获取注册码 / 文档类）居中；插件详情页带面包屑，保持左对齐 */
body.ts-body .page-head.center { text-align: center; }
body.ts-body .page-head.center p { margin-left: auto; margin-right: auto; }
body.ts-body .page-head .note { text-align: left; max-width: 820px; margin: 22px auto 0; }

body.ts-body .section { padding: 46px 0; }
body.ts-body .section.tight { padding: 30px 0; }

/* 胶囊按钮：与首页 .ts-btn 同形 */
body.ts-body .btn { border-radius: 999px; padding: 10px 20px; }

/* 卡片：对齐首页 .ts-step 的圆角与内边距 */
body.ts-body .card { border-radius: 16px; padding: 20px; }

/* 文档页（左侧目录树 + 右侧正文）在 ts 底色上补齐标题尺度 */
body.ts-body .docs-side-head { letter-spacing: 0.06em; }
body.ts-body .docs-article h1 { font-size: 32px; letter-spacing: -0.7px; font-weight: 700; }
body.ts-body .docs-article h2 { font-size: 21px; border-bottom-color: var(--ts-line); }

@media (max-width: 620px) {
  body.ts-body .page-head { padding: 40px 0 4px; }
  body.ts-body .page-head h2,
  body.ts-body .page-head h1 { font-size: 25px; }
  body.ts-body .docs-article h1 { font-size: 24px; }
}
