:root {
  --ink: #17232b;
  --muted: #73808a;
  --soft: #f6f8f9;
  --canvas: #fbfcfc;
  --line: #dce5e9;
  --accent: #126b8d;
  --accent-soft: #e9f4f7;
  --accent-dark: #0c4d68;
  --warning: #a96a1b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.7 "Microsoft YaHei", "PingFang SC", sans-serif;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-inner {
  width: min(1440px, calc(100% - 56px));
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 38px;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 35px; height: 35px; display: grid; place-items: center;
  border-radius: 6px; background: var(--accent); color: #fff;
  font-size: 20px; font-weight: 900;
}
.brand-copy { font-weight: 800; line-height: 1.25; }
.brand-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.topnav { display: flex; align-items: center; gap: 25px; margin-left: auto; color: var(--muted); }
.topnav a { padding: 23px 0; text-decoration: none; }
.topnav a:hover, .topnav a.active { color: var(--accent-dark); }
.topnav a.active { box-shadow: inset 0 -2px var(--accent); font-weight: 800; }
.mobile-menu { display: none; border: 1px solid var(--line); background: #fff; color: var(--accent-dark); padding: 7px 10px; border-radius: 5px; }
.docs-shell { width: min(1440px, calc(100% - 56px)); margin: 0 auto; padding: 46px 0 90px; }
.docs-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 35px; margin-bottom: 31px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
h1 { margin: 7px 0 5px; font-size: clamp(30px, 4vw, 44px); line-height: 1.15; letter-spacing: 0; }
.docs-heading p { margin: 0; color: var(--muted); }
.global-search {
  width: min(360px, 100%);
  display: flex; align-items: center; gap: 9px;
  min-height: 45px; padding: 0 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
}
.global-search span { color: var(--accent); font-size: 22px; line-height: 1; }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; align-items: start; gap: 38px; }
.catalog { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding-right: 12px; }
.catalog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.catalog-header strong { font-size: 14px; }
.catalog-header span { color: var(--muted); font-size: 12px; }
.catalog-list { display: grid; gap: 17px; }
.catalog-group-title { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.catalog-group-title span:last-child { font-weight: 500; }
.catalog-items { display: grid; gap: 2px; }
.catalog-item {
  display: block; padding: 7px 9px; border-left: 2px solid transparent;
  color: #40505a; font-size: 13px; line-height: 1.45; text-decoration: none;
}
.catalog-item:hover { color: var(--accent-dark); background: var(--accent-soft); }
.catalog-item.active { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; }
.article-column { min-width: 0; }
.breadcrumbs { margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.article {
  min-height: 540px; padding: 0 13px 30px 0;
  border-bottom: 1px solid var(--line);
}
.article-header { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.article-kicker { margin-bottom: 9px; color: var(--accent); font-size: 12px; font-weight: 800; }
.article h2 { margin: 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.25; letter-spacing: 0; }
.article-lead { max-width: 760px; margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.article-meta span { padding: 4px 9px; border: 1px solid #cfe2e8; border-radius: 4px; color: var(--accent-dark); background: #f7fbfc; font-size: 11px; }
.article-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.article-actions a, .article-actions button {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 13px; border-radius: 5px; text-decoration: none; font-size: 13px; font-weight: 800;
}
.article-actions a { background: var(--accent); color: #fff; }
.article-actions button { border: 1px solid var(--accent); background: #fff; color: var(--accent-dark); cursor: pointer; }
.article-content { max-width: 820px; padding-top: 26px; }
.article-content h3, .article-content h4 { scroll-margin-top: 95px; }
.article-content h3 { margin: 30px 0 10px; font-size: 22px; line-height: 1.35; }
.article-content h4 { margin: 23px 0 8px; font-size: 17px; }
.article-content p { margin: 0 0 14px; color: #394953; }
.article-content ul, .article-content ol { margin: 0 0 18px; padding-left: 25px; color: #394953; }
.article-content li { margin: 4px 0; }
.article-content code { padding: 2px 5px; border-radius: 3px; background: #eef3f5; color: #91531f; font-family: Consolas, monospace; font-size: .92em; }
.article-content a { color: var(--accent-dark); font-weight: 700; }
.article-content strong { color: var(--ink); }
.article-content pre { overflow: auto; margin: 17px 0; padding: 16px; border-radius: 5px; background: #1d2b32; color: #eaf5f7; font: 13px/1.65 Consolas, monospace; }
.article-content blockquote { margin: 18px 0; padding: 10px 15px; border-left: 3px solid var(--warning); background: #fff8ec; color: #795221; }
.article-content img { max-width: 100%; margin: 8px 0 18px; border: 1px solid var(--line); border-radius: 5px; cursor: zoom-in; }
.article-content .embedded-file { width: 100%; height: min(75vh, 760px); border: 1px solid var(--line); background: #fff; }
.article-content video { width: 100%; max-height: 620px; background: #111; }
.outline { position: sticky; top: 96px; padding-left: 16px; border-left: 1px solid var(--line); }
.outline-title { margin-bottom: 11px; color: var(--muted); font-size: 12px; font-weight: 800; }
.outline-list { display: grid; gap: 6px; }
.outline-list a { padding: 3px 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-decoration: none; }
.outline-list a:hover { color: var(--accent-dark); }
.outline-list a.level-2 { padding-left: 11px; }
.help-panel { margin-top: 30px; padding-top: 17px; border-top: 1px solid var(--line); }
.help-panel strong { font-size: 13px; }
.help-panel p { margin: 7px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.help-panel a { color: var(--accent-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.empty, .loading { padding: 38px 12px; color: var(--muted); text-align: center; }
.empty { border: 1px solid var(--line); background: #fff; }
.viewer { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(8, 18, 24, .74); }
.viewer.hidden { display: none; }
.viewer-panel { width: min(1100px, 100%); height: min(88vh, 860px); display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 6px; }
.viewer-header { display: flex; justify-content: space-between; gap: 15px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.viewer-header small { display: block; color: var(--muted); font-size: 11px; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.viewer-body { min-height: 0; flex: 1; display: grid; place-items: center; overflow: auto; padding: 16px; background: #edf2f4; }
.viewer-body iframe, .viewer-body video { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 1080px) {
  .docs-layout { grid-template-columns: 215px minmax(0, 1fr); }
  .outline { display: none; }
}
@media (max-width: 720px) {
  .topbar-inner, .docs-shell { width: min(100% - 28px, 1440px); }
  .topbar-inner { min-height: 64px; gap: 12px; }
  .topnav { display: none; }
  .topnav.open { position: absolute; left: 14px; right: 14px; top: 60px; display: grid; gap: 0; padding: 8px 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(23, 35, 43, .1); }
  .topnav.open a { padding: 9px 0; }
  .mobile-menu { display: block; margin-left: auto; }
  .docs-shell { padding-top: 30px; }
  .docs-heading { display: block; margin-bottom: 22px; }
  .global-search { width: 100%; margin-top: 18px; }
  .docs-layout { display: block; }
  .catalog { position: static; max-height: none; margin-bottom: 24px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
  .catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .article { padding-right: 0; }
  .article h2 { font-size: 28px; }
  .article-content .embedded-file { height: 66vh; }
}
@media (max-width: 440px) {
  .catalog-list { grid-template-columns: 1fr; }
  .brand-copy small { display: none; }
}
