/* ============================================================
   使用说明（文档页）—— 三栏：左目录 / 中正文 / 右锚点
   ============================================================ */

body.doc {
  background:
    radial-gradient(900px 500px at 12% -6%, rgba(74, 143, 224, .10), transparent 70%),
    #06090d;
}

.g-wrap {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 188px;
  gap: 0;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ---------- 左：目录 ---------- */
.g-side {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 26px 18px 30px;
  border-right: 1px solid rgba(255, 255, 255, .06);
  scrollbar-width: thin;
}
.g-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 26px;
  text-decoration: none;
}
.g-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, rgba(74, 143, 224, .28), rgba(54, 207, 201, .16));
  border: 1px solid rgba(120, 180, 230, .32);
}
.g-mark svg { width: 16px; height: 16px; fill: none; stroke: #8fd4e8; stroke-width: 1.7; }
.g-brand b { display: block; font-size: 14px; color: #e8f2fb; letter-spacing: -.01em; }
.g-brand i {
  display: block; font-style: normal;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 9px; letter-spacing: .18em;
  color: rgba(140, 175, 205, .62); text-transform: uppercase; margin-top: 2px;
}

.g-nav { display: flex; flex-direction: column; gap: 1px; }
.g-nav a {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: #8fa3b8;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: .15s;
}
.g-nav a:hover { color: #d5e6f4; background: rgba(255, 255, 255, .035); }
.g-nav a.on {
  color: #cfe8ff;
  background: rgba(74, 143, 224, .13);
  border-left-color: #4A8FE0;
}
.g-side-foot {
  margin-top: 26px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.g-side-foot a { font-size: 12.5px; color: #7f93a8; text-decoration: none; }
.g-side-foot a:hover { color: #cfe8ff; }

/* ---------- 中：正文 ---------- */
.g-main { padding: 34px 46px 90px; min-width: 0; }
.g-crumb {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: #6d8298; margin-bottom: 18px;
}
.g-crumb a { color: #7f9ab0; text-decoration: none; }
.g-crumb a:hover { color: #cfe8ff; }

.g-h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.12;
  letter-spacing: -.028em;
  font-weight: 700;
  background: linear-gradient(180deg, #fff 15%, #a9c2da 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.g-lead {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.8;
  color: #9db0c4;
}
.g-lead strong { color: #d5e6f4; }

.g-sec { padding-top: 34px; scroll-margin-top: 26px; }
.g-sec h2 {
  margin: 0 0 16px;
  font-size: 21px;
  letter-spacing: -.02em;
  color: #e4eefa;
  font-weight: 650;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.g-sec p {
  margin: 0 0 13px;
  font-size: 14px;
  line-height: 1.85;
  color: #94a8bc;
}
.g-sec p strong { color: #cfe1f0; font-weight: 620; }
.g-sec code {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12.4px;
  padding: 1.5px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .06);
  color: #8fd4c8;
}
.g-sec kbd {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, .05);
  color: #c5d6e6;
}

/* 提示块 */
.g-callout {
  margin: 16px 0 4px;
  padding: 13px 16px;
  border-radius: 10px;
  background: rgba(74, 143, 224, .08);
  border: 1px solid rgba(74, 143, 224, .22);
  border-left: 3px solid #4A8FE0;
}
.g-callout p { margin: 0 !important; font-size: 13.2px !important; color: #9fb8cd !important; }
.g-callout.warn {
  background: rgba(255, 197, 61, .07);
  border-color: rgba(255, 197, 61, .24);
  border-left-color: #FFC53D;
}

/* 步骤 */
.g-steps { margin: 0 0 14px; padding-left: 0; list-style: none; counter-reset: st; }
.g-steps li {
  position: relative;
  counter-increment: st;
  padding: 6px 0 6px 34px;
  font-size: 13.8px;
  line-height: 1.75;
  color: #94a8bc;
}
.g-steps li::before {
  content: counter(st);
  position: absolute; left: 0; top: 7px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10.5px;
  color: #8dc6ec;
  background: rgba(74, 143, 224, .14);
  border: 1px solid rgba(74, 143, 224, .3);
}
.g-steps b { color: #d5e6f4; font-weight: 600; }

/* 功能网格 */
.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
}
.g-card {
  padding: 13px 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid rgba(255, 255, 255, .07);
}
.g-card-t { font-size: 13.4px; font-weight: 620; color: #dbe9f5; margin-bottom: 5px; }
.g-card-d { font-size: 12.2px; line-height: 1.65; color: #8698ac; }

/* 安装命令 */
.g-cmd {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .1);
}
.g-cmd code {
  flex: 1; min-width: 0;
  background: none; padding: 0;
  font-size: 12.6px;
  color: #c3d7e8;
  overflow-x: auto; white-space: nowrap;
}
.g-cmd .btn {
  flex: 0 0 auto; min-width: 62px;
  font-size: 12px; padding: 6px 12px;
}

/* 分类/行业标签 */
.g-tax { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 14px; }
.g-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: #b8cbdd;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 34%, transparent);
}
.g-tag i {
  font-style: normal;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  color: color-mix(in srgb, var(--c) 80%, #ffffff);
}

/* FAQ */
.g-faq { display: flex; flex-direction: column; gap: 8px; }
.g-faq details {
  border-radius: 10px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}
.g-faq summary {
  padding: 12px 15px;
  font-size: 13.6px;
  color: #d3e2ef;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 34px;
}
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after {
  content: "+";
  position: absolute; right: 14px; top: 10px;
  font-size: 17px; color: #6d8aa3;
  transition: .2s;
}
.g-faq details[open] summary::after { transform: rotate(45deg); }
.g-faq details > div {
  padding: 0 15px 13px;
  font-size: 13px;
  line-height: 1.8;
  color: #90a4b8;
}

/* 来源链接 */
.g-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.g-links a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.8px;
  color: #9db4c8;
  text-decoration: none;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .07);
}
.g-links a:hover { color: #cfe8ff; border-color: rgba(74, 143, 224, .4); }
.g-links a i {
  font-style: normal;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 9.5px; color: #6d8298;
}

/* ---------- 右：锚点 ---------- */
.g-toc {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  padding: 34px 16px 30px;
  border-left: 1px solid rgba(255, 255, 255, .06);
  scrollbar-width: thin;
}
.g-toc-t {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #5f7386;
  margin-bottom: 10px;
  font-family: var(--mono, ui-monospace, monospace);
}
.g-toc a {
  display: block;
  padding: 4px 0 4px 9px;
  font-size: 12.2px;
  line-height: 1.5;
  color: #7b8fa3;
  text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, .09);
}
.g-toc a:hover { color: #cfe8ff; border-left-color: #4A8FE0; }

/* ---------- 悬浮语言切换 ---------- */
.g-lang {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 50;
  min-width: 52px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #d5e6f4;
  background: rgba(16, 24, 34, .9);
  border: 1px solid rgba(120, 180, 230, .3);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: .18s;
}
.g-lang:hover {
  color: #fff;
  border-color: rgba(120, 180, 230, .6);
  box-shadow: 0 6px 24px rgba(30, 90, 160, .35);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .g-wrap { grid-template-columns: 220px minmax(0, 1fr); }
  .g-toc { display: none; }
}
@media (max-width: 760px) {
  .g-wrap { grid-template-columns: 1fr; }
  .g-side {
    position: static; height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    padding: 18px 16px 14px;
  }
  .g-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .g-nav a {
    padding: 5px 10px;
    font-size: 12px;
    border-left: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
  }
  .g-nav a.on { border-left: none; }
  .g-main { padding: 22px 18px 70px; }
  .g-sec { padding-top: 26px; }
}
