@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --text: #3c3c43;
  --text-heading: #1b1b1f;
  --text-2: #737373;
  --text-3: #8c8c91;
  --border: #e2e2e3;
  --divider: #e8e8ea;
  --brand: #182fa5;
  --brand-hover: #122480;
  --nav-height: 56px;
  --sidebar-width: 252px;
  --article-width: 740px;
  --font: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 80;
  background: var(--bg);
  color: var(--text-heading);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.skip:focus { top: 12px; }

/* Top bar: logo + product switcher */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.menu-btn {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  margin-left: -8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-heading);
  align-items: center;
  justify-content: center;
}
.menu-btn:hover { background: var(--bg-soft); }

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: 28px;
  text-decoration: none;
  color: var(--text-heading);
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; color: var(--text-heading); }
.brand img { width: 30px; height: 24px; }
.brand-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
}

.product-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  min-width: 0;
  gap: 2px;
}

.product-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.product-nav a:hover {
  color: var(--text-heading);
  text-decoration: none;
}
.product-nav a.is-active {
  color: var(--brand);
  font-weight: 600;
}
.product-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 1px 1px 0 0;
}

/* Layout */
.layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - var(--nav-height));
}

.sidebar {
  position: sticky;
  top: var(--nav-height);
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  height: calc(100vh - var(--nav-height));
  overflow: auto;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  padding: 12px 0 48px;
}

.sidebar nav { padding: 0 0 16px; }

.nav-group + .nav-group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.nav-group-toggle {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 18px 8px 20px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
}
.nav-group-toggle:hover { color: var(--text-heading); }
.nav-group-toggle .chev {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.16s ease;
}
.nav-group.is-collapsed .chev { transform: rotate(-90deg); }
.nav-group.is-collapsed .nav-list { display: none; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.nav-list a {
  display: block;
  padding: 6px 20px 6px 28px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
}
.nav-list a:hover {
  color: var(--text-heading);
  text-decoration: none;
}
.nav-list a.is-active {
  color: var(--brand);
  font-weight: 600;
  background: transparent;
}

/* Nested items under 功能说明 */
.nav-list.nested a {
  padding-left: 40px;
  color: #737373;
}
.nav-list.nested a:hover { color: var(--text-heading); }
.nav-list.nested a.is-active { color: var(--brand); }

.nav-aside-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  padding: 12px 20px 8px;
  line-height: 1.4;
}


/* Main + 快速导航 */
.main {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--bg);
}

.local-nav {
  position: sticky;
  top: var(--nav-height);
  z-index: 15;
  background: #fff;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 48px;
}

.toc-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.toc-toggle:hover { color: var(--text-heading); }
.toc-toggle .chev {
  width: 12px;
  height: 12px;
  transition: transform 0.16s ease;
}
.local-nav.is-open .toc-toggle .chev { transform: rotate(90deg); }

.toc-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 48px;
  z-index: 20;
  min-width: 220px;
  max-width: 360px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.local-nav.is-open .toc-panel { display: block; }

.toc-panel a {
  display: block;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.45;
}
.toc-panel a:hover {
  background: var(--bg-soft);
  color: var(--text-heading);
  text-decoration: none;
}

.article {
  max-width: calc(var(--article-width) + 96px);
  margin: 0 auto 0 0;
  padding: 52px 48px 96px;
}

.article h1 {
  margin: 0 0 20px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
  color: var(--text-heading);
}

.lead {
  margin: 0 0 0.4em;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.article h2 {
  margin: 2.4em 0 0.85em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border);
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--text-heading);
}

.article h3 {
  margin: 1.8em 0 0.5em;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--text-heading);
}

.article p { margin: 0 0 1.05em; }

.article ul,
.article ol {
  margin: 0 0 1.25em;
  padding-left: 1.35em;
}
.article li { margin: 0.35em 0; }
.article li::marker { color: var(--text-2); }
.article strong { font-weight: 600; color: var(--text-heading); }

