/* v2.8.0 shared widths, modular category cards, optional promotion slots and footer. */
.top,.access-banner,.shell,.app-footer{box-sizing:border-box;width:min(100%,1500px);max-width:1500px;margin-left:auto;margin-right:auto}
.top{padding-bottom:14px}
.access-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 24px;margin-top:0;margin-bottom:16px;border:1px solid #d8e4f7;border-radius:12px;background:#eef4ff;color:#304766;font-size:12px;line-height:1.55}
.access-banner a{flex:0 0 auto;padding:6px 12px;border-radius:8px;background:#245da8;color:#fff;text-decoration:none;font-weight:650}
.shell{margin-top:0}
.cat{margin:0 0 9px;padding:7px;border:1px solid #e7ecf3;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(25,40,75,.035)}
.cat-head{padding:8px;border-radius:8px}
.cat .subnav{padding:3px 4px 4px 10px}
.category-load-more{display:block;width:100%;margin:6px 0 2px;padding:6px 8px;border:1px dashed #d5deeb;border-radius:7px;background:#f8faff;color:#49658e;font-size:11px}
.category-ad-slot{margin:8px 0 12px}
.site-ad-slot{display:grid;gap:10px;min-width:0}
.site-ad{min-width:0;overflow:hidden;border:1px solid #e7ebf1;border-radius:10px;background:#fff;text-align:center}
.site-ad-title{padding:5px 9px;color:#718096;font-size:10px;text-align:left}
.site-ad a{display:block;line-height:0}
.site-ad img{display:block;width:100%;height:auto;max-height:260px;object-fit:contain}
.sidebar .site-ad img{max-height:180px}
#main>.site-ad-slot{margin:0 0 14px}
#main>[data-ad-slot="tool-bottom"],#main>[data-ad-slot="question-bottom"]{margin:14px 0 0}
.app-footer{position:relative;padding:16px 24px 22px;text-align:center;color:#8290a4;font-size:11px}
.footer-author{margin-top:5px}
.footer-manage-link{display:inline-block;margin-top:6px;color:#476b9b;text-decoration:none;font-size:11px}
.social-links{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;padding:5px 0}
.social-links.has-wechat{padding-top:138px}
.social-link{position:relative;display:inline-flex;width:34px;height:34px;align-items:center;justify-content:center;border:1px solid #e0e6ef;border-radius:50%;background:#fff;color:#53657e;text-decoration:none;transition:transform .15s ease,border-color .15s ease,color .15s ease}
.social-link:hover,.social-link:focus-visible{transform:translateY(-2px);border-color:#9cb4d7;color:#245da8;outline:none}
.social-link svg{width:18px;height:18px;fill:currentColor;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.social-instagram svg{fill:none}.social-instagram .fill{fill:currentColor;stroke:none}
.wechat-tip{position:absolute;left:50%;bottom:calc(100% + 8px);z-index:5;display:flex;flex-direction:column;align-items:center;gap:5px;width:126px;padding:8px;transform:translateX(-50%);border:1px solid #e1e7ef;border-radius:10px;background:#fff;box-shadow:0 8px 24px rgba(20,35,60,.14);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s ease}
.wechat-tip:after{content:"";position:absolute;top:100%;left:calc(50% - 6px);border:6px solid transparent;border-top-color:#fff}
.wechat-tip img{display:block;width:108px;height:108px;object-fit:contain}
.wechat-tip small{font-size:10px;color:#536176;white-space:nowrap}
.social-wechat:hover .wechat-tip,.social-wechat:focus-within .wechat-tip{opacity:1;visibility:visible}
.back-to-top{position:fixed;right:22px;bottom:24px;z-index:1100;display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid #d8e0eb;border-radius:50%;background:#fff;color:#36577f;font-size:21px;box-shadow:0 5px 18px rgba(25,40,75,.13);opacity:0;visibility:hidden;transform:translateY(8px);transition:.18s ease}
.back-to-top.visible{opacity:1;visibility:visible;transform:translateY(0)}
@media(max-width:850px){
 .top,.access-banner,.shell,.app-footer{width:100%;max-width:100%}
 .top{padding:12px 12px 10px;gap:8px}
 .access-banner{margin:0 8px 12px;width:calc(100% - 16px);padding:8px 10px;border-radius:10px;font-size:11px}
 .shell{padding:0 8px 14px;gap:10px}
 .cat{margin-bottom:8px;padding:6px;border-radius:10px}
 .cat-head{padding:7px}
 .cat .subnav{padding-left:8px}
 .category-load-more{font-size:10px}
 .site-ad-slot{gap:7px}
 .site-ad img{max-height:190px}
 .app-footer{padding:14px 12px 82px;font-size:10px}
 .social-links{gap:9px}.social-link{width:32px;height:32px}.social-link svg{width:17px;height:17px}
 .social-links.has-wechat{padding-top:126px}.wechat-tip img{width:96px;height:96px}.wechat-tip{width:114px}
 .back-to-top{right:12px;bottom:78px;width:36px;height:36px}
}
@media(max-width:480px){
 .access-banner{align-items:flex-start;flex-direction:column;gap:5px}
 .access-banner a{padding:5px 9px}
 .top{padding:10px}
 .shell{padding-left:8px;padding-right:8px}
 .app-footer{padding-bottom:82px}
}
/* Logout now lives in the header; keep back-to-top in its normal corner. */
.back-to-top{right:22px}
@media(max-width:850px){.back-to-top{right:12px;bottom:78px}}
.social-link{padding:0;cursor:pointer;font:inherit}


/* v2.9.7: focused rich-document editing and process summary */
.edit-primary-section{margin:18px 0 24px;padding:16px;border:1px solid var(--line,#dbe3e8);background:rgba(255,255,255,.72);border-radius:4px}
.edit-primary-section>h3{margin:0 0 6px}
.edit-primary-section>.wang-field{margin-top:12px}
.process-rich-content{margin-top:16px}
.process-rich-content .mermaid-preview{margin:16px 0;padding:14px;border:1px solid var(--line,#dbe3e8);background:#fff;overflow-x:auto}
@media(max-width:700px){.edit-primary-section{padding:10px;margin:12px 0 18px}.process-rich-content{overflow-wrap:anywhere}}
