.hd-container{max-width:1400px;margin:0 auto;padding:0 24px}
.hd-hero{padding:36px 0 26px;border-bottom:1px solid #e7edf6;background:#fff}
.hd-crumb{display:flex;align-items:center;gap:8px;font-size:13px;color:#6b778b;margin-bottom:14px}
.hd-crumb a{color:#6b778b;text-decoration:none;transition:color .15s}
.hd-crumb a:hover{color:#2468f2}
.hd-crumb-sep{color:#acb4bf}
.hd-title{font-size:28px;font-weight:700;color:#101e2c;line-height:1.35}

.hd-main{padding:28px 0 64px;background:#fff}
.hd-layout{display:grid;grid-template-columns:264px minmax(0,1fr);gap:40px;align-items:start}

/* ── 左侧导航 ── */
.hd-side{position:sticky;top:84px;max-height:calc(100vh - 100px);overflow-y:auto;font-size:14px}
.hd-side::-webkit-scrollbar{width:6px}
.hd-side::-webkit-scrollbar-thumb{background:#aeb9cc;border-radius:3px}
.hd-side::-webkit-scrollbar-thumb:hover{background:#93a0b3}
.hd-side-sec{border-bottom:1px solid #e7edf6}
.hd-side-sec summary{list-style:none;cursor:pointer;padding:12px 8px;font-weight:600;color:#354052;display:flex;align-items:center;user-select:none}
.hd-side-sec summary::-webkit-details-marker{display:none}
.hd-side-sec summary::after{content:"";width:7px;height:7px;border-right:1.5px solid #93a0b3;border-bottom:1.5px solid #93a0b3;transform:rotate(45deg);margin-left:auto;transition:transform .15s;margin-top:-2px}
.hd-side-sec[open] summary::after{transform:rotate(225deg);margin-top:2px}
.hd-side-body{padding:2px 0 12px}
.hd-side-body a{display:block;padding:7px 10px 7px 14px;color:#6b778b;text-decoration:none;border-left:2px solid transparent;line-height:1.45}
.hd-side-body a:hover{color:#2468f2;background:#f5f8fe}
.hd-side-body a.cur{color:#2468f2;font-weight:600;border-left-color:#2468f2;background:#f5f8fe}
.hd-side-grp summary{list-style:none;cursor:pointer;padding:7px 10px 7px 14px;color:#354052;font-weight:500;display:flex;align-items:center;user-select:none}
.hd-side-grp summary::-webkit-details-marker{display:none}
.hd-side-grp summary::before{content:"";width:6px;height:6px;border-right:1.5px solid #93a0b3;border-bottom:1.5px solid #93a0b3;transform:rotate(-45deg);margin-right:8px;transition:transform .15s}
.hd-side-grp[open] summary::before{transform:rotate(45deg)}
.hd-side-nest a{padding-left:30px}

/* ── 正文 ── */
.hd-center{max-width:820px;min-width:0}
.hd-content{font-size:15px;line-height:1.85;color:#354052;word-wrap:break-word}
.hd-content p{margin:0 0 16px}
.hd-content h1,.hd-content h2,.hd-content h3,.hd-content h4,.hd-content h5{color:#101e2c;font-weight:700;line-height:1.4;margin:36px 0 14px;scroll-margin-top:90px}
.hd-content h1{font-size:26px}
.hd-content h2{font-size:22px;padding-left:12px;border-left:4px solid #2468f2}
.hd-content h3{font-size:18px}
.hd-content h4{font-size:16px}
.hd-content h5,.hd-content h6{font-size:15px}
.hd-content a{color:#2468f2;text-decoration:none}
.hd-content a:hover{text-decoration:underline}
.hd-content ul,.hd-content ol{margin:0 0 16px;padding-left:26px}
.hd-content ul{list-style:disc}
.hd-content ol{list-style:decimal}
.hd-content li{margin:4px 0}
.hd-content li>p{margin:6px 0}
.hd-content img{max-width:100%;height:auto;border:1px solid #e7edf6;border-radius:6px;margin:8px 0;background:#fff}
.hd-content hr{border:none;border-top:1px solid #e7edf6;margin:32px 0}
.hd-content blockquote{margin:0 0 16px;padding:10px 18px;border-left:4px solid #93a0b3;background:#f5f8fe;color:#6b778b;border-radius:0 4px 4px 0}
.hd-content mark{background:#fff3bf;color:#7a5c00;padding:1px 4px;border-radius:3px}
.hd-content strong{color:#101e2c}

/* 表格 */
.hd-content table{width:100%;max-width:100%;border-collapse:collapse;margin:20px 0;font-size:14px;display:block;overflow-x:auto;white-space:nowrap}
.hd-content thead th{background:#f5f8fe;color:#101e2c;font-weight:600;text-align:left}
.hd-content th,.hd-content td{border:1px solid #e7edf6;padding:10px 14px;vertical-align:top;line-height:1.6}
.hd-content tbody tr:hover{background:#f5f8fe}

/* 行内代码 */
.hd-content :not(pre)>code{background:#eef2fa;color:#1e5be0;padding:2px 6px;border-radius:4px;font-size:.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}

/* 代码块 */
.hd-content pre{position:relative;background:#282c34;border-radius:8px;padding:18px 20px;overflow-x:auto;margin:20px 0;line-height:1.7}
.hd-content pre code{background:none;padding:0;color:#abb2bf;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre}

/* ── 折叠块（pymdownx details）── */
.hd-content .hd-det{margin:20px 0;border:1px solid #e7edf6;border-radius:8px;overflow:hidden}
.hd-content .hd-det summary{list-style:none;cursor:pointer;padding:12px 16px;font-weight:600;color:#101e2c;background:#f5f8fe;display:flex;align-items:center;user-select:none}
.hd-content .hd-det summary::-webkit-details-marker{display:none}
.hd-content .hd-det summary::before{content:"";width:8px;height:8px;border-right:2px solid #93a0b3;border-bottom:2px solid #93a0b3;transform:rotate(-45deg);margin-right:10px;transition:transform .15s;flex:none;margin-top:-1px}
.hd-content .hd-det[open] summary::before{transform:rotate(45deg);margin-top:2px}
.hd-content .hd-det-b{padding:4px 18px 14px}
.hd-content .hd-det-b .hd-adm{margin:14px 0}

/* ── 提示块（material admonition）── */
.hd-adm{margin:20px 0;padding:14px 18px;border-radius:6px;border-left:4px solid;font-size:14.5px;line-height:1.75}
.hd-adm p{margin:0 0 8px}
.hd-adm p:last-child{margin-bottom:0}
.hd-adm .hd-adm-t{display:flex;align-items:center;gap:7px;font-weight:700;margin:0 0 8px;font-size:14.5px}
.hd-adm .hd-adm-t svg{flex:none}
.hd-adm-note,.hd-adm-abstract,.hd-adm-info,.hd-adm-todo{border-color:#448aff;background:rgba(68,138,255,.07)}
.hd-adm-note .hd-adm-t,.hd-adm-abstract .hd-adm-t,.hd-adm-info .hd-adm-t,.hd-adm-todo .hd-adm-t{color:#1e6dd8}
.hd-adm-tip,.hd-adm-hint,.hd-adm-important{border-color:#00bfa5;background:rgba(0,191,165,.07)}
.hd-adm-tip .hd-adm-t,.hd-adm-hint .hd-adm-t,.hd-adm-important .hd-adm-t{color:#00997f}
.hd-adm-success,.hd-adm-check,.hd-adm-done{border-color:#00c853;background:rgba(0,200,83,.07)}
.hd-adm-success .hd-adm-t,.hd-adm-check .hd-adm-t,.hd-adm-done .hd-adm-t{color:#009424}
.hd-adm-question,.hd-adm-help,.hd-adm-faq{border-color:#64dd17;background:rgba(100,221,23,.07)}
.hd-adm-question .hd-adm-t,.hd-adm-help .hd-adm-t,.hd-adm-faq .hd-adm-t{color:#4c9f00}
.hd-adm-warning,.hd-adm-caution,.hd-adm-attention{border-color:#ff9100;background:rgba(255,145,0,.08)}
.hd-adm-warning .hd-adm-t,.hd-adm-caution .hd-adm-t,.hd-adm-attention .hd-adm-t{color:#c56900}
.hd-adm-failure,.hd-adm-fail,.hd-adm-missing{border-color:#ff5252;background:rgba(255,82,82,.07)}
.hd-adm-failure .hd-adm-t,.hd-adm-fail .hd-adm-t,.hd-adm-missing .hd-adm-t{color:#d32323}
.hd-adm-danger,.hd-adm-error{border-color:#ff1744;background:rgba(255,23,68,.07)}
.hd-adm-danger .hd-adm-t,.hd-adm-error .hd-adm-t{color:#cf0a34}
.hd-adm-bug{border-color:#f50057;background:rgba(245,0,87,.07)}
.hd-adm-bug .hd-adm-t{color:#c20048}
.hd-adm-example{border-color:#7c4dff;background:rgba(124,77,255,.07)}
.hd-adm-example .hd-adm-t{color:#651fff}
.hd-adm-quote,.hd-adm-cite{border-color:#9e9e9e;background:rgba(158,158,158,.08)}
.hd-adm-quote .hd-adm-t,.hd-adm-cite .hd-adm-t{color:#616161}

/* ── 上下篇 ── */
.hd-pager{display:flex;gap:16px;margin-top:44px;padding-top:24px;border-top:1px solid #e7edf6}
.hd-pager-item{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px;padding:14px 18px;border:1px solid #e7edf6;border-radius:8px;text-decoration:none;transition:border-color .15s,box-shadow .15s}
.hd-pager-item:hover{border-color:#2468f2;box-shadow:0 4px 14px rgba(36,104,242,.1)}
.hd-pager-next{text-align:right;align-items:flex-end}
.hd-pager-empty{border:none}
.hd-pager-dir{font-size:12px;color:#93a0b3}
.hd-pager-label{font-size:14px;color:#354052;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hd-pager-item:hover .hd-pager-label{color:#2468f2}

/* ── 右侧本页目录 ── */
.hd-toc{position:sticky;top:84px;font-size:13px;max-height:calc(100vh - 100px);overflow-y:auto}
.hd-toc-t{font-weight:600;color:#101e2c;margin-bottom:10px}
.hd-toc-list{display:flex;flex-direction:column;border-left:2px solid #e7edf6}
.hd-toc-list a{color:#6b778b;text-decoration:none;padding:5px 0 5px 14px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hd-toc-list a:hover{color:#2468f2}
.hd-toc-3{padding-left:28px;font-size:12.5px}

/* ── 响应式 ── */
@media (min-width:1440px){
  .hd-layout{grid-template-columns:264px minmax(0,1fr) 200px;gap:36px}
}
@media (max-width:1439px){
  .hd-toc{display:none}
}
@media (max-width:960px){
  .hd-container{padding:0 16px}
  .hd-hero{padding:24px 0 18px}
  .hd-title{font-size:22px}
  .hd-layout{grid-template-columns:1fr;gap:0}
  /* 移动端 aside 不限高不内滚：内容撑开文档流随页面整体滚动
     （原 overflow:hidden 会裁掉溢出内容导致无法滑动；内滚小窗体验也差，均弃用） */
  .hd-side{position:static;max-height:none;border:1px solid #e7edf6;border-radius:8px;margin-bottom:24px;overflow:visible}
  .hd-side-inner{padding:6px 10px}
  .hd-side-sec{border-bottom:none}
  .hd-side-sec summary{padding:9px 6px}
  .hd-content table{white-space:normal}
  .hd-pager{flex-direction:column}
  .hd-pager-empty{display:none}
}
