/* 文档中心 */
.docs-wrap{max-width:1240px;margin:0 auto;padding:0 28px;}
.docs-home{padding:48px 0 72px;background:#fff;}
.docs-home-hero{max-width:760px;margin-bottom:44px;}
.docs-eyebrow{color:#0e62fe;font-size:12px;font-weight:700;letter-spacing:2px;text-transform:uppercase;margin:0 0 10px;}
.docs-home-hero h1{font-size:40px;margin:0 0 12px;color:#0f172a;letter-spacing:-1px;}
.docs-home-hero p{color:#52606f;line-height:1.8;margin:0;}
.docs-search{position:relative;margin-top:22px;max-width:560px;}
.docs-search input{width:100%;padding:13px 16px;border:1px solid #d7e0ea;border-radius:8px;font-size:14.5px;background:#f7fafc;}
.docs-search span{position:absolute;right:14px;top:13px;font-size:12px;color:#94a3b8;}
.docs-home-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;}
.docs-cat{border:1px solid #e5edf4;border-radius:12px;padding:22px 24px;background:#fff;}
.docs-cat h2{font-size:17px;margin:0 0 14px;color:#0f172a;}
.docs-cat ul{list-style:none;margin:0;padding:0;}
.docs-cat li{padding:8px 0;border-top:1px solid #f1f5f9;}
.docs-cat li:first-child{border-top:0;}
.docs-cat a{color:#1f2937 !important;text-decoration:none;font-size:14.5px;line-height:1.5;}
.docs-cat a:hover{color:#0e62fe !important;}
.docs-lock{display:inline-block;margin-left:8px;font-size:12px;color:#94a3b8;}

.doc-page{background:#fff;padding:34px 0 72px;}
.doc-layout{display:grid;grid-template-columns:240px minmax(0,1fr) 210px;gap:44px;align-items:start;}
.doc-sidebar{position:sticky;top:84px;border-right:1px solid #eef2f7;padding-right:18px;max-height:calc(100vh - 100px);overflow:auto;}
.doc-sidebar-title{font-size:12px;font-weight:700;letter-spacing:1.5px;color:#94a3b8;text-transform:uppercase;margin-bottom:14px;}
.doc-group{margin-bottom:18px;}
.doc-group-title{display:flex;justify-content:space-between;align-items:center;font-size:13.5px;font-weight:700;color:#0f172a;margin-bottom:6px;}
.doc-group-title span{font-size:11px;color:#94a3b8;font-weight:500;}
.doc-group ul{list-style:none;margin:0;padding:0;}
.doc-group li{margin:0;}
.doc-group a{display:block;padding:6px 10px;border-radius:6px;font-size:13.5px;color:#52606f !important;text-decoration:none;line-height:1.45;}
.doc-group a:hover{background:#f4f8fc;color:#0e62fe !important;}
.doc-group a.is-active{background:#eaf2fb;color:#0e62fe !important;font-weight:600;}
.doc-main{min-width:0;}
.doc-breadcrumb{font-size:12.5px;color:#8a97a5;margin:0 0 16px;}
.doc-breadcrumb a{color:#5b6b7c !important;text-decoration:none;}
.doc-breadcrumb i{font-style:normal;margin:0 8px;color:#c3cdd8;}
.doc-title{font-size:36px;line-height:1.25;color:#0f172a;margin:0 0 12px;letter-spacing:-.5px;}
.doc-meta{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:12.5px;color:#7b8794;margin-bottom:26px;padding-bottom:18px;border-bottom:1px solid #eef2f7;}
.doc-meta .doc-restricted{color:#b45309;background:#fff7ed;border:1px solid #fed7aa;border-radius:999px;padding:1px 9px;}
.doc-body{font-size:15.5px;line-height:1.9;color:#26313d;}
.doc-body h2{font-size:25px;margin:40px 0 14px;color:#0f172a;scroll-margin-top:90px;}
.doc-body h3{font-size:19px;margin:30px 0 10px;color:#0f172a;scroll-margin-top:90px;}
.doc-body p{margin:0 0 16px;}
.doc-body ul,.doc-body ol{margin:0 0 18px;padding-left:22px;}
.doc-body li{margin:6px 0;}
.doc-body img{max-width:100%;height:auto;border-radius:8px;border:1px solid #eef2f7;}
.doc-body table{width:100%;border-collapse:collapse;margin:20px 0;font-size:14px;}
.doc-body th{background:#f5f8fb;text-align:left;padding:10px 12px;border:1px solid #e5edf4;color:#334155;}
.doc-body td{padding:10px 12px;border:1px solid #e5edf4;}
.doc-body code{background:#f1f5f9;border-radius:4px;padding:1px 5px;font-size:.92em;}
.doc-body pre{background:#0f172a;color:#e2e8f0;padding:16px 18px;border-radius:8px;overflow:auto;font-size:13.5px;line-height:1.6;}
.doc-body pre code{background:none;padding:0;color:inherit;}
.doc-body blockquote{border-left:3px solid #0e62fe;background:#f4f8fc;margin:18px 0;padding:12px 16px;color:#334155;border-radius:0 6px 6px 0;}
.doc-download{display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid #dbe7f2;background:#f7fafc;border-radius:10px;padding:16px 18px;margin:34px 0 8px;}
.doc-download strong{display:block;font-size:14px;color:#0f172a;margin-bottom:2px;}
.doc-download span{font-size:12.5px;color:#7b8794;}
.doc-btn{display:inline-block;padding:10px 18px;border-radius:6px;background:#0e62fe;color:#fff !important;text-decoration:none !important;font-weight:600;font-size:13.5px;white-space:nowrap;}
.doc-btn:hover{background:#003f78;}
.doc-pager{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:44px;padding-top:22px;border-top:1px solid #eef2f7;}
.doc-pager-item{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid #e5edf4;border-radius:8px;text-decoration:none !important;}
.doc-pager-item.is-next{text-align:right;grid-column:2;}
.doc-pager-item span{font-size:11.5px;color:#94a3b8;letter-spacing:.5px;}
.doc-pager-item strong{font-size:13.5px;color:#0e62fe;line-height:1.4;}
.doc-pager-item:hover{border-color:#0e62fe;background:#f7fbff;}
.doc-toc{position:sticky;top:84px;font-size:13px;}
.doc-toc-title{font-size:12px;font-weight:700;letter-spacing:1.5px;color:#94a3b8;text-transform:uppercase;margin-bottom:12px;}
.doc-toc-list{list-style:none;margin:0;padding:0;border-left:2px solid #eef2f7;}
.doc-toc-list li{margin:0;}
.doc-toc-list a{display:block;padding:5px 0 5px 12px;color:#7b8794 !important;text-decoration:none;line-height:1.45;border-left:2px solid transparent;margin-left:-2px;}
.doc-toc-list a:hover{color:#0e62fe !important;}
.doc-toc-list a.is-active{color:#0e62fe !important;border-left-color:#0e62fe;font-weight:600;}
.doc-toc-list li.is-sub a{padding-left:24px;font-size:12.5px;}
@media (max-width:1100px){
  .doc-layout{grid-template-columns:220px minmax(0,1fr);}
  .doc-toc{display:none;}
}
@media (max-width:800px){
  .docs-home-grid{grid-template-columns:1fr;}
  .doc-layout{grid-template-columns:1fr;}
  .doc-sidebar{position:static;max-height:none;border-right:0;border-bottom:1px solid #eef2f7;padding:0 0 16px;}
  .doc-title{font-size:28px;}
  .docs-home-hero h1{font-size:30px;}
}

/* 文档页去掉重复标题并通栏 */
body:has(.doc-page) #block-mercury-page-title,
body:has(.docs-home) #block-mercury-page-title{display:none !important;}
body:has(.doc-page) main article,
body:has(.docs-home) main article{max-width:none !important;padding:0 !important;margin:0 !important;}
body:has(.doc-page) .doc-page,
body:has(.docs-home) .docs-home{width:100vw !important;margin-left:calc(50% - 50vw) !important;margin-right:calc(50% - 50vw) !important;}

/* 隐藏文档页头里重复的标题容器 */
body:has(.doc-page) header[role="banner"] .container,
body:has(.doc-page) header[role="banner"] h1,
body:has(.docs-home) header[role="banner"] .container,
body:has(.docs-home) header[role="banner"] h1{display:none !important;}

body.page-node-type-doc #block-mercury-page-title,
body.page-docs #block-mercury-page-title{display:none !important;}
body.page-node-type-doc header[role="banner"] .container,
body.page-docs header[role="banner"] .container{display:none !important;}

html body.page-node-type-doc #block-mercury-page-title,
html body.page-docs #block-mercury-page-title{display:none !important;}

html body.path-docs #block-mercury-page-title{display:none !important;}

/* 后台：技术文档右侧栏更紧凑 */
body:has(#edit-field-doc-category) .layout-region-node-secondary{padding:0 2px !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary .form-item{margin:0 0 14px !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary label{display:block !important;font-size:12.5px !important;font-weight:600 !important;color:#475569 !important;margin:0 0 5px !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary select,
body:has(#edit-field-doc-category) .layout-region-node-secondary input[type="text"],
body:has(#edit-field-doc-category) .layout-region-node-secondary input[type="date"]{
  width:100% !important;height:38px !important;padding:6px 10px !important;font-size:14px !important;
  border:1px solid #d7dee8 !important;border-radius:7px !important;background:#fff !important;box-shadow:none !important;
}
body:has(#edit-field-doc-category) .layout-region-node-secondary select:focus,
body:has(#edit-field-doc-category) .layout-region-node-secondary input:focus{border-color:#0e62fe !important;outline:2px solid rgba(31,111,224,.18) !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary details{
  border:1px solid #e6ecf3 !important;border-radius:9px !important;background:#fbfcfe !important;
  padding:0 12px 12px !important;margin:0 0 14px !important;
}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary{font-size:13px !important;font-weight:600 !important;color:#334155 !important;padding:11px 0 !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary .form-managed-file{
  background:#fff !important;border:1px dashed #c9d6e3 !important;border-radius:8px !important;padding:12px !important;
}
body:has(#edit-field-doc-category) .layout-region-node-secondary input[type="file"]{width:100% !important;font-size:12.5px !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary .form-item__description,
body:has(#edit-field-doc-category) .layout-region-node-secondary .description{font-size:11.5px !important;color:#94a3b8 !important;line-height:1.6 !important;margin-top:6px !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary ul.form-item__description{padding-left:0 !important;list-style:none !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary .field--name-field-doc-pdf{margin-bottom:4px !important;}

body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary{
  padding:11px 0 11px 22px !important;position:relative !important;
}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary::-webkit-details-marker{display:none !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary::marker{content:'' !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary::before{
  content:'' !important;position:absolute !important;left:4px !important;top:50% !important;
  width:7px !important;height:7px !important;border-right:2px solid #64748b !important;border-bottom:2px solid #64748b !important;
  transform:translateY(-70%) rotate(45deg) !important;
}
body:has(#edit-field-doc-category) .layout-region-node-secondary details[open] > summary::before{
  transform:translateY(-30%) rotate(-135deg) !important;
}

body:has(#edit-field-doc-category) .layout-region-node-secondary *{box-sizing:border-box;}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary::before{
  content:none !important;border:0 !important;width:0 !important;height:0 !important;
}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary{
  padding-left:24px !important;
}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary .gin-details__summary-icon,
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary svg{left:0 !important;}

body:has(#edit-field-doc-category) .layout-region-node-secondary{padding-right:18px !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary{position:relative !important;}
body:has(#edit-field-doc-category) .layout-region-node-secondary details > summary::after{
  content:'' !important;position:absolute !important;right:6px !important;top:50% !important;
  width:6px !important;height:6px !important;border-right:2px solid #94a3b8 !important;border-bottom:2px solid #94a3b8 !important;
  transform:translateY(-70%) rotate(45deg) !important;
}
body:has(#edit-field-doc-category) .layout-region-node-secondary details[open] > summary::after{
  transform:translateY(-30%) rotate(-135deg) !important;
}

/* 后台文档管理页 */
.docs-admin{padding:8px 0;}
.docs-admin-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;}
.docs-admin-head h2{font-size:24px;margin:0;color:#0f172a;}
.docs-admin-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #e5edf4;border-radius:8px;overflow:hidden;}
.docs-admin-table th{background:#f5f8fb;text-align:left;padding:11px 14px;font-size:12.5px;color:#64748b;border-bottom:1px solid #e5edf4;}
.docs-admin-table td{padding:12px 14px;font-size:14px;color:#26313d;border-bottom:1px solid #eef2f7;}
.docs-admin-table tr:last-child td{border-bottom:0;}
.docs-admin-table a{color:#0e62fe !important;text-decoration:none;}
.docs-admin-table a:hover{text-decoration:underline;}

body:has(#edit-field-doc-category) #block-gin-page-title{display:none !important;}
.doc-pdf-action{margin:0 0 14px !important;}
.doc-pdf-action .button{width:100% !important;text-align:center !important;}

/* 受限文档：登录提示 */
.doc-locked{max-width:560px;padding:44px 0 20px;}
.doc-locked-icon{font-size:34px;margin-bottom:14px;}
.doc-locked h2{font-size:26px;color:#0f172a;margin:0 0 12px;}
.doc-locked p{color:#5b6472;line-height:1.85;font-size:15px;margin:0 0 22px;}
.doc-locked-actions{display:flex;align-items:center;gap:18px;flex-wrap:wrap;}
.doc-locked-link{color:#0e62fe !important;font-size:14px;text-decoration:none;font-weight:600;}
.doc-locked-link:hover{text-decoration:underline;}

.doc-page.is-locked .doc-toc{display:none !important;}
.doc-page.is-locked .doc-layout{grid-template-columns:240px minmax(0,1fr);}
