/* 全站基础界面：共享布局、阅读、列表、表单与窄屏；项目介绍页保留各自配色。 */
:root {
    --text-secondary: #526174;
    --text-muted: #65758a;
    --border-color: #dfe6ee;
    --bg: #f3f5f8;
    --site-focus: #2563eb;
}
body { min-height: 100vh; }
.site-skip-link { position: fixed; top: -80px; left: 16px; z-index: 10000; padding: 12px 20px; background: #fff; color: #1746a2; border-radius: 8px; box-shadow: var(--shadow-md); }
.site-skip-link:focus { top: 8px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--site-focus); outline-offset: 3px; }
#main-content:focus { outline: none; }
.coolwj-page-container { min-height: calc(100vh - 280px); }
.coolwj-page-container > .container > .row > .col, .coolwj-common-item .row > .col, .coolwj-doc-box, .coolwj-panel-body { min-width: 0; }
.coolwj-panel { border-color: #e3e9f0; box-shadow: 0 2px 5px rgba(22, 42, 69, .025); }
.coolwj-page-main .coolwj-panel:hover { transform: none; }
.coolwj-panel-header { padding-bottom: 20px; }
.coolwj-panel-header h1 { line-height: 1.5; overflow-wrap: anywhere; }
.site-page-intro { margin-top: 7px; color: var(--text-secondary); font-size: 14px; line-height: 1.8; }
.coolwj-panel-header .coolwj-more { right: 0; min-height: 32px; }
.coolwj-nav-more > button.coolwj-nav-more-btn { appearance: none; border: 0; background: transparent; color: rgba(255,255,255,.78); height: 60px; padding: 0 8px; font: inherit; cursor: pointer; }
.coolwj-nav-more.show .coolwj-nav-more-btn { color: #fff; }
.coolwj-header-loged:focus-within .coolwj-header-Layer { display: block; }
.coolwj-header .coolwj-header-searchbox .form-control::placeholder { color: #c0c7d1; }
.coolwj-header .coolwj-header-searchbox .form-control { color: #fff !important; }
.coolwj-header-navs > li > a[aria-current="page"] { color: #fff; }
.coolwj-footer { margin-top: 36px; padding: 30px 0 24px; background: #202b3a; }
ul.coolwj-footerlinks { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; }
ul.coolwj-footerlinks > li { margin: 0; }
ul.coolwj-footerlinks > li > a { display: inline-flex; align-items: center; min-height: 40px; color: #d4deea; font-size: 13px; }
.coolwj-copyright, .coolwj-copyright a { color: #a9b9cc; }
/* 阅读区：自然断词、清晰层级、代码与表格在自身区域滚动。 */
.coolwj-article-detail { max-width: 100%; }
.coolwj-article-content, .coolwj-doc-content { word-break: normal; overflow-wrap: anywhere; line-height: 1.95; color: #334155; }
.coolwj-article-content > :first-child, .coolwj-doc-content > :first-child { margin-top: 0; }
.coolwj-article-content h1, .coolwj-doc-content h1, .coolwj-article-content h2, .coolwj-doc-content h2, .coolwj-article-content h3, .coolwj-doc-content h3 { margin: 1.5em 0 .6em; line-height: 1.5; font-weight: 650; scroll-margin-top: 88px; }
.coolwj-article-content ul, .coolwj-doc-content ul { list-style: disc; padding-left: 1.6em; margin: 12px 0; }
.coolwj-article-content ol, .coolwj-doc-content ol { padding-left: 1.6em; margin: 12px 0; }
.coolwj-article-content li, .coolwj-doc-content li { margin: 6px 0; }
.coolwj-article-content a, .coolwj-doc-content a { text-underline-offset: 4px; text-decoration: underline; }
.coolwj-article-content blockquote, .coolwj-doc-content blockquote { padding: 14px 20px; margin: 20px 0; border-left: 3px solid #8ab0e9; background: #f1f6fc; color: #526174; border-radius: 0 8px 8px 0; }
.coolwj-article-content pre, .coolwj-doc-content pre { max-width: 100%; padding: 16px; overflow: auto; white-space: pre; overflow-wrap: normal; word-break: normal; font-size: 13px; line-height: 1.8; tab-size: 4; }
.coolwj-article-content img, .coolwj-doc-content img { height: auto; }
.coolwj-article-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
ul.coolwj-article-info > li { padding-right: 0; font-size: 12px; }
.site-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--border-color); border-radius: 8px; margin: 16px 0; -webkit-overflow-scrolling: touch; }
.site-table-scroll > table { width: 100%; margin: 0; }
.site-table-scroll th, .site-table-scroll td { padding: 12px 14px; border-bottom: 1px solid #e7edf4; }
.site-table-scroll th { background: #f3f6fa; font-weight: 600; }
.site-table-scroll tr:last-child td { border-bottom: 0; }
.stock-page .site-table-scroll > table { min-width: 760px; font-variant-numeric: tabular-nums; }
.stock-page .radio { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; text-align: left; }
.stock-page .radio label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.stock-page textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.9; }
/* 列表与网格 */
.coolwj-common-list .coolwj-common-item { padding: 22px 0; border-bottom: 1px solid #e8edf3; }
.coolwj-common-list .coolwj-common-item:last-child { border-bottom: 0; }
.coolwj-common-name { line-height: 1.65; overflow-wrap: anywhere; }
.coolwj-common-name a { color: #22334b; }
.coolwj-common-name a:hover { color: var(--accent-hover); }
.coolwj-common-brief { color: var(--text-secondary); line-height: 1.85; overflow-wrap: anywhere; }
.coolwj-common-other { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; line-height: 1.8; }
.coolwj-common-other .pull-left { float: none; }
.coolwj-common-other span, .coolwj-common-other a { margin-right: 0; }
.coolwj-hot-list > li { line-height: 1.8; padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid #edf1f5; overflow-wrap: anywhere; }
.coolwj-hot-list > li:last-child { border-bottom: 0; }
.coolwj-hot-list > li > a { display: block; line-height: inherit; }
.site-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.site-media-grid .coolwj-goods-item, .site-media-grid .coolwj-project-item { width: 100%; min-width: 0; margin: 0; }
.site-media-grid .coolwj-goods-item > a { display: block; overflow: hidden; border-radius: 8px; background: #eef2f7; }
.site-media-grid .coolwj-goods-item > a > img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #f8fafc; }
.site-media-grid .coolwj-goods-name, .site-media-grid .coolwj-project-name { height: auto; min-height: 0; margin-top: 13px; font-size: 16px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.site-media-grid .coolwj-goods-name a, .site-media-grid .coolwj-project-name a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; height: auto; min-height: 3.3em; padding-top: 0; line-height: 1.65; font-size: inherit; }
.site-media-grid .coolwj-project-logo { display: grid; place-items: center; width: 100%; height: 110px; background: #f5f8fc; border: 1px solid #e6edf4; border-radius: 8px; }
.site-media-grid .coolwj-project-logo img { width: 68px; height: 68px; object-fit: contain; }
.site-media-grid .coolwj-common-other { margin-top: 5px; font-size: 11px; gap: 3px 8px; }
.site-empty { padding: 46px 20px; text-align: center; color: var(--text-secondary); border: 1px dashed #ced9e6; border-radius: 10px; background: #f8fafc; grid-column: 1 / -1; }
.site-empty strong { display: block; color: #34465e; font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.site-empty p { margin: 0; font-size: 13px; line-height: 1.85; }
.site-hotwords { display: flex; flex-wrap: wrap; gap: 10px; }
.site-hotwords a { display: inline-flex; align-items: center; padding: 8px 14px; min-height: 40px; background: #eff5fe; border: 1px solid #dce8f8; border-radius: 6px; color: #325b91; font-size: 14px; }
.site-news-columns > div { padding-bottom: 20px; }
.site-days { display: flex; flex-wrap: wrap; gap: 10px; }
.site-days a { display: block; padding: 9px 14px; border: 1px solid var(--border-color); border-radius: 6px; color: #3e5875; }
.coolwj-pagebox .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.coolwj-pagebox .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; margin: 0; border-radius: 7px; border-color: #dce5ef; color: #426183; font-size: 14px; }
.coolwj-pagebox .page-item.active .page-link { color: #fff; background: #2563eb; border-color: #2563eb; }
/* 表单及个人空间 */
.coolwj-page-container .form-control:not([type="file"]) { min-height: 44px; color: #26374d; background: #fff; border: 1px solid #cbd6e3; border-radius: 7px; box-shadow: none; }
.coolwj-page-container .form-control::placeholder { color: #708197; }
.coolwj-page-container .form-control:focus { border-color: #6295e8; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.coolwj-page-container textarea.form-control { line-height: 1.8; }
.coolwj-page-container .btn { min-height: 40px; padding: 9px 16px; border-radius: 7px; line-height: 1.5; }
.coolwj-page-container .btn-primary { background: #2563eb; border-color: #2563eb; }
.coolwj-page-container .btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.auth-page .coolwj-page-container > .container > .row > .col { max-width: 700px; margin: 20px auto; padding: 0; }
.auth-page .coolwj-panel { padding: 36px 40px; }
.auth-page .coolwj-panel-header { padding-bottom: 18px; border-bottom: 1px solid #e5ebf2; }
.auth-page .coolwj-panel-body { width: 100% !important; max-width: 100% !important; height: auto !important; min-height: 0; }
.auth-page .coolwj-panel-body form { width: 100%; max-width: 100%; }
.auth-page .coolwj-login-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; line-height: 1.8; margin-top: 24px; }
.auth-page .coolwj-login-links a { margin: 0 !important; }
.auth-page .coolwj-login-captcha { max-width: 100%; height: auto; cursor: pointer; }
.coolwj-my-navtabs, .coolwj-my-navtabs2 { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid #dce5ef; }
.coolwj-my-navtabs a, .coolwj-my-navtabs2 a { padding: 11px 15px; margin: 0; min-height: 42px; font-size: 14px; border-radius: 7px 7px 0 0; }
.site-space-nav > summary { display: none; }
.coolwj-my-opt-list .list-group-item { border-radius: 7px; margin: 3px 0; min-height: 42px; padding: 11px 14px; }
.coolwj-my-breadcrumb { padding: 12px 0; margin-bottom: 24px; background: transparent; border-bottom: 1px solid #e5ebf2; font-size: 13px; }
.coolwj-my-space-pd form { max-width: 100%; }
.coolwj-my-space-pd .site-table-scroll > table { min-width: 560px; }
.coolwj-doc-contentbox { padding: 30px; border: 1px solid #e3e9f0; border-radius: 12px; background: #fff; }
.coolwj-doc-title { font-size: 26px; line-height: 1.5; overflow-wrap: anywhere; }
.doc-pre-next-box { display: flex; justify-content: space-between; gap: 20px; }
.doc-pre-next-box .previousDoc, .doc-pre-next-box .nextDoc { float: none; min-width: 0; }
.doc-pre-next-box a { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
/* 状态页与个人介绍 */
.site-status { width: 100%; max-width: 720px; margin: 30px auto; padding: 50px 30px; text-align: center; background: #fff; border: 1px solid #dde6ef; border-radius: 14px; }
.site-status-code { color: #7895bc; font-size: clamp(64px, 12vw, 100px); font-weight: 750; line-height: 1.1; letter-spacing: -4px; }
.site-status h1 { margin: 18px 0 12px; font-size: 26px; font-weight: 650; }
.site-status p { color: var(--text-secondary); font-size: 15px; line-height: 1.9; }
.site-status .btn { margin-top: 26px; }
.site-about-hero { display: flex; align-items: center; gap: 32px; padding: 36px; margin-bottom: 24px; color: #f1f6fc; background: #1d2e47; border-radius: 14px; }
.site-about-hero img { flex-shrink: 0; width: 116px; height: 116px; object-fit: cover; border-radius: 50%; border: 4px solid #6f8eb5; }
.site-about-hero h1 { font-size: 32px; font-weight: 650; margin-bottom: 12px; }
.site-about-hero p { color: #ccd9ea; line-height: 1.9; margin-top: 8px; }
.site-about-content h2 { font-size: 20px; font-weight: 600; margin: 26px 0 14px; }
.site-about-content li { margin: 10px 0; line-height: 1.9; overflow-wrap: anywhere; color: #475569; }
.site-about-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.site-about-projects a { display: block; padding: 22px; border: 1px solid #dce6f1; border-radius: 9px; font-size: 16px; }
.site-about-projects span { display: block; margin-top: 7px; font-size: 13px; color: var(--text-secondary); }
/* 桌面与窄屏采用一致留白，避免 Bootstrap 负边距挤出页面。 */
@media (min-width: 993px) {
    .coolwj-page-main:not(:only-child) { padding-right: 24px; }
    .coolwj-page-side { width: 280px; }
    .coolwj-page-main.coolwj-pdr0 { padding-left: 24px; padding-right: 0; }
}
@media (max-width: 992px) {
    .coolwj-page-container > .container > .row { flex-direction: column; margin-right: 0; margin-left: 0; }
    .coolwj-page-container > .container > .row > .col { flex-basis: auto; width: 100%; max-width: 100%; padding-right: 0; padding-left: 0; }
    .coolwj-page-side { width: 100%; }
    .site-space-nav > summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-size: 14px; color: #385b8a; cursor: pointer; list-style: none; }
    .site-space-nav > summary::-webkit-details-marker { display: none; }
    .site-space-nav > summary::after { content: '+'; font-size: 20px; }
    .site-space-nav[open] > summary::after { content: '−'; }
    .site-space-nav .coolwj-my-opt-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .site-space-nav .coolwj-my-opt-list a { margin: 0; font-size: 13px; }
    .coolwj-page-side:has(.site-space-nav) { margin-top: 0; }
    .coolwj-doc-menus { width: 100%; }
    .coolwj-doc-scroll, .coolwj-doc-scroll.fixed, body.coolwj-header-fixed .coolwj-doc-scroll.fixed { position: relative !important; top: auto; width: 100%; max-height: 240px; height: auto !important; margin-bottom: 20px; overflow-y: auto; }
    .coolwj-doc-box { width: 100%; padding: 0; }
    .site-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
    .coolwj-my-space-pd { min-height: 0 !important; }
}
@media (max-width: 767px) {
    .coolwj-panel-header { padding-bottom: 16px; }
    .coolwj-common-list .coolwj-common-item { padding: 18px 0; }
    .coolwj-common-list .coolwj-common-item .coolwj-common-name { font-size: 16px; line-height: 1.65; }
    .coolwj-common-list .coolwj-common-item .coolwj-common-other { gap: 3px 10px; font-size: 11px; }
    .coolwj-common-list .coolwj-common-logo { width: 40px; height: 40px; margin-right: 12px; }
    .site-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
    .site-media-grid .coolwj-goods-name, .site-media-grid .coolwj-project-name { font-size: 14px; }
    .site-media-grid .coolwj-project-logo { height: 96px; }
    .site-space-nav .coolwj-my-opt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .coolwj-my-top .col { min-width: 0; }
    .coolwj-my-name { overflow-wrap: anywhere; }
    .coolwj-my-info .avatar-upload-box table, .coolwj-my-info .avatar-upload-box tbody, .coolwj-my-info .avatar-upload-box tr, .coolwj-my-info .avatar-upload-box td { display: block; width: 100% !important; text-align: left !important; padding: 5px 0 !important; }
    .avatar-preview-crop-box { margin-left: 0 !important; max-width: 100%; }
    .coolwj-my-info, .coolwj-my-password { max-width: 100%; }
    .coolwj-my-msglist, .coolwj-my-msglist > div { max-width: 100%; }
    .auth-page .coolwj-page-container > .container > .row > .col { margin: 6px auto; }
    .auth-page .coolwj-panel { padding: 24px 20px; }
    .auth-page .form-group > label { padding-bottom: 7px; }
    .auth-page .col-10.offset-2 { margin-left: 0; flex: 0 0 100%; max-width: 100%; }
    .auth-page [type="submit"].btn { width: 100%; }
    .coolwj-page-container input.form-control, .coolwj-page-container select.form-control, .coolwj-page-container textarea.form-control { font-size: 16px; }
    .coolwj-doc-contentbox { padding: 20px 16px; }
    .coolwj-doc-title { font-size: 23px; }
    .coolwj-article-content, .coolwj-doc-content { font-size: 16px; }
    .site-table-scroll th, .site-table-scroll td { padding: 10px 12px; font-size: 13px; }
    .site-about-hero { display: block; padding: 28px 24px; }
    .site-about-hero img { width: 88px; height: 88px; margin-bottom: 20px; }
    .site-about-hero h1 { font-size: 27px; }
    .site-about-projects { grid-template-columns: minmax(0, 1fr); }
    .site-status { margin: 12px auto; padding: 36px 20px; }
    .site-status h1 { font-size: 23px; }
    .site-hotwords { gap: 8px; }
    .site-hotwords a { font-size: 13px; padding: 7px 11px; }
    .coolwj-pagebox .pagination { gap: 4px; }
    .coolwj-pagebox .page-link { min-width: 35px; min-height: 40px; padding: 7px 9px; }
    .coolwj-footer { margin-top: 24px; }
    .scroll-to-top { width: 40px; height: 40px; right: 14px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    html, body { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .scroll-reveal { opacity: 1; transform: none; }
}
.coolwj-nav-more:not(.show) .coolwj-nav-more-dropdown { display: none; }
.coolwj-nav-more.show .coolwj-nav-more-dropdown { display: block; }
.timeline-container, .vertical-timeline-container { max-width: 1100px; }
.timeline { overflow-x: auto; gap: 24px; padding-bottom: 20px; }
.timeline-event { flex: 0 0 200px; }
@media (max-width: 767px) {
    .timeline-container, .vertical-timeline-container { width: calc(100% - 32px); }
}
.auth-page .coolwj-panel { min-height: 0 !important; }
.auth-page .coolwj-panel-header { margin-top: 0 !important; }
.auth-page .coolwj-panel-body { min-width: 0 !important; margin: 24px auto !important; }
.auth-page .coolwj-panel-body > input:not([type="hidden"]) { max-width: 100%; min-height: 44px; border: 1px solid #bdcce0; border-radius: 7px; padding: 9px 12px; }
.auth-page #email, .auth-page #newPassword { width: min(100%, 360px); margin-right: 10px; }
.auth-page #submit_btn { background: #2563eb; color: #fff; border-color: #2563eb; cursor: pointer; }
.space-page .coolwj-panel-body [style*="width: 500px"] { max-width: 100%; margin: 28px auto !important; }
.coolwj-common-brief pre { max-width: 100%; overflow-x: auto; white-space: pre; padding: 12px; background: #f3f6fa; }
.coolwj-common-brief img { max-width: 100%; height: auto; }
@media (max-width: 992px) { .coolwj-doc-contentbox { margin-left: 0; } }
@media (max-width: 767px) {
    .auth-page #email, .auth-page #newPassword { display: block; width: 100%; margin-right: 0; }
    .auth-page #submit_btn { display: block; width: 100%; margin-top: 12px; }
    .space-page .coolwj-panel-body [style*="width: 500px"] { width: 100% !important; }
    .space-page .newsfeed-reply-textarea { width: 100%; max-width: 100%; }
}
.coolwj-nav-more > button.coolwj-nav-more-btn.active { color: #fff; background: rgba(59,130,246,.12); }
.site-media-grid .coolwj-poem-item { min-width: 0; }
.site-media-grid .coolwj-poem-logo { display: block; overflow: hidden; border-radius: 8px; background: #eef2f7; }
.site-media-grid .coolwj-poem-logo img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.site-media-grid .coolwj-poem-name { margin-top: 12px; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.site-media-grid .coolwj-poem-opt a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; border: 1px solid #e0e7f0; border-radius: 6px; }
