/* 所有语言共用排版；避免固定文字宽度，长标题及表格内容自然换行。 */
:root { color-scheme: light dark; --page:#fff; --side:#f5f6f8; --text:#242830; --muted:#727985; --line:#e4e7ed; --accent:#426bd6; --active:#e7edfc; --soft:#f6f8fb; --field:#fff; }
@media(prefers-color-scheme:dark) { :root { --page:#202226; --side:#191b1e; --text:#e8eaf0; --muted:#a2a9b5; --line:#363940; --accent:#95b2ff; --active:#293b60; --soft:#282b31; --field:#24272d; } }
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body { margin:0; height:100vh; display:grid; grid-template-columns:250px minmax(0,1fr); color:var(--text); background:var(--page); font:15px/1.7 -apple-system,BlinkMacSystemFont,sans-serif; }
button,input,select { font:inherit; }
[hidden] { display:none !important; }
button { cursor:pointer; color:inherit; }
.sidebar { min-height:0; display:flex; flex-direction:column; background:var(--side); border-inline-end:1px solid var(--line); }
.sidebar header { padding:24px 18px 18px; }
.brand { display:flex; gap:10px; align-items:center; margin-bottom:20px; }
.brand-logo { flex:none; width:28px; height:28px; object-fit:contain; }
.brand h1 { margin:0; font-size:16px; line-height:1.5; font-weight:650; overflow-wrap:anywhere; }
.search-box { display:flex; align-items:center; gap:7px; border:1px solid var(--line); border-radius:9px; background:var(--field); padding:7px 9px; }
.search-box:focus-within { border-color:var(--accent); }
.search-box svg { width:17px; height:17px; fill:none; stroke:var(--muted); stroke-width:1.8; flex:none; }
.search-box input { min-width:0; width:100%; border:0; outline:0; background:transparent; color:var(--text); font-size:13px; }
input::-webkit-search-cancel-button { display:none; }
.search-box button { border:0; background:transparent; color:var(--muted); padding:0 3px; line-height:1.2; }
.language-box { display:flex; gap:8px; align-items:center; margin-bottom:12px; border:1px solid var(--line); border-radius:9px; background:var(--field); padding:7px 9px; }
.language-box svg { width:17px; height:17px; fill:none; stroke:var(--muted); stroke-width:1.5; flex:none; }
.language-box select { min-width:0; width:100%; border:0; background:var(--field); color:var(--text); font-size:13px; cursor:pointer; }
.language-box:focus-within { border-color:var(--accent); }
.navigation-toggle { display:none; }
nav { overflow:auto; padding:0 12px 24px; }
.nav-group { margin-bottom:12px; }
.nav-section,.nav-topic { border:0; background:transparent; width:100%; text-align:start; border-radius:8px; padding:9px 12px; line-height:1.5; overflow-wrap:anywhere; }
.nav-section { font-size:14px; font-weight:650; }
.nav-topic { font-size:13px; color:var(--muted); padding-inline-start:26px; }
.nav-section:hover,.nav-topic:hover { background:var(--line); }
.nav-section.active,.nav-topic.active { color:var(--accent); background:var(--active); }
button:focus-visible,a:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
main { min-width:0; overflow:auto; padding:40px 44px 60px; }
.article { max-width:800px; margin:0 auto; }
.breadcrumb { color:var(--muted); font-size:13px; margin-bottom:14px; }
h2 { font-size:28px; line-height:1.35; letter-spacing:-.02em; margin:0 0 22px; overflow-wrap:anywhere; }
h3 { font-size:19px; line-height:1.5; margin:0 0 12px; overflow-wrap:anywhere; }
p { margin:0 0 16px; }
.intro { color:var(--muted); margin-bottom:28px; }
.topic-card { padding:24px 0; border-top:1px solid var(--line); }
.topic-card:first-child { border-top:0; }
.topic-card button { border:0; background:transparent; color:var(--accent); padding:0; text-align:start; font-weight:650; font-size:19px; }
.topic-card .topic-toggle { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; }
.topic-card .topic-toggle::after { content:""; width:0.55em; height:0.55em; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); transition:transform .15s ease; flex:none; opacity:.7; }
.topic-card.is-open .topic-toggle::after { transform:rotate(-135deg); margin-top:0.35em; }
.topic-card .topic-panel[hidden] { display:none !important; }
.topic-card .topic-panel { margin-top:12px; }
.topic-card .topic-open-full { margin-top:12px; border:0; background:transparent; color:var(--accent); padding:0; font-weight:600; cursor:pointer; }
.topic-card .topic-open-full[hidden] { display:none !important; }

.body { overflow-wrap:anywhere; }
ul,ol { padding-inline-start:22px; margin:0 0 12px; }
code { font: .9em ui-monospace,monospace; background:var(--soft); border-radius:4px; padding:2px 5px; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
.table-wrap { width:100%; overflow-x:auto; margin:22px 0; border:1px solid var(--line); border-radius:10px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th,td { text-align:start; padding:12px 14px; vertical-align:top; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
th { background:var(--soft); font-weight:650; }
tr:last-child td { border-bottom:0; }
td:first-child { width:42%; } td:not(:first-child) { width:29%; }
figure { margin:24px 0; } img { display:block; max-width:100%; height:auto; border:1px solid var(--line); border-radius:10px; } figcaption { font-size:13px; color:var(--muted); margin-top:8px; }
.search-result { display:block; width:100%; border:1px solid var(--line); background:var(--page); border-radius:10px; padding:18px; margin-bottom:12px; text-align:start; }
.search-result:hover { background:var(--soft); border-color:var(--accent); }
.search-result strong { color:var(--accent); font-size:16px; }
.search-result small { display:block; color:var(--muted); margin-bottom:6px; }
.search-result p { font-size:14px; margin:8px 0 0; }
mark { background:var(--active); color:var(--accent); border-radius:3px; }
.empty { color:var(--muted); padding:24px 0; }
@media(max-width:820px) { body { grid-template-columns:210px minmax(0,1fr); } main { padding:28px 24px 44px; } h2 { font-size:24px; } th,td { padding:10px; } }
/* 官网容器与统一页脚独立适配，不加载会影响原帮助排版的全站 CSS。 */
body { grid-template-rows:minmax(0,1fr) auto; }
.product-back { display:block; font-size:13px; margin-bottom:14px; color:var(--muted); }
.preview-note { padding:8px; margin-bottom:12px; border:1px solid var(--line); border-radius:6px; font-size:12px; color:var(--accent); }
pre { overflow:auto; padding:16px; border-radius:8px; background:var(--soft); }
[data-site-footer] { grid-column:1/-1; border-top:1px solid var(--line); background:var(--side); color:var(--muted); font-size:12px; }
[data-site-footer] > div { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; max-width:1400px; margin:0 auto; padding:12px 20px; }
[data-site-footer] > div > div { display:flex; flex-wrap:wrap; gap:12px; }
[data-site-footer] a { color:var(--muted); }

/* 手机采用整页滚动，目录按需展开；页脚随正文到底部，不挤压阅读区。 */
@media(max-width:600px), (max-width:900px) and (max-height:500px) {
  body { display:flex; flex-direction:column; height:auto; min-height:100vh; min-height:100dvh; font-size:16px; line-height:1.8; }
  .sidebar { position:sticky; top:0; z-index:10; flex:none; border-inline-end:0; border-bottom:1px solid var(--line); box-shadow:0 3px 12px #00000006; }
  .sidebar header { padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left)); }
  .product-back { margin-bottom:8px; font-size:12px; }
  .brand { margin-bottom:12px; gap:9px; }
  .brand h1 { font-size:16px; }
  .help-controls { display:flex; align-items:stretch; gap:8px; margin-bottom:10px; }
  .language-box { flex:1; min-width:0; margin:0; padding:0 10px; }
  .language-box select { min-height:44px; font-size:16px; }
  .navigation-toggle { display:flex; align-items:center; justify-content:center; gap:7px; max-width:48%; min-height:46px; padding:8px 12px; border:1px solid var(--line); border-radius:9px; background:var(--field); color:var(--text); font-size:14px; line-height:1.4; }
  .navigation-toggle svg { width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; }
  .navigation-toggle[aria-expanded="true"] { color:var(--accent); border-color:var(--accent); background:var(--active); }
  .navigation-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
  .search-box { min-height:46px; padding:0 10px; }
  .search-box input { min-height:44px; font-size:16px; }
  .search-box button { min-width:44px; min-height:44px; margin-inline-end:-10px; font-size:24px; }
  #navigation { display:none; max-height:50vh; max-height:min(50dvh,360px); overflow:auto; overscroll-behavior:contain; padding:8px 12px 12px; border-top:1px solid var(--line); }
  .sidebar[data-navigation-open="true"] #navigation { display:block; }
  .nav-group { margin-bottom:6px; }
  .nav-section,.nav-topic { min-height:44px; padding-block:11px; font-size:15px; }
  .nav-topic { padding-inline-start:26px; }
  main { flex:1; overflow:visible; padding:24px max(16px,env(safe-area-inset-right)) 36px max(16px,env(safe-area-inset-left)); }
  h2 { font-size:25px; margin-bottom:20px; }
  .topic-card { padding:22px 0; }
  .topic-card button { min-height:44px; font-size:19px; }
  .table-wrap { overscroll-behavior-x:contain; }
  table { min-width:480px; font-size:14px; }
  pre { max-width:100%; font-size:14px; }
  pre code { padding:0; background:transparent; }
  .search-result { padding:16px; }
  .search-result p { font-size:15px; }
  [data-site-footer] { flex:none; }
  [data-site-footer] > div { align-items:flex-start; flex-direction:column; gap:6px; padding:14px max(16px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
  [data-site-footer] > div > div { gap:4px 16px; }
  [data-site-footer] a { display:inline-flex; align-items:center; min-height:44px; }
}
/* 横屏等小高度视口下，顶部随页面滚动，避免遮住正文。 */
@media(max-width:900px) and (max-height:500px) { .sidebar { position:static; } }