/* Numbered steps — typographic, no badges */
ol.steps {
  list-style: none;
  margin: 1.1em 0 1.5em;
  padding: 0;
  counter-reset: step;
}
ol.steps > li {
  position: relative;
  padding: 0 0 1.15em 2.15rem;
  counter-increment: step;
}
ol.steps > li:last-child { padding-bottom: 0; }
ol.steps > li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.5rem;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}
ol.steps .step-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.2em;
  line-height: 1.5;
}
ol.steps p { margin: 0; color: var(--text); }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; margin: 0.4em 0 1.6em; }
.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.65;
}
.article th,
.article td {
  border-bottom: 1px solid var(--divider);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}
.article th {
  background: #f7f7f8;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 13px;
  border-top: 1px solid var(--divider);
}
.article td:first-child,
.article th:first-child { padding-left: 14px; }

/* Tips */
.note {
  margin: 1.4em 0 1.6em;
  padding: 12px 16px 12px 18px;
  background: #f7f7f8;
  border-left: 3px solid #c8c8ce;
  border-radius: 0 6px 6px 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}
.note p { margin: 0; }

.example {
  margin: 1.1em 0 1.5em;
  padding: 0 0 0 14px;
  border-left: 2px solid #d8d8de;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}
.example p { margin: 0; }

figure.shot { margin: 1.7em 0 1.9em; padding: 0; }
figure.shot img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e6e6ea;
  background: #f4f4f6;
}
figure.shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  text-align: center;
}

.doc-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.updated { margin: 0 0 22px; font-size: 13px; color: var(--text-2); }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  text-decoration: none;
  color: var(--text-heading);
  min-width: 0;
}
.pager a:hover { color: var(--brand); text-decoration: none; }
.pager a:hover .pager-title { text-decoration: underline; text-underline-offset: 3px; }
.pager-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.pager-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pager-next { text-align: right; grid-column: 2; }
.pager-prev { grid-column: 1; }

.site-credit {
  margin-top: 36px;
  font-size: 12px;
  color: #a1a1a6;
}

.backdrop { display: none; }

/* Product intro: in-page sidebar links */
.nav-list a.is-active.hash-pending { font-weight: 500; }

@media (max-width: 1100px) {
  .article { padding: 44px 36px 80px; }
  .local-nav { padding: 0 36px; }
}

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--nav-height);
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    z-index: 30;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.06);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: rgba(20, 20, 24, 0.28);
    z-index: 25;
    border: 0;
    padding: 0;
    width: 100%;
  }
  .product-nav { overflow-x: auto; }
  .article { padding: 32px 22px 72px; }
  .local-nav { padding: 0 22px; }
  .article h1 { font-size: 30px; }
  .article h2 { font-size: 22px; }
  .toc-panel { left: 16px !important; }
}

@media (max-width: 640px) {
  .brand-name { display: none; }
  .topbar { padding: 0 12px; gap: 4px; }
  .product-nav a { padding: 0 10px; font-size: 14px; }
  .pager { grid-template-columns: 1fr; gap: 4px; }
  .pager-next, .pager-prev { grid-column: auto; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar, .nav-group-toggle .chev, .toc-toggle .chev { transition: none; }
}

.manual-home{margin-left:auto;white-space:nowrap;font-size:.875rem;color:inherit}

.manual-demo{background:#f3f7fb;color:#182b42;border:1px solid #dce6ef;border-radius:12px;overflow:hidden;text-align:left}
.manual-demo header{display:flex;justify-content:space-between;gap:12px;padding:12px 16px;background:#e6eef8}
.manual-demo header span{color:#385879;font-size:13px}
.manual-demo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:10px;padding:12px}
.manual-demo-grid>div{background:white;border:1px solid #dce6ef;border-radius:8px;padding:12px}
.manual-demo-grid ul{padding-left:18px;margin:8px 0 0;font-size:14px}
.manual-chapter{scroll-margin-top:120px}
.manual-chapter+.manual-chapter{margin-top:48px;padding-top:24px;border-top:1px solid #dce6ef}
.article [id]{scroll-margin-top:120px}
