/* ELAB-Flow 官网 · Linear 风格深色设计系统
   ------------------------------------------------------------ */

:root {
  --bg: #08090b;
  --bg-2: #0a0b0e;
  --panel: #0e0f13;
  --panel-2: #12141a;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f5f7;
  --muted: #a7adba;
  --faint: #7a8090;
  --brand: #34d399;
  --brand-2: #14b8a6;
  --brand-3: #a7f3d0;
  --ok: #34d399;
  --warn: #f5a524;
  --radius: 16px;
  --sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei UI", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas,
    "Liberation Mono", monospace;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 网格底纹：只在首屏上方渐显，往下淡出，给深色底一点工程感 */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(1280px 880px at 50% -6%, #000 0%, rgba(0, 0, 0, 0.5) 44%, transparent 78%);
  mask-image: radial-gradient(1280px 880px at 50% -6%, #000 0%, rgba(0, 0, 0, 0.5) 44%, transparent 78%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 50% -220px, rgba(52, 211, 153, 0.3), transparent 70%),
    radial-gradient(700px 500px at 108% 18%, rgba(20, 184, 166, 0.14), transparent 72%),
    radial-gradient(620px 460px at -8% 42%, rgba(167, 243, 208, 0.08), transparent 70%),
    radial-gradient(820px 560px at 86% 76%, rgba(56, 189, 248, 0.075), transparent 72%),
    radial-gradient(600px 440px at 14% 94%, rgba(45, 212, 191, 0.06), transparent 74%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

::selection { background: rgba(52, 211, 153, 0.4); color: #fff; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; height: auto; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #06070a; }
::-webkit-scrollbar-thumb {
  background: #23262e;
  border-radius: 6px;
  border: 2px solid #06070a;
}
::-webkit-scrollbar-thumb:hover { background: #333844; }

/* ------------------------------------------------ 导航 */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
  background: #17202e;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 20px -10px rgba(52, 211, 153, 0.85);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.brand:hover .brand-mark {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.42),
    0 10px 24px -10px rgba(52, 211, 153, 1);
}

.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-name em {
  font-style: normal;
  color: var(--faint);
  padding: 0 1px;
}

.brand-ver {
  font-size: 11.6px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 2px;
  margin-left: 8px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.2s, background 0.25s var(--ease);
  white-space: nowrap;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 4px 12px -6px #000;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.star-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 33px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
  font-variant-numeric: tabular-nums;
}

.star-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.star-btn svg { width: 14px; height: 14px; color: #f5c451; }
.star-btn .n { color: var(--muted); }
.star-btn:hover svg { transform: rotate(-12deg) scale(1.08); }
.star-btn svg { transition: transform 0.3s var(--ease); }

/* 导航右上角：全局深色 / 浅色开关 */
.theme-btn {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.theme-btn svg { width: 15px; height: 15px; }
.theme-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

/* 深色下显示「切浅色」的太阳，浅色下显示月亮 */
.theme-btn .ic-moon { display: none; }
.theme-btn .ic-sun { display: block; }
html.light .theme-btn .ic-moon { display: block; }
html.light .theme-btn .ic-sun { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.25s,
    border-color 0.25s;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: linear-gradient(180deg, #5ae9b6 0%, #1fc796 100%);
  color: #052a1e;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 8px 24px -10px rgba(52, 211, 153, 0.9);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.32) inset, 0 14px 30px -12px rgba(52, 211, 153, 1);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-sm { height: 33px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }

/* Hero 第三个按钮：进入仓库 */
.repo-btn { gap: 9px; }
.repo-btn svg { width: 17px; height: 17px; }
.repo-btn:hover {
  border-color: rgba(52, 211, 153, 0.42);
  color: #d9f8e9;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.08);
}

.nav-progress {
  height: 1px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
}

/* ------------------------------------------------ 视图 */
main { position: relative; z-index: 1; }

.view[hidden] { display: none; }

.view-enter { animation: viewIn 0.5s var(--ease) both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

/* ------------------------------------------------ Hero */
.hero {
  padding: 148px 0 60px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(720px 480px at 50% 6%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 480px at 50% 6%, #000 20%, transparent 78%);
  opacity: 0.75;
}

.hero-inner { text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12.8px;
  font-weight: 500;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.pill b { color: var(--text); font-weight: 500; }

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.04); }
}

h1.hero-title {
  margin: 24px auto 0;
  padding: 0 0 0.06em;
  font-size: clamp(76px, 13.4vw, 152px);
  line-height: 0.94;
  letter-spacing: -0.052em;
  font-weight: 700;
  font-feature-settings: "ss01" 1;
}

.grad {
  background: linear-gradient(97deg, #f0fdf4 2%, #a7f3d0 26%, #34d399 58%, #0d9488 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 22px 60px rgba(52, 211, 153, 0.28));
}

/* 标题下的一行身份说明 */
.hero-kicker {
  margin: 22px auto 0;
  font-size: clamp(12.4px, 1.1vw, 13.4px);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero-kicker b {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hero-sub {
  margin: 18px auto 0;
  max-width: 722px;
  font-size: clamp(13.8px, 1.2vw, 15.2px);
  color: var(--muted);
  line-height: 1.95;
  letter-spacing: 0.012em;
  text-wrap: pretty;
}

.hero-sub strong {
  color: #e9edf4;
  font-weight: 600;
  letter-spacing: 0.012em;
}

/* 三句话各自成块：桌面三行对齐，手机也按句断行，不会把下一句的字挤到行尾 */
.hero-sub .hs-l { display: block; text-wrap: pretty; }

.hero-sub code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: #d1fae5;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.26);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--faint);
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 13px; height: 13px; color: #34d399; }

/* 浮动 UI 模型 */
.hero-stage {
  margin-top: 64px;
  position: relative;
  perspective: 1800px;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 4%;
  width: 74%;
  height: 62%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(52, 211, 153, 0.42), transparent 72%);
  filter: blur(56px);
  z-index: 0;
  pointer-events: none;
}

.mock {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b0c10;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 90px -30px rgba(52, 211, 153, 0.55);
  overflow: hidden;
  transform: rotateX(9deg) translateY(16px) scale(0.985);
  opacity: 0;
  transition: transform 1.4s var(--ease), opacity 1s var(--ease);
  will-change: transform;
}

.mock.in {
  opacity: 1;
  transform: rotateX(0deg) translateY(0) scale(1);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  background: linear-gradient(180deg, #14161c, #0e1014);
  border-bottom: 1px solid var(--line);
}

.mock-dots { display: flex; gap: 6px; }
.mock-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: #2b2f38;
}
.mock-dots i:nth-child(1) { background: #40323a; }
.mock-dots i:nth-child(2) { background: #3a3a2d; }
.mock-dots i:nth-child(3) { background: #2d3a34; }

.mock-url {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mock-url b { color: #b9bfd0; font-weight: 500; }

.mock-badge {
  margin-left: auto;
  font-size: 11px;
  color: #63e0b0;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.08);
  border-radius: 999px;
  padding: 2px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mock-badge i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--ok);
}

.mock img { width: 100%; height: auto; }

.mock-shade {
  position: absolute;
  inset: 36px 0 0;
  background: linear-gradient(180deg, transparent 62%, rgba(8, 9, 11, 0.55));
  pointer-events: none;
}

.float-chip {
  position: absolute;
  z-index: 2;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 18, 24, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 18px 40px -20px #000;
  padding: 10px 13px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  will-change: transform;
}

.float-chip.in { opacity: 1; transform: none; }

.float-chip b { color: var(--text); font-weight: 500; }
.float-chip .k { font-family: var(--mono); font-size: 11.5px; }

.chip-1 { left: -3%; top: 26%; }
.chip-2 { right: -3%; top: 15%; }
.chip-3 { right: 2%; bottom: 12%; }

.chip-ico {
  width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}
.chip-ico svg { width: 12px; height: 12px; }
.chip-ico.ok {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: #63e0b0;
}

.mini-bar {
  width: 52px; height: 4px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.1); overflow: hidden;
}
.mini-bar i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #34d399, #14b8a6);
  transform-origin: 0 50%;
  animation: barGrow 1.6s var(--ease) 0.9s both;
}
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 已实测芯片条 */
.trust {
  margin-top: 84px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.trust-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-item {
  font-family: var(--mono);
  font-size: 12.6px;
  font-weight: 500;
  color: #a9afbd;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.trust-item:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.trust-item i { width: 5px; height: 5px; border-radius: 50%; background: #34d399; opacity: 0.9; }

/* ------------------------------------------------ 通用块 */
.block { padding: 118px 0; }
.block.tight { padding: 84px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.8px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #6ee7b7;
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #6ee7b7);
}

h2.title {
  margin: 16px 0 0;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.032em;
  font-weight: 600;
}

.lead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 640px;
  line-height: 1.72;
}

.lead-wide { max-width: 760px; }

.sec-head { max-width: 760px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.sec-head.center .lead { margin-left: auto; margin-right: auto; }
.sec-head.center .eyebrow::before { display: none; }

/* 痛点对照 */
.pain-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.pain {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  position: relative;
  overflow: hidden;
}

.pain::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 120px at 10% 0%, rgba(255, 255, 255, 0.05), transparent 70%);
  pointer-events: none;
}

.pain h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pain p { margin: 0; color: var(--muted); font-size: 14.4px; line-height: 1.7; }

.pain .tag {
  font-family: var(--mono);
  font-size: 11.8px;
  font-weight: 500;
  color: #95a0b0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  display: inline-block;
  margin-bottom: 12px;
}

.pain.solve {
  border-color: rgba(52, 211, 153, 0.4);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.16), rgba(52, 211, 153, 0.03));
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.12), 0 24px 60px -40px rgba(52, 211, 153, 0.9);
}
.pain.solve .tag { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.35); }

/* 五段流程 → agent 工具 */
.tool-rail {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.006));
  padding: 20px 22px 18px;
}

.tr-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tr-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tr-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--faint);
}

.tr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.tr-list li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 13px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.tr-list li:hover {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.07);
}

.tr-list li + li::before {
  content: "→";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  color: rgba(52, 211, 153, 0.55);
}

.tr-k {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #6b7383;
}

.tr-list b {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tr-list code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--brand-3);
  white-space: nowrap;
  align-self: flex-start; /* 不给 stretch，否则命令底块会拉满整格 */
  padding: 1px 6px;
  margin-left: -6px;
  border-radius: 5px;
}

.tr-foot {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--faint);
}

.tr-foot code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #d1fae5;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.24);
  padding: 1px 6px;
  border-radius: 6px;
}

/* ------------------------------------------------ 功能块 */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 64px;
  align-items: center;
  padding: 74px 0;
  border-top: 1px solid var(--line);
}

