  :root{
    --ink:#12181f; --muted:#5b6673; --line:#e6e9ee; --bg:#f7f8fa;
    --brand:#1a7f64; --brand-soft:#e8f5f0; --warn:#a2581c; --warn-soft:#fdf3e7;
    --card:#fff; --radius:14px;
  }
  @media (prefers-color-scheme: dark){
    :root{ --ink:#e9edf2; --muted:#9aa6b2; --line:#28313a; --bg:#0e1216; --card:#161c22; --brand:#4ec9a4; --brand-soft:#12241f; --warn:#e0a25f; --warn-soft:#241a10; }
  }
  *{ box-sizing:border-box; }
  html{ -webkit-text-size-adjust:100%; }
  body{
    margin:0; background:var(--bg); color:var(--ink);
    font:17px/1.78 -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
    padding:0 0 env(safe-area-inset-bottom);
  }
  /* 行宽：手机满宽，桌面限制在 ~46em（约 34 个汉字），比纯 680px 更好读 */
  .wrap{ max-width:660px; margin:0 auto; padding:0 22px; }
  @media (min-width:760px){ .wrap{ max-width:700px; padding:0 24px; } h1{ font-size:32px; } }
  /* 手机：外 20px + 卡片内 15px，正文每行约 19-21 个汉字，比 22+18 更耐读 */
  /* 手机：目录收进底部抽屉（和说明书站保持同一套交互），正文直接开始 */
  @media (max-width:760px){
    .toc-panel{
      position:fixed; left:0; right:0; bottom:0; z-index:50; max-height:76vh; overflow-y:auto;
      background:var(--card); border-top:1px solid var(--line);
      border-radius:16px 16px 0 0; padding:10px 18px calc(20px + env(safe-area-inset-bottom));
      box-shadow:0 -8px 30px rgba(0,0,0,.18); transform:translateY(105%); transition:transform .22s ease;
    }
    .toc-panel.open{ transform:translateY(0); }
    .toc-panel-head{
      display:flex; align-items:center; justify-content:space-between;
      padding:4px 0 8px; font-size:13px; font-weight:600; color:var(--muted);
    }
    .toc-panel nav.toc{ margin:0; border:0; background:none; padding:0; }
    .toc-fab{
      display:inline-flex; align-items:center; gap:6px;
      position:fixed; right:16px; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:40;
      padding:11px 16px; border-radius:999px; border:1px solid var(--line);
      background:var(--card); color:var(--ink); font:inherit; font-size:14px; font-weight:600;
      box-shadow:0 6px 20px rgba(0,0,0,.16); cursor:pointer;
    }
    .toc-backdrop{ display:block; position:fixed; inset:0; z-index:45; background:rgba(0,0,0,.35); }
    .toc-backdrop[hidden]{ display:none; }
    /* 回顶按钮上移，避免和目录按钮叠在一起 */
    .to-top{ bottom:calc(72px + env(safe-area-inset-bottom)); }
  }
  @media (max-width:430px){
    .wrap{ padding:0 20px; }
    h1{ font-size:26px; line-height:1.34; }
    .lead{ font-size:16px; }
    h2{ font-size:20px; }
    .card{ padding:15px 15px; }
    nav.toc{ padding:12px 14px; }
    .step{ gap:10px; }
  }
  /* 只给上下的呼吸感；左右内边距必须由 .wrap 提供，
     否则 h1 与目录卡片会贴到屏幕边缘（2026-11-24 实测 toc 从 x=0 开始）。 */
  /* 只设上下，**不要写左右**：一旦写成简写（如 padding:40px 0 24px），
     左右会被清零，h1 与目录卡片直接贴到屏幕边缘（2026-11-24 实测 toc 从 x=0 开始）。 */
  header.hero{ padding-top:40px; padding-bottom:24px; }
  .kicker{ color:var(--brand); font-weight:600; font-size:14px; letter-spacing:.02em; }
  h1{ font-size:29px; line-height:1.32; margin:10px 0 12px; letter-spacing:-.01em; }
  .lead{ color:var(--muted); font-size:16.5px; margin:0 0 18px; }
  .pill{ display:inline-block; background:var(--brand-soft); color:var(--brand); border-radius:999px; padding:5px 12px; font-size:13px; font-weight:600; }
  nav.toc{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; margin:8px 0 28px; }
  nav.toc b{ display:block; font-size:13px; color:var(--muted); font-weight:600; margin-bottom:8px; }
  nav.toc a{ display:block; color:var(--ink); text-decoration:none; padding:12px 2px; border-bottom:1px solid var(--line); font-size:15.5px; }
  nav.toc a:last-child{ border-bottom:0; }
  nav.toc a span{ color:var(--brand); font-weight:600; margin-right:8px; }
  section{ margin:0 0 34px; }
  h2{ font-size:21px; margin:0 0 12px; letter-spacing:-.01em; }
  h3{ font-size:17px; margin:20px 0 8px; }
  p{ margin:0 0 12px; }
  ul,ol{ margin:0 0 14px; padding-left:22px; }
  li{ margin:6px 0; }
  .card{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; margin:14px 0; }
  .step{ display:flex; gap:12px; align-items:flex-start; }
  .num{ flex:0 0 26px; width:26px; height:26px; border-radius:50%; background:var(--brand); color:#fff; font-size:14px; font-weight:700; display:flex; align-items:center; justify-content:center; margin-top:3px; }
  .step .body{ flex:1 1 auto; min-width:0; }
  .step .body b{ display:block; margin-bottom:2px; }
  .muted{ color:var(--muted); }
  .small{ font-size:14.5px; }
  .note{ background:var(--warn-soft); border-left:3px solid var(--warn); border-radius:8px; padding:12px 14px; margin:14px 0; font-size:15px; }
  .note b{ color:var(--warn); }
  .ok{ background:var(--brand-soft); border-left:3px solid var(--brand); border-radius:8px; padding:12px 14px; margin:14px 0; font-size:15px; }
  .ok b{ color:var(--brand); }
  a.btn{ display:block; text-align:center; background:var(--brand); color:#fff; text-decoration:none; font-weight:600; padding:14px 16px; border-radius:12px; margin:10px 0; }
  a.btn.ghost{ background:transparent; color:var(--brand); border:1.5px solid var(--brand); }
  a{ color:var(--brand); text-underline-offset:2px; }
  /* 正文行内链接：手机上给一点垂直余量，别让两行链接黏在一起 */
  p a, li a{ padding:2px 0; }
  code{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:14.5px; background:var(--brand-soft); color:var(--brand); padding:2px 6px; border-radius:6px; }
  .qa{ border-top:1px solid var(--line); padding:14px 0; }
  .qa:first-of-type{ border-top:0; }
  .qa b{ display:block; margin-bottom:4px; }
  .qa p{ margin:0; color:var(--muted); font-size:15.5px; }
  footer{ color:var(--muted); font-size:14px; padding:28px 0 calc(50px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); margin-top:34px; }
  footer a{ color:var(--muted); }
  .toc-inline{ font-size:14.5px; color:var(--muted); }
  /* 回到顶部：长文章在手机上滚很久，给一个固定入口 */
  /* ── 目录：桌面侧栏，手机底部抽屉 ── */
  .toc-panel-head, .toc-fab, .toc-backdrop{ display:none; }
  .toc-close{
    border:1px solid var(--line); background:transparent; color:var(--muted);
    font:inherit; font-size:13px; padding:4px 12px; border-radius:999px; cursor:pointer;
  }
  .to-top{
    position:fixed; right:16px; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:30;
    width:44px; height:44px; border-radius:50%; border:1px solid var(--line);
    background:var(--card); color:var(--ink); font-size:18px; line-height:1;
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 4px 16px rgba(0,0,0,.14); text-decoration:none;
  }

/* ── 顶栏：品牌 · 复制全文 · 中英切换 ── */
.topbar{
  position:sticky; top:0; z-index:60;
  display:flex; align-items:center; gap:10px;
  padding:10px 20px; background:var(--bg);
  border-bottom:2px solid var(--brand-soft);
  backdrop-filter:saturate(160%) blur(8px);
}
.topbar .brand{
  font-weight:700; font-size:14px; color:var(--ink); text-decoration:none;
  letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.topbar .spacer{ flex:1 1 auto; }
.topbtn{
  border:1px solid var(--line); background:transparent; color:var(--muted);
  font:inherit; font-size:13px; padding:5px 10px; border-radius:7px; cursor:pointer;
  white-space:nowrap;
}
.topbtn:hover, .topbtn.done{ color:var(--brand); border-color:var(--brand); }
.langswitch{
  display:flex; border:1px solid var(--line); border-radius:7px; overflow:hidden;
}
.langswitch a{
  padding:5px 9px; font-size:13px; color:var(--muted); text-decoration:none;
}
.langswitch a.on{ background:var(--brand-soft); color:var(--brand); font-weight:600; }
@media (max-width:430px){
  .topbar{ padding:9px 16px; }
  .topbar .brand{ font-size:13px; }
  .topbtn{ font-size:12.5px; padding:5px 8px; }
  .langswitch a{ padding:5px 8px; font-size:12.5px; }
}