.feature:first-of-type { border-top: 0; padding-top: 24px; }

.feature.flip .f-copy { order: 2; }
.feature.flip .f-media { order: 1; }

.f-index {
  font-family: var(--mono);
  font-size: 12.8px;
  font-weight: 600;
  color: #7d9d8f;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.f-index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent);
  max-width: 90px;
}

.feature h3 {
  margin: 14px 0 0;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.24;
  letter-spacing: -0.028em;
  font-weight: 600;
}

.feature .f-desc {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15.4px;
  line-height: 1.8;
}

.f-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.f-list li {
  display: flex;
  gap: 10px;
  font-size: 14.2px;
  color: #ccd2dd;
  line-height: 1.62;
}

.f-list svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 4px;
  color: #34d399;
}

.f-list code, .f-desc code, .pain code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: #d1fae5;
}

.f-media { position: relative; }

.shot {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: #0b0c10;
  box-shadow: 0 30px 70px -40px #000, 0 0 60px -40px rgba(52, 211, 153, 0.8);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
  will-change: transform;
}

.shot:hover {
  transform: translateY(-5px);
  box-shadow: 0 44px 90px -44px #000, 0 0 80px -40px rgba(52, 211, 153, 0.9);
}

.shot img { width: 100%; height: auto; }

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  pointer-events: none;
}

.shot-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  font-size: 11.5px;
  color: #d7dbe6;
  background: rgba(10, 11, 14, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
}

.shot-tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }

.shot-cap {
  margin-top: 12px;
  font-size: 12.8px;
  font-weight: 500;
  color: var(--faint);
  padding-left: 2px;
  font-family: var(--mono);
  letter-spacing: 0.01em;
}

/* 次能力网格 */
.cards {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease), background 0.3s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
}

.card:hover .card-shot img { transform: scale(1.02); }

.card-body { padding: 22px 22px 20px; }

.card h4 {
  margin: 0 0 7px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.card h4 svg { width: 15px; height: 15px; color: #6ee7b7; }

.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.card-shot {
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: #0a0b0e;
}

.card-shot img {
  width: 100%;
  height: auto;
  transition: transform 0.8s var(--ease);
}

/* ------------------------------------------------ 代码打字机 */
.code-block {
  margin-top: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0d0e12, #0a0b0e);
  overflow: hidden;
  box-shadow: 0 40px 90px -50px #000;
}

.code-top {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto;
}

.code-tab {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  padding: 5px 11px;
  border-radius: 7px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.code-tab:hover { color: var(--text); }

.code-tab.active {
  color: #dfe3f5;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  padding: 4px 10px;
}

.code-copy {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.code-copy:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.code-copy svg { width: 12px; height: 12px; }

.code-body {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr);
}

.code-pane {
  padding: 18px 0 22px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
  overflow-x: auto;
  min-width: 0;
  min-height: 380px;
}

.code-line {
  display: flex;
  gap: 16px;
  padding: 0 20px 0 0;
  white-space: pre;
  position: relative;
}

.code-line .ln {
  width: 34px;
  text-align: right;
  color: #4d5366;
  flex: 0 0 auto;
  user-select: none;
  font-size: 11.5px;
}

.code-line.hot {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.16), rgba(52, 211, 153, 0.02));
  box-shadow: inset 2px 0 0 #5eead4;
}

.caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #6ee7b7;
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.tk-key { color: #7fe3c0; }
.tk-str { color: #b3e29b; }
.tk-num { color: #ffcf8b; }
.tk-com { color: #4e5566; font-style: italic; }
.tk-fn { color: #a7f3d0; }
.tk-ok { color: #4ee39b; }
.tk-dim { color: #6d7484; }
.tk-warn { color: #ffb86b; }
.tk-punc { color: #7f8798; }

.annot {
  border-left: 1px solid var(--line);
  padding: 22px 22px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(255, 255, 255, 0.012);
}

.annot-item {
  display: flex;
  gap: 11px;
  opacity: 0.28;
  transform: translateX(6px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.annot-item.on { opacity: 1; transform: none; }

.annot-num {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-family: var(--mono);
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.32);
}

.annot-item.on .annot-num { color: #fff; background: rgba(52, 211, 153, 0.5); }

.annot-item h5 {
  margin: 0 0 3px;
  font-size: 12.8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.annot-item p {
  margin: 0;
  font-size: 12.2px;
  color: var(--muted);
  line-height: 1.6;
}

/* ------------------------------------------------ 仪表盘 */
.dash {
  margin-top: 46px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 16px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008));
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -20px;
  width: 90px;
  height: 90px;
  background: radial-gradient(closest-side, rgba(52, 211, 153, 0.22), transparent);
  pointer-events: none;
}

.stat .num {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.stat .num small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }

.stat .lab {
  margin-top: 7px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat .lab i {
  width: 5px; height: 5px; border-radius: 50%; background: #585f70;
}
.stat .lab.accent i { background: #34d399; }

.chart-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  padding: 18px 18px 12px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.chart-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.chart-head h4 { margin: 0; font-size: 13.5px; font-weight: 600; }

.chart-tabs { margin-left: auto; display: flex; gap: 3px; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }

.chart-tab {
  font-size: 11.5px;
  color: var(--faint);
  padding: 3px 9px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.chart-tab.active { color: #e7e9f3; background: rgba(255, 255, 255, 0.08); }

.chart-legend { display: flex; gap: 14px; font-size: 12px; font-weight: 500; color: var(--faint); margin: 6px 0 2px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; }

.chart-svg { width: 100%; height: auto; overflow: visible; margin-top: auto; }

.chart-svg text { font-family: var(--mono); font-size: 10.4px; fill: #8b93a4; }
.chart-svg .val { fill: #c9cede; font-size: 10.6px; }
.chart-svg .grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }

.bar {
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 1s var(--ease);
}
.in .bar { transform: scaleY(1); }
.in .bar:nth-child(2) { transition-delay: 0.09s; }
.in .bar:nth-child(3) { transition-delay: 0.18s; }
.in .bar:nth-child(4) { transition-delay: 0.27s; }
.in .bar:nth-child(5) { transition-delay: 0.36s; }
.in .bar:nth-child(6) { transition-delay: 0.45s; }

.dash-note {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--faint);
  font-family: var(--mono);
}

/* 三入口 */
.entries {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.entry {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  transition: border-color 0.3s, transform 0.4s var(--ease);
}

.entry:hover { border-color: var(--line-strong); transform: translateY(-3px); }

.entry-ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.26);
  color: #9ff0cd;
  margin-bottom: 14px;
}
.entry-ico svg { width: 16px; height: 16px; }

.entry h4 { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.entry p { margin: 0; font-size: 13.2px; color: var(--muted); line-height: 1.65; }
.entry .cmd {
  margin-top: 13px;
  display: block;
  font-family: var(--mono);
  font-size: 12.2px;
  font-weight: 500;
  color: #9ab8ac;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  overflow-x: auto;
  white-space: nowrap;
}

/* ------------------------------------------------ 快速开始 */
.start {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 46px;
  align-items: start;
}

.steps { counter-reset: s; display: grid; gap: 2px; }

.step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }

.step-n {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 11.5px; font-family: var(--mono);
  color: #c7f5e4;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
}

.step h4 { margin: 2px 0 4px; font-size: 14.2px; font-weight: 600; }
.step p { margin: 0 0 8px; font-size: 13.2px; color: var(--muted); }

.cmd-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: #d3d9f0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 10px;
  max-width: 100%;
  overflow-x: auto;
}
.cmd-line b { color: #6b7280; font-weight: 400; }

.term {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d0e12, #08090c);
  box-shadow: 0 40px 80px -50px #000;
}

.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; color: var(--faint);
  background: rgba(255, 255, 255, 0.02);
}

.term pre {
  margin: 0;
  padding: 16px 18px 20px;
  font-family: var(--mono);
  font-size: 12.2px;
  line-height: 1.85;
  color: #b9bfd0;
  overflow-x: auto;
  white-space: pre;
}

/* ------------------------------------------------ Star CTA */
.cta-band {
  margin: 0 auto;
  max-width: var(--max);
  padding: 0 24px;
}

.cta-inner {
  position: relative;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 22px;
  padding: 52px 40px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(600px 200px at 50% 0%, rgba(52, 211, 153, 0.24), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.cta-inner h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
  font-weight: 600;
}

.cta-inner p { margin: 12px auto 0; color: var(--muted); max-width: 480px; font-size: 14.5px; }
.cta-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------ 页脚 */
footer {
  position: relative;
  z-index: 1;
  margin-top: 100px;
  border-top: 1px solid var(--line);
  padding: 54px 0 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.foot-brand p {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.7;
}

.foot-col h5 {
  margin: 0 0 14px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}

.foot-col a {
  display: block;
  font-size: 13px;
  color: #b6bcc9;
  padding: 4px 0;
  transition: color 0.2s;
}
.foot-col a:hover { color: #fff; }

.deps {
  margin-top: 38px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 11.8px;
  color: var(--faint);
  font-family: var(--mono);
}

.deps b { color: #b3b9c5; font-weight: 500; }

.fa-name { color: #c6cbdb; }
.fa-name:hover { color: #fff; }

.foot-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--faint);
}

.author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(145deg, #8bf3dd, #2dd4bf);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #043a2c;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------ 文档页 */
.page-head {
  padding: 132px 0 34px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin: 14px 0 0;
  font-size: clamp(30px, 4.2vw, 46px);
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 1.1;
}

.page-head p { margin: 14px 0 0; color: var(--muted); max-width: 640px; font-size: 15px; }


/* 文档阅读器：左栏 --rail-w / 右索引 --toc-w 由 JS 拖动写入 */
.docs-shell {
  --rail-w: 300px;
  --toc-w: 268px;
  display: grid;
  grid-template-columns: var(--rail-w) 7px minmax(0, 1fr) 7px var(--toc-w);
  align-items: start;
  max-width: 1660px;
  margin: 0 auto;
  padding: 88px 24px 64px;
  gap: 0;
}

.docs-rail {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 96px);
  min-width: 0;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}

.docs-shell.collapsed { grid-template-columns: 0 0 minmax(0, 1fr) 7px var(--toc-w); }
.docs-shell.collapsed .docs-rail { opacity: 0; transform: translateX(-10px); pointer-events: none; overflow: hidden; padding: 0; border-width: 0; }
/* 收起时只隐藏，不 display:none —— 否则 .docs-main 会掉到第 2 列（0px） */
.docs-shell.collapsed .rail-resizer { visibility: hidden; }

/* 右侧索引：可拖宽 / 可收起 */
.docs-shell.toc-collapsed { grid-template-columns: var(--rail-w) 7px minmax(0, 1fr) 0 0; }
.docs-shell.toc-collapsed .docs-toc { opacity: 0; transform: translateX(10px); pointer-events: none; overflow: hidden; padding: 0; border-width: 0; }
.docs-shell.toc-collapsed .toc-resizer { visibility: hidden; }

.docs-shell.collapsed.toc-collapsed { grid-template-columns: 0 0 minmax(0, 1fr) 0 0; }

/* 概览页 / 文章无标题：整条右索引列撤掉 */
.docs-shell.no-toc { grid-template-columns: var(--rail-w) 7px minmax(0, 1fr) 0 0; }
.docs-shell.collapsed.no-toc { grid-template-columns: 0 0 minmax(0, 1fr) 0 0; }
.docs-shell.no-toc .docs-toc,
.docs-shell.no-toc .toc-resizer { display: none; }

.docs-toc {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 96px);
  min-width: 0;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}

.rail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 2px;
  flex: 0 0 auto;
}

.rail-title {
  font-size: 11.8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.rail-hint {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  opacity: 0.92;
}

.rail-btn {
  margin-left: auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.rail-btn svg { width: 13px; height: 13px; }
.rail-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }

/* 教程列表区：自己滚，目录区固定占比 */
.rail-body {
  display: grid;
  gap: 10px;
  min-height: 96px;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
}

.toc-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding-right: 2px;
}

.docs-toc .toc-list {
  flex: 1 1 auto;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
}

/* 分隔线：可左右拖（左右两条共用） */
.rail-resizer,
.toc-resizer {
  position: sticky;
  top: 76px;
  height: calc(100vh - 100px);
  cursor: col-resize;
  display: flex;
  justify-content: center;
  touch-action: none;
  user-select: none;
}

.rail-resizer i,
.toc-resizer i {
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 2px;
  transition: background 0.18s, width 0.18s;
}

.rail-resizer:hover i,
.rail-resizer:focus-visible i,
.rail-resizer.on i,
.toc-resizer:hover i,
.toc-resizer:focus-visible i,
.toc-resizer.on i { width: 2px; background: rgba(52, 211, 153, 0.7); }
.rail-resizer:focus-visible,
.toc-resizer:focus-visible { outline: none; }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing .rail-resizer i,
body.resizing .toc-resizer i { width: 2px; background: var(--brand); }
html.light .rail-resizer i,
html.light .toc-resizer i { background: rgba(15, 23, 42, 0.12); }

/* 收起后的浮出按钮 */
.rail-open {
  position: fixed;
  left: 0;
  top: 46%;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px 10px 8px;
  border-radius: 0 10px 10px 0;
  border: 1px solid var(--line-strong);
  border-left: 0;
  background: rgba(14, 16, 20, 0.86);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s, background 0.2s, transform 0.2s var(--ease);
}

.rail-open svg { width: 13px; height: 13px; }
.rail-open:hover { color: var(--text); background: rgba(20, 24, 30, 0.95); transform: translateX(2px); }
.rail-open[hidden] { display: none; }

/* 右索引收起后的浮出按钮 */
.toc-open {
  position: fixed;
  right: 0;
  top: 46%;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 10px 12px;
  border-radius: 10px 0 0 10px;
  border: 1px solid var(--line-strong);
  border-right: 0;
  background: rgba(14, 16, 20, 0.86);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s, background 0.2s, transform 0.2s var(--ease);
}

.toc-open svg { width: 13px; height: 13px; }
.toc-open:hover { color: var(--text); background: rgba(20, 24, 30, 0.95); transform: translateX(-2px); }
.toc-open[hidden] { display: none; }

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.search svg { width: 14px; height: 14px; color: var(--faint); flex: 0 0 auto; }

.search input {
  flex: 1;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 13px;
  outline: none;
  min-width: 0;
}

.search input::placeholder { color: var(--faint); }

.doc-list { display: grid; gap: 3px; }

.doc-item {
  display: flex;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  text-align: left;
  width: 100%;
  align-items: flex-start;
}

.doc-item:hover { background: rgba(255, 255, 255, 0.04); }

.doc-item.active {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.28);
}

.doc-item .dn {
  font-family: var(--mono);
  font-size: 11.6px;
  font-weight: 500;
  color: #8d95a8;
  padding-top: 2px;
}

.doc-item.active .dn { color: #34d399; }

.doc-item .dt { display: block; font-size: 13px; color: #d3d8e3; line-height: 1.45; }
.doc-item.active .dt { color: #fff; }
.doc-item .dm { display: block; font-size: 11.8px; font-weight: 500; color: var(--faint); margin-top: 3px; font-family: var(--mono); }

.docs-main {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006));
  padding: 34px 38px 46px;
  margin: 0 22px;
}

.ov-lead { color: var(--muted); font-size: 13.8px; line-height: 1.7; margin: 6px 0 0; }

/* 让正文行宽随侧栏变化也不失控 */
.doc-view .md { max-width: 980px; }

.docs-overview h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }

.ov-head { padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.ov-head h1 { margin: 12px 0 0; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.035em; font-weight: 600; line-height: 1.1; }
.ov-head p { margin: 12px 0 0; color: var(--muted); font-size: 14px; max-width: 620px; line-height: 1.7; }
.ov-sub { font-size: 17px !important; margin-bottom: 2px !important; }

.doc-cards {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.doc-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.doc-card .dc-top { display: flex; align-items: center; gap: 9px; }

.doc-card .dc-n {
  font-family: var(--mono);
  font-size: 11px;
  color: #5eead4;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.26);
  border-radius: 6px;
  padding: 1px 6px;
}

.doc-card h4 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.doc-card p { margin: 0; font-size: 12.6px; color: var(--muted); line-height: 1.6; }
.doc-card .dc-meta { font-size: 11.8px; font-weight: 500; color: var(--faint); font-family: var(--mono); margin-top: auto; padding-top: 4px; }

/* 文档正文 */
.doc-view { display: none; }
.doc-view.on { display: block; }

.doc-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.back-btn:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.back-btn svg { width: 13px; height: 13px; }

.doc-toolbar .spacer { flex: 1; }

.doc-toolbar .doc-meta { font-size: 12px; color: var(--faint); font-family: var(--mono); }

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tool-btn svg { width: 13px; height: 13px; }
.tool-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.tool-btn .ic-moon { display: none; }
html.light .tool-btn .ic-sun { display: none; }
html.light .tool-btn .ic-moon { display: block; }

.doc-toolbar .gh {
  font-size: 12.4px;
  font-weight: 600;
  color: #5eead4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.doc-toolbar .gh:hover { color: #d1fae5; }
.doc-toolbar .gh svg { width: 13px; height: 13px; }
html.light .doc-toolbar .gh { color: #0b6b52; }
html.light .doc-toolbar .gh:hover { color: #064e3b; }

.md {
  font-size: 14.6px;
  line-height: 1.82;
  color: #c7ccd8;
  letter-spacing: -0.005em;
}

.md > *:first-child { margin-top: 0; }
/* 教程里的裸锚点 <a id="7"></a> 由 md2html 转成不可见定位点，不占高度 */
.md .anchor { display: block; height: 0; overflow: hidden; }
.md h1 {
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 18px;
  color: #fff;
  font-weight: 600;
}
.md h2 {
  margin: 40px 0 14px;
  font-size: 20px;
  letter-spacing: -0.024em;
  color: #fff;
  font-weight: 600;
  padding-top: 6px;
  scroll-margin-top: 90px;
}
.md h3 { margin: 28px 0 10px; font-size: 16.5px; color: #eef0f6; font-weight: 600; }
.md h4 { margin: 22px 0 8px; font-size: 14.5px; color: #e4e7f0; font-weight: 600; }
.md p { margin: 13px 0; }
.md a { color: #5eead4; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(94, 234, 212, 0.35); }
.md a:hover { color: #d1fae5; }
.md strong { color: #fff; font-weight: 600; }
.md ul, .md ol { margin: 12px 0; padding-left: 22px; }
.md li { margin: 6px 0; }
.md li::marker { color: #6b7280; }
.md blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 2px solid rgba(52, 211, 153, 0.6);
  background: rgba(52, 211, 153, 0.07);
  border-radius: 0 8px 8px 0;
  color: #b9c0d0;
  font-size: 13.6px;
}
.md blockquote p { margin: 4px 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.md code {
  font-family: var(--mono);
  font-size: 0.865em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: #d1fae5;
  word-break: break-word;
}
.md pre {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.42);
  overflow-x: auto;
  font-size: 12.4px;
  line-height: 1.75;
}
.md pre code {
  background: none;
  border: 0;
  padding: 0;
  color: #b6bdd0;
  font-size: 12.4px;
}
.md img {
  border-radius: 10px;
  border: 1px solid var(--line);
  margin: 16px 0 6px;
  background: #0a0b0e;
}
.md table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 12.8px;
  display: block;
  overflow-x: auto;
}
.md th, .md td {
  border: 1px solid var(--line);
  padding: 8px 11px;
  text-align: left;
  vertical-align: top;
}
.md th { background: rgba(255, 255, 255, 0.04); color: #e6e9f2; font-weight: 600; }
.md tr:nth-child(even) td { background: rgba(255, 255, 255, 0.012); }

/* 本篇目录：右侧栏，随滚动高亮 */
.toc-list a {
  position: relative;
  display: block;
  font-size: 13.2px;
  color: #99a0af;
  padding: 5px 10px 5px 12px;
  line-height: 1.5;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toc-list a.lv3 { padding-left: 26px; font-size: 12.6px; color: #858c9b; }
.toc-list a:hover { color: #e8ebf2; background: rgba(255, 255, 255, 0.04); }

.toc-list a.on {
  color: #34d399;
  font-weight: 500;
  border-left-color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

/* 文末上一篇 / 下一篇 */
.doc-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.doc-pager:empty { display: none; }

.doc-pager a {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
  min-width: 0;
}

.doc-pager a:hover { border-color: rgba(52, 211, 153, 0.34); background: rgba(52, 211, 153, 0.07); transform: translateY(-1px); }
.doc-pager a.next { text-align: right; grid-column: 2; }
.doc-pager .pg-k { display: block; font-size: 11.4px; font-weight: 600; letter-spacing: 0.08em; color: var(--faint); text-transform: uppercase; }
.doc-pager .pg-t { display: block; font-size: 13px; color: var(--text); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================ 全局浅色主题
   作用域：html.light —— 由导航右上角开关切换，首页 / 文档 / 市场一起生效。
   变量层换色，组件层再补硬编码的 rgba(255,255,255,*) 表面。 */
html.light {
  --bg: #eef2f8;
  --bg-2: #e8eef7;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --text: #0f1319;
  --muted: #2b3242;
  --faint: #48515f;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.18);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-2: rgba(255, 255, 255, 0.42);
  --glass-line: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 18px 44px -30px rgba(15, 23, 42, 0.34);
  color-scheme: light;
}

/* 浅色是「浅底深字」，再叠 antialiased 会让中文字干变细、发虚；
   关掉它，字重回到系统默认，观感更实。深色仍然是 antialiased。 */
html.light body {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

/* 浅色背景：一层柔和的彩色雾（薄荷 / 天青 / 淡紫 / 暖黄），让上面的玻璃有颜色可透。
   多层大半径低透明度叠加，避免单个渐变出现明显的圆形边界。 */
html.light body {
  background:
    radial-gradient(980px 660px at 4% -12%, rgba(52, 211, 153, 0.3), transparent 74%),
    radial-gradient(880px 600px at 98% -6%, rgba(96, 165, 250, 0.26), transparent 74%),
    radial-gradient(820px 640px at 78% 48%, rgba(167, 139, 250, 0.17), transparent 76%),
    radial-gradient(760px 600px at 2% 68%, rgba(45, 212, 191, 0.19), transparent 76%),
    radial-gradient(940px 680px at 42% 110%, rgba(251, 191, 36, 0.11), transparent 78%),
    linear-gradient(180deg, #f9fcfe 0%, #eff4fb 46%, #eaf1f9 100%);
  background-attachment: fixed;
}
html.light body::before {
  background:
    radial-gradient(880px 560px at 50% -300px, rgba(255, 255, 255, 0.5), transparent 72%),
    radial-gradient(520px 360px at 24% 30%, rgba(255, 255, 255, 0.28), transparent 70%);
}
html.light body::after { opacity: 0.045; }
html.light::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(1200px 820px at 50% -4%, #000 0%, rgba(0, 0, 0, 0.4) 46%, transparent 76%);
  mask-image: radial-gradient(1200px 820px at 50% -4%, #000 0%, rgba(0, 0, 0, 0.4) 46%, transparent 76%);
}
html.light ::selection { background: rgba(52, 211, 153, 0.3); color: #04231a; }

html.light ::-webkit-scrollbar-track { background: #eceef2; }
html.light ::-webkit-scrollbar-thumb { background: #c9cfd9; border-color: #eceef2; }
html.light ::-webkit-scrollbar-thumb:hover { background: #b3bbc8; }

/* 导航跟着亮（玻璃质感见下方「玻璃层」段） */
html.light .repo-btn:hover { border-color: rgba(16, 185, 129, 0.45); color: #0b6b52; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }

/* 侧栏 */
html.light .doc-item .dt { color: #2b323f; }
html.light .doc-item.active .dt { color: #06392a; }
html.light .doc-item .dn { color: #55606f; }
html.light .doc-item.active .dn { color: #0b7a5c; }
html.light .deps b { color: #474e5c; }
html.light .fa-name { color: #3b4250; }
html.light .fa-name:hover { color: #0b7a5c; }
html.light .toc-list a { color: #4a5361; }
html.light .toc-list a.lv3 { color: #566072; }
html.light .toc-list a:hover { color: #101318; background: rgba(255, 255, 255, 0.7); }
html.light .toc-list a.on { color: #0b7a5c; background: rgba(52, 211, 153, 0.18); border-left-color: #10b981; }

/* 阅读区（背景见下方「玻璃层」段） */
html.light .back-btn:hover,
html.light .tool-btn:hover { color: #101318; background: rgba(255, 255, 255, 0.8); }
html.light .doc-card { background: rgba(255, 255, 255, 0.62); border-color: rgba(255, 255, 255, 0.75); }
html.light .doc-card:hover { background: rgba(255, 255, 255, 0.9); border-color: rgba(255, 255, 255, 0.95); }
html.light .doc-card p { color: #4b5260; }
html.light .doc-pager a:hover { background: rgba(52, 211, 153, 0.1); }

/* 正文排版：深色 → 纸面 */
html.light .md { color: #333b49; }
html.light .md h1,
html.light .md h2,
html.light .md h3,
html.light .md h4,
html.light .md strong { color: #101318; }
html.light .md a { color: #0b7a5c; text-decoration-color: rgba(11, 122, 92, 0.3); }
html.light .md a:hover { color: #075c45; }
html.light .md li::marker { color: #98a0ad; }
html.light .md blockquote {
  background: rgba(52, 211, 153, 0.1);
  border-left-color: #10b981;
  color: #3a4453;
}
html.light .md code {
  background: rgba(15, 23, 42, 0.055);
  border-color: rgba(15, 23, 42, 0.09);
  color: #0b6b52;
}
html.light .md pre {
  background: #f7f8fa;
  border-color: rgba(15, 23, 42, 0.1);
}
html.light .md pre code { color: #2b3442; background: none; border: 0; }
html.light .md img { background: #f1f3f6; border-color: rgba(15, 23, 42, 0.1); }
html.light .md th {
  background: rgba(15, 23, 42, 0.04);
  color: #101318;
}
html.light .md tr:nth-child(even) td { background: rgba(15, 23, 42, 0.014); }

/* ---------------- 首页 / 市场：深色专属表面换成纸面 ---------------- */
html.light .hero-grid {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.055) 1px, transparent 1px);
}
html.light .pill { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.9); }
html.light .hero-glow { opacity: 0.5; }
html.light .float-chip {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.55);
}
html.light .mini-bar { background: rgba(15, 23, 42, 0.12); }
html.light .trust-item { color: #3f4857; background: #fff; }
html.light .trust-item:hover { color: #101318; background: #f3f4f7; }

/* ------------------------------------------------ 玻璃层
   浅色主题的核心观感：卡片是一块块磨砂玻璃，透出背后的薄荷 / 天青 / 淡紫雾。
   三层结构 = 半透明白底 + backdrop blur + 1px 内高光（模拟玻璃边缘的反光）。 */
html.light .pain,
html.light .tool-rail,
html.light .entry,
html.light .pack,
html.light .stat,
html.light .chart-card,
html.light .card,
html.light .upload-card,
html.light .doc-card,
html.light .docs-main,
html.light .prov-default,
html.light .cta-inner {
  background: linear-gradient(152deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.46));
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(15, 23, 42, 0.03),
    0 18px 44px -28px rgba(15, 23, 42, 0.28);
}

html.light .pain.solve {
  background: linear-gradient(152deg, rgba(236, 253, 245, 0.86), rgba(209, 250, 229, 0.46));
  border-color: rgba(16, 185, 129, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 18px 44px -30px rgba(6, 95, 70, 0.36);
}
html.light .pain::after { background: radial-gradient(300px 120px at 10% 0%, rgba(255, 255, 255, 0.55), transparent 70%); }

/* 内嵌的小格子不再叠一层 blur（会糊成一团），只用半透明白 */
html.light .tr-list li,
html.light .trust-item,
html.light .pill,
html.light .pd-item {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(255, 255, 255, 0.8);
}
html.light .tr-list li:hover { background: rgba(255, 255, 255, 0.92); }
html.light .pd-item { background: rgba(255, 255, 255, 0.7); }
html.light .entry:hover,
html.light .pack:hover {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 26px 54px -34px rgba(15, 23, 42, 0.42);
  transform: translateY(-2px);
}

/* 导航 / 工具条 / 按钮：同一套玻璃语言 */
html.light .nav.scrolled {
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(26px) saturate(200%);
  backdrop-filter: blur(26px) saturate(200%);
  border-bottom-color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.05), 0 10px 30px -28px rgba(15, 23, 42, 0.5);
}
html.light .tabs {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
html.light .tab.active {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 14px -8px rgba(15, 23, 42, 0.5);
}
html.light .star-btn,
html.light .btn-ghost,
html.light .search,
html.light .rail-open,
html.light .theme-btn {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px -18px rgba(15, 23, 42, 0.4);
}
html.light .btn-ghost:hover,
html.light .star-btn:hover { background: rgba(255, 255, 255, 0.9); }

/* 文档三栏：侧栏与索引各自一块玻璃板 */
html.light .docs-rail,
html.light .docs-toc {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.34));
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 40px -32px rgba(15, 23, 42, 0.34);
}
html.light .doc-item:hover { background: rgba(255, 255, 255, 0.66); }
html.light .doc-item.active {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(16, 185, 129, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html.light .shot,
html.light .mock {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.07),
    0 30px 66px -40px rgba(15, 23, 42, 0.55);
}

/* 这些面板在浅色主题里**依然是深色**（驾驶舱窗口 / 终端 / 代码块 / 截图），
   里面却大量引用 --text / --muted / --faint。浅色下这些变量会变成深墨色，
   于是深底上压深字 —— 页签、窗口地址栏、行号、注释全都糊掉。
   正解：在这几个容器上把变量重新指回深色主题的一套，子孙全部自动跟随。 */
html.light .mock,
html.light .shot,
html.light .term,
html.light .code-block {
  --text: #f4f5f7;
  --muted: #b6bcc9;
  --faint: #98a0b0;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

html.light .cta-inner {
  background: radial-gradient(620px 220px at 50% 0%, rgba(52, 211, 153, 0.22), transparent 70%),
    linear-gradient(152deg, rgba(255, 255, 255, 0.78), rgba(236, 253, 245, 0.48));
  border-color: rgba(16, 185, 129, 0.3);
}
html.light .foot-col a { color: #4b5260; }
html.light .foot-col a:hover { color: #101318; }
html.light footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08));
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-top-color: rgba(255, 255, 255, 0.7);
}

/* 行内代码：深色的薄荷色在白纸上太淡，统一压成深绿 */
html.light .hero-sub code,
html.light .f-list code,
html.light .f-desc code,
html.light .pain code,
html.light .entry code,
html.light .start code,
html.light .pack code,
html.light .pd-lead code,
html.light .pd-foot code,
html.light .pd-warn code,
html.light .tr-list code,
html.light .tr-foot code {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
  color: #0b6b52;
}

html.light .hero-sub code { background: rgba(52, 211, 153, 0.16); border-color: rgba(16, 185, 129, 0.3); color: #075c45; }
html.light .hero-sub strong { color: #0d1420; }
html.light .eyebrow { color: #0b7a5c; }
html.light .eyebrow::before { background: linear-gradient(90deg, transparent, #10b981); }
html.light .hero-kicker b { color: #0b7a5c; }
html.light .f-index { color: #0b7a5c; }
/* 深色专供的浅灰正文在白纸上几乎看不见，浅色下必须整段压深 */
html.light .f-list li { color: #333a47; }
html.light .f-list svg { color: #0b8a63; }
html.light .shot-cap { color: #3f4857; }
html.light .tr-note { color: #3f4857; }
html.light .tr-k { color: #4f5a6b; }
html.light .pain .tag { color: #46505f; }
html.light .pain.solve .tag { color: #0b7a5c; border-color: rgba(16, 185, 129, 0.35); }
html.light .rail-title,
html.light .rail-hint { color: #414b5a; }
html.light .rail-btn { color: #4b5260; }
html.light .rail-btn:hover { color: #101318; background: rgba(15, 23, 42, 0.05); }

/* 深色专供的浅色文字落在白纸上：步骤序号 / 图表页签 / 默认链取值 */
html.light .step-n { color: #0b7a5c; background: rgba(15, 23, 42, 0.055); }
/* 图表里的坐标刻度 / 柱顶数值：深色是浅灰，浅底上等于消失 */
html.light .chart-svg text { fill: #4b5464; }
html.light .chart-svg .val { fill: #2b3442; }
html.light .chart-svg .grid { stroke: rgba(15, 23, 42, 0.1); }
/* 入口卡图标：薄荷白在浅底上太淡 */
html.light .entry-ico { color: #0b7a5c; background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.3); }
html.light .chart-tabs { background: rgba(15, 23, 42, 0.04); }
html.light .chart-tab.active { color: #101318; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14); }
html.light .pd-item { background: rgba(15, 23, 42, 0.03); }
html.light .pd-item .v { color: #14513f; }
html.light .pd-warn b { color: #96560a; }

/* 命令条：深色主题是「黑底浅字」，浅色主题里 rgba(0,0,0,.4) 落在浅卡片上变成灰底浅字，
   字几乎浮不起来。浅色改成「淡墨底 + 深字」，保留等宽字体的终端观感。 */
html.light .cmd-line {
  color: #123c31;
  background: rgba(15, 23, 42, 0.055);
  border-color: rgba(15, 23, 42, 0.13);
}
html.light .cmd-line b { color: #5a6474; }
html.light .entry .cmd {
  color: #0d4b3a;
  background: rgba(15, 23, 42, 0.055);
  border-color: rgba(15, 23, 42, 0.13);
}

/* 市场卡片 */
html.light .pack-name { color: #101318; }
html.light .pack-foot a { color: #0b7a5c; }
html.light .pack-foot a:hover { color: #075c45; }
html.light .pack-sub { color: #3f4857; }
html.light .pack-cmd {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.85);
  color: #1f6b55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
html.light .chip-tag { color: #4b5260; background: rgba(255, 255, 255, 0.6); border-color: rgba(255, 255, 255, 0.85); }
html.light .pack-ico { background: rgba(255, 255, 255, 0.62); border-color: rgba(255, 255, 255, 0.85); color: #0b7a5c; }
html.light .badge.official { color: #0b7a5c; background: rgba(52, 211, 153, 0.14); border-color: rgba(16, 185, 129, 0.35); }
html.light .badge.community { color: #0e7490; background: rgba(20, 184, 166, 0.12); border-color: rgba(14, 116, 144, 0.3); }
html.light .badge.provider { color: #9a5b00; background: rgba(245, 165, 36, 0.14); border-color: rgba(245, 165, 36, 0.35); }
html.light .pd-warn { background: rgba(245, 165, 36, 0.1); }

/* 上传 / 弹窗 / 提示 */
html.light .modal {
  background: rgba(15, 23, 42, 0.26);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
html.light .modal-box {
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68));
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 50px 110px -50px rgba(15, 23, 42, 0.6);
}
html.light .modal-foot {
  background: rgba(255, 255, 255, 0.5);
  border-top-color: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
html.light .modal-out { background: rgba(15, 23, 42, 0.04); border-color: rgba(255, 255, 255, 0.7); }
html.light .modal-out pre { color: #2b3442; }
html.light .modal-close:hover { color: #101318; background: rgba(255, 255, 255, 0.8); }
html.light .field input,
html.light .field textarea,
html.light .field select {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(15, 23, 42, 0.12);
}
html.light .field input:focus,
html.light .field textarea:focus,
html.light .field select:focus {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
html.light .toast {
  background: rgba(255, 255, 255, 0.82);
  color: #101318;
  border-color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 20px 46px -26px rgba(15, 23, 42, 0.5);
}

/* ================================================ 文档浅色阅读模式 END */

/* ------------------------------------------------ 市场页 */
.mkt-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.mkt-bar .search { max-width: 340px; flex: 1; min-width: 200px; }

.src-note {
  font-family: var(--mono);
  font-size: 11.2px;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.src-note i { width: 5px; height: 5px; border-radius: 50%; background: #34d399; }
.src-note.snap i { background: #f5a524; }

.mkt-grid {
  padding: 30px 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pack {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008));
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.3s;
}

.pack:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -50px #000;
}

.pack-top { display: flex; align-items: flex-start; gap: 12px; }

.pack-ico {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 12px;
  color: #9ff0cd;
  flex: 0 0 auto;
}

.pack-name { font-family: var(--mono); font-size: 14px; color: #fff; }
.pack-sub { font-size: 12.2px; font-weight: 500; color: var(--faint); margin-top: 3px; font-family: var(--mono); }

.badge {
  font-size: 10.5px;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge.official { color: #8fe3c0; border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.1); }
.badge.community { color: #99f6e4; border-color: rgba(20, 184, 166, 0.3); background: rgba(20, 184, 166, 0.12); }
.badge.provider { color: #ffcf9b; border-color: rgba(245, 165, 36, 0.3); background: rgba(245, 165, 36, 0.1); }

.pack-desc { font-size: 13.2px; color: var(--muted); line-height: 1.65; margin: 0; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.chip-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: #a9b0c0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 2px 7px;
}

.pack-cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.6px;
  color: #cfe6da;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  overflow: hidden;
}

.pack-cmd span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.copy-btn {
  margin-left: auto;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  flex: 0 0 auto;
}
.copy-btn:hover { color: #fff; }
.copy-btn svg { width: 12px; height: 12px; }

.pack-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--faint);
  font-family: var(--mono);
  padding-top: 4px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.pack-foot a { color: #5eead4; }
.pack-foot a:hover { color: #d1fae5; }

.mkt-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 46px;
  text-align: center;
  color: var(--faint);
  font-size: 13.5px;
}

.mkt-section-h {
  margin: 34px 0 -8px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.mkt-section-h h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.mkt-section-h span { font-size: 12px; color: var(--faint); font-family: var(--mono); }

/* ---- 内置默认工具链（elab/native）：市场里的第一条，但不是市场条目 ---- */
.prov-default {
  grid-column: 1 / -1;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius);
  padding: 22px 24px 18px;
  background:
    radial-gradient(680px 220px at 4% -30%, rgba(52, 211, 153, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(52, 211, 153, 0.05), rgba(255, 255, 255, 0.012));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.pd-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--brand);
  flex: 0 0 auto;
}

.pd-ico svg { width: 19px; height: 19px; }

.pd-title { min-width: 0; }

.pd-title h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 500;
  color: #fff;
}

.pd-title h4 em { font-style: normal; font-size: 12.4px; color: var(--faint); }
.pd-title > span { display: block; font-size: 12.4px; color: var(--faint); margin-top: 3px; }
.pd-top .badge { margin-left: auto; }

.pd-lead { margin: 0; font-size: 13.6px; color: var(--muted); line-height: 1.75; }
.pd-lead b { color: var(--text); font-weight: 600; }

.pd-lead code,
.pd-foot code,
.pd-warn code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 5px;
  padding: 1px 5px;
  color: #b8f5da;
  white-space: nowrap;
}

.pd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.pd-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.022);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pd-item .k {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--faint);
  text-transform: uppercase;
}

.pd-item .v {
  font-family: var(--mono);
  font-size: 12.4px;
  line-height: 1.45;
  color: #e6fbf2;
  word-break: break-word;
}

.pd-item .d { font-size: 11.8px; line-height: 1.55; color: var(--faint); }

.pd-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pd-steps .pd-lab { font-size: 11.8px; font-weight: 600; letter-spacing: 0.06em; color: var(--faint); margin-right: 2px; }

.chip-tag.ok {
  color: #9ff0cd;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.08);
}

.pd-foot {
  font-size: 11.8px;
  line-height: 1.9;
  color: var(--faint);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pd-foot .pd-k {
  display: inline-block;
  min-width: 52px;
  margin-right: 8px;
  color: #8d9a92;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.pd-warn {
  margin: 0;
  padding: 10px 13px;
  font-size: 12.4px;
  line-height: 1.7;
  color: var(--muted);
  border-left: 2px solid rgba(245, 165, 36, 0.5);
  border-radius: 0 8px 8px 0;
  background: rgba(245, 165, 36, 0.055);
}

.pd-warn b { color: #ffcf9b; font-weight: 600; }

.upload-card {
  margin-top: 26px;
  border: 1px dashed rgba(20, 184, 166, 0.34);
  border-radius: var(--radius);
  padding: 26px;
  background: radial-gradient(400px 160px at 12% 0%, rgba(20, 184, 166, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.014);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.upload-card h4 { margin: 0 0 5px; font-size: 15px; font-weight: 600; }
.upload-card p { margin: 0; font-size: 13px; color: var(--muted); max-width: 560px; line-height: 1.65; }
.upload-card .btn { margin-left: auto; }

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 5, 7, 0.7);
  backdrop-filter: blur(8px);
  animation: fade 0.25s ease both;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }

.modal-box {
  width: min(720px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: #0c0d11;
  box-shadow: 0 50px 120px -40px #000;
  animation: pop 0.35s var(--ease) both;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-close {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
}
.modal-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.modal-close svg { width: 14px; height: 14px; }

.modal-body { padding: 22px 24px; display: grid; gap: 14px; }

.field { display: grid; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.field label b { color: #ef9393; font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 9px;
  padding: 9px 11px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--mono);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus { border-color: rgba(52, 211, 153, 0.6); background: rgba(52, 211, 153, 0.06); }
.field textarea { resize: vertical; min-height: 64px; }
.field .hint { display: block; font-size: 11.8px; font-weight: 500; color: var(--faint); margin-top: 1px; font-family: var(--sans); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.modal-out {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 12px 14px;
  max-height: 200px;
  overflow: auto;
}
.modal-out pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: #b6bdd0;
  white-space: pre;
}

.modal-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 16px;
  border-top: 1px solid var(--line);
  background: #0c0d11;
  flex-wrap: wrap;
}
.modal-foot .tip { font-size: 12px; font-weight: 500; color: var(--faint); margin-right: auto; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 14px);
  z-index: 200;
  background: rgba(20, 22, 28, 0.95);
  border: 1px solid var(--line-strong);
  color: #e7eaf3;
  font-size: 12.8px;
  padding: 9px 16px;
  border-radius: 10px;
  box-shadow: 0 20px 40px -20px #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 滚动揭示 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* 视差容器只过渡透明度，transform 交给 rAF（否则滚动会滞后一帧） */
.f-media.reveal { transition: opacity 0.9s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
  .mock { transform: none !important; opacity: 1 !important; }
}

/* ------------------------------------------------ 响应式 */
@media (max-width: 1060px) {
  .feature { grid-template-columns: 1fr; gap: 34px; padding: 56px 0; }
  .feature.flip .f-copy { order: 1; }
  .feature.flip .f-media { order: 2; }
  .dash { grid-template-columns: 1fr; }
  .start { grid-template-columns: 1fr; gap: 30px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .docs-shell,
  .docs-shell.collapsed,
  .docs-shell.toc-collapsed,
  .docs-shell.collapsed.toc-collapsed,
  .docs-shell.no-toc { grid-template-columns: 1fr; padding: 108px 20px 56px; }
  .rail-resizer,
  .toc-resizer { display: none; }
  .docs-rail { position: static; height: auto; }
  .rail-body { max-height: 42vh; }
  /* 窄屏放不下三栏，右索引整块撤掉（正文内锚点仍可用） */
  .docs-toc { display: none; }
  .docs-shell.collapsed .docs-rail { display: none; }
  .docs-main { margin-left: 0; }
  .doc-list { grid-template-columns: repeat(2, 1fr); display: grid; }
  .pain-grid { grid-template-columns: 1fr; }
  .entries { grid-template-columns: minmax(0, 1fr); }
  .code-body { grid-template-columns: minmax(0, 1fr); }
  .annot { border-left: 0; border-top: 1px solid var(--line); }
  .float-chip { display: none; }
  .pd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .nav-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 8px 14px 0;
    gap: 6px 10px;
  }
  .brand-ver { display: none; }
  .nav-actions { margin-left: auto; }
  .tabs { order: 3; width: 100%; margin: 0 0 8px; justify-content: space-between; }
  .tab { flex: 1; text-align: center; padding: 5px 4px; font-size: 12px; }
  .star-btn .label { display: none; }
  :root:not(.light) .nav { background: rgba(8, 9, 11, 0.78); backdrop-filter: blur(18px) saturate(160%); }
  html.light .nav {
    background: rgba(255, 255, 255, 0.66);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom-color: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.05);
  }
  .hero { padding-top: 156px; }
  .page-head { padding-top: 148px; }
  .mock-badge { display: none; }
  .hero-stage { margin-top: 44px; }
  .block { padding: 76px 0; }
  .cards, .mkt-grid, .doc-cards { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .docs-main { padding: 22px 18px 32px; }
  .doc-pager { grid-template-columns: 1fr; }
  .doc-pager a.next { grid-column: 1; text-align: left; }
  .rail-open { top: auto; bottom: 18px; border-radius: 0 10px 10px 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .cta-inner { padding: 36px 22px; }
  .upload-card .btn { margin-left: 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-sub br { display: none; }
  .hero-sub .hs-l { margin-top: 2px; }
  .tr-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-list li + li::before { display: none; }
  .tool-rail { margin-top: 12px; padding: 18px 16px 16px; }
}

@media (max-width: 560px) {
  .nav-actions .btn span.ver { display: none; }
  .brand-name { font-size: 14px; }
  .doc-list { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .prov-default { padding: 18px 16px 16px; }
  .pd-grid { grid-template-columns: 1fr; }
  .pd-top .badge { margin-left: 0; }
  .pd-foot .pd-k { display: block; min-width: 0; margin: 0 0 1px; }
  .tr-list { grid-template-columns: 1fr; }
  .tr-list li {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding: 10px 12px;
  }
  .tr-list li + li::before {
    display: none;
  }
  .tr-head { margin-bottom: 12px; }
}

/* ================================================ 深色质感增强
   深色不走「白玻璃」，只补表面张力：顶部 1px 高光 + 一道很淡的落影，
   让卡片从纯黑背景里浮起来一点点。 :root:not(.light) 保证不会碰到浅色主题。 */
:root:not(.light) .pain,
:root:not(.light) .tool-rail,
:root:not(.light) .entry,
:root:not(.light) .pack,
:root:not(.light) .stat,
:root:not(.light) .chart-card,
:root:not(.light) .card,
:root:not(.light) .upload-card,
:root:not(.light) .doc-card,
:root:not(.light) .docs-main,
:root:not(.light) .prov-default,
:root:not(.light) .cta-inner {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 0 0 1px rgba(255, 255, 255, 0.012),
    0 26px 50px -40px rgba(0, 0, 0, 0.9);
}

:root:not(.light) .entry:hover,
:root:not(.light) .pack:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 56px -40px rgba(0, 0, 0, 0.95);
}

/* 导航毛玻璃在深色下压得更实，滚动时文字不会和背景光斑打架 */
:root:not(.light) .nav.scrolled {
  background: rgba(8, 9, 11, 0.66);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  backdrop-filter: blur(22px) saturate(190%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.045);
}

/* 页脚小字在浅色玻璃上偏淡，单独压一档 */
html.light .deps,
html.light .foot-bottom { color: #4a5261; }
html.light .deps { border-color: rgba(15, 23, 42, 0.08); }

/* ================================================ 滚动彩雾
   body::before 是 fixed 的（只服务首屏）。滚到中后段就只剩纯黑/纯白，
   这里在 main 上再铺一层随内容滚动的彩雾，让每一屏都有氛围色可透。 */
main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* 用「固定尺寸 + 平铺」而不是百分比：main 高度一万多 px，
     按百分比定位会让光斑全挤在页首，滚到中段就一片纯黑。
     三层不同步长的 radial 叠着平铺，重复感很弱。 */
  background-image:
    radial-gradient(660px 480px at 28% 26%, rgba(45, 212, 191, 0.17), transparent 70%),
    radial-gradient(600px 440px at 74% 58%, rgba(56, 189, 248, 0.14), transparent 72%),
    radial-gradient(720px 520px at 46% 84%, rgba(129, 140, 248, 0.12), transparent 72%);
  background-size: 1420px 1180px, 1660px 1360px, 1920px 1540px;
  background-repeat: repeat;
  background-position: 0 0, 240px 180px, 90px 520px;
}

html.light main::before {
  background-image:
    radial-gradient(680px 500px at 26% 24%, rgba(52, 211, 153, 0.2), transparent 70%),
    radial-gradient(620px 460px at 76% 56%, rgba(96, 165, 250, 0.18), transparent 72%),
    radial-gradient(740px 540px at 44% 84%, rgba(167, 139, 250, 0.15), transparent 72%);
}

/* 深色卡片底再提亮一档：3.5% 白在纯黑上几乎看不见 */
:where(:root:not(.light)) .pain,
:where(:root:not(.light)) .entry,
:where(:root:not(.light)) .pack,
:where(:root:not(.light)) .stat,
:where(:root:not(.light)) .chart-card,
:where(:root:not(.light)) .card,
:where(:root:not(.light)) .tool-rail,
:where(:root:not(.light)) .docs-main,
:where(:root:not(.light)) .upload-card,
:where(:root:not(.light)) .doc-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.022));
}

/* 浅色下渐变标题的左端（#f0fdf4）在白底上等于消失，整体压深一档 */
html.light .grad {
  background: linear-gradient(97deg, #5eead4 0%, #34d399 32%, #10b981 68%, #0b7a5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 18px 46px rgba(16, 185, 129, 0.24));
}

/* 浅色：默认工具链卡的标题写死了 #fff（深色专用），且卡片被统一的玻璃底洗掉了绿色调 */
html.light .prov-default {
  background:
    radial-gradient(680px 240px at 4% -30%, rgba(16, 185, 129, 0.16), transparent 72%),
    linear-gradient(152deg, rgba(255, 255, 255, 0.72), rgba(240, 253, 250, 0.42));
  border-color: rgba(16, 185, 129, 0.3);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 1px rgba(16, 185, 129, 0.06),
    0 18px 44px -30px rgba(6, 95, 70, 0.34);
}
html.light .pd-title h4 { color: #0f211c; }
html.light .pd-title h4 em { color: #0b7a5c; }
html.light .pd-ico { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.32); color: #0b7a5c; }
html.light .pd-lead b { color: #101318; }
html.light .pd-foot .pd-k { color: #4c564f; }
html.light .pd-title > span, html.light .pd-title h4 em { color: #4c564f; }

/* 深色文档页：左右两栏也补一块淡玻璃板，和正文卡对齐（浅色已在玻璃层里写过） */
:where(:root:not(.light)) .docs-rail,
:where(:root:not(.light)) .docs-toc {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}
:where(:root:not(.light)) .doc-item:hover { background: rgba(255, 255, 255, 0.05); }
:where(:root:not(.light)) .search { background: rgba(255, 255, 255, 0.04); }

/* ---------------------------------------------------------- 产品宣传片 */
.promo-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}
.promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}
.promo-card:hover img { transform: scale(1.035); }

.promo-card-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0) 36%, rgba(4, 5, 7, 0.86) 100%);
}

.promo-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 11, 0.55);
  border: 1px solid rgba(167, 243, 208, 0.55);
  color: var(--brand-3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6), 0 0 0 8px rgba(52, 211, 153, 0.08);
  transition: transform 0.28s var(--ease), background 0.28s, box-shadow 0.28s;
}
.promo-play svg { width: 30px; height: 30px; }
.promo-card:hover .promo-play {
  transform: translate(-50%, -50%) scale(1.07);
  background: rgba(52, 211, 153, 0.2);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.65), 0 0 0 12px rgba(52, 211, 153, 0.13);
}

.promo-card-meta {
  position: absolute;
  left: 30px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.promo-card-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.promo-card-sub { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.promo-card-badge {
  position: absolute;
  right: 24px;
  bottom: 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  background: rgba(8, 9, 11, 0.55);
  padding: 5px 10px;
  border-radius: 8px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* 全屏灯箱播放 */
.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: block;
  background: #000;
}
.promo-modal[hidden] { display: none; }
body.no-scroll { overflow: hidden; }

.promo-dialog {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
}

.promo-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  pointer-events: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.promo-title b { color: var(--text); font-weight: 600; letter-spacing: 0.08em; }
.promo-meta { margin-left: 12px; color: var(--faint); }

.promo-close {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 9, 11, 0.55);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.18s, border-color 0.18s;
}
.promo-close:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); }
.promo-close svg { width: 18px; height: 18px; }

.promo-dialog video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

@media (max-width: 640px) {
  .promo-play { width: 64px; height: 64px; }
  .promo-play svg { width: 24px; height: 24px; }
  .promo-card-meta { left: 16px; bottom: 14px; }
  .promo-card-title { font-size: 16px; }
  .promo-card-sub { font-size: 11px; }
  .promo-card-badge { right: 14px; bottom: 14px; }
  .promo-meta { display: none; }
  .promo-head { padding: 12px 14px; }
}
