.news-page {
    --news-wide: min(1280px, calc(100% - 64px));
    --news-max: min(1540px, calc(100% - 32px));
    --news-blue: #165dff;
    --news-blue-deep: #0f3cc9;
    --news-cyan: #14b8d4;
    --news-green: #13a66b;
    --news-orange: #ff7a45;
    --news-ink: #111827;
    --news-text: #344054;
    --news-muted: #667085;
    --news-line: #dbe7f7;
    --news-soft: #f5f9ff;
    --news-page-bg: #f3f7ff;
    --news-shadow: 0 18px 44px rgba(25, 58, 105, 0.10);
    margin: 0;
    padding-top: 0;
    background: var(--news-page-bg);
    color: var(--news-ink);
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* BxConsole dynamic news list and detail */
.news-category-button,
.news-order-button,
.news-page-controls a,
.news-page-controls span {
    text-decoration: none;
}

.news-page-controls a,
.news-page-controls span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.news-page-controls a:hover {
    color: #2563eb;
    border-color: #93c5fd;
}

.news-page-controls .disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.news-detail-page .news-shell {
    padding-top: 48px;
    padding-bottom: 72px;
    overflow: visible;
}

.news-page.news-detail-page {
    overflow-x: clip;
    overflow-y: visible;
}

.news-detail-shell {
    width: min(1540px, calc(100% - 48px));
    margin: 0 auto;
    overflow: visible;
}

.news-detail-layout-grid {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 420px;
    gap: 24px;
    align-items: start;
    overflow: visible;
}

.news-detail-layout-grid.no-related {
    grid-template-columns: 64px minmax(0, 1fr);
}

/* 左侧操作栏 */
.news-detail-actions-sidebar {
    position: sticky;
    top: 50vh;
    align-self: start;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    transform: translateY(-50%);
}

.news-detail-page .news-detail-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    padding: 0;
    color: #667085;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(25, 58, 105, 0.10);
    cursor: pointer;
    appearance: none;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.news-detail-page .news-detail-action-btn:hover:not(.disabled),
.news-detail-page .news-detail-action-btn:focus-visible:not(.disabled) {
    color: var(--news-blue);
    background: #fff;
    border-color: rgba(22, 93, 255, 0.20);
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(22, 93, 255, 0.16);
    outline: none;
}

.news-detail-page .news-detail-action-btn.disabled {
    color: #b7c0ce;
    opacity: 0.68;
    cursor: not-allowed;
}

/* 右侧相关阅读 */
.news-detail-related-sidebar {
    position: sticky;
    top: 112px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: calc(100vh - 136px);
    padding-right: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.news-detail-related-sidebar::-webkit-scrollbar {
    width: 5px;
}

.news-detail-related-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

.news-detail-related-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.news-detail-related-card {
    padding: 26px 24px 22px;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 0;
    box-shadow: var(--news-shadow);
}

.news-detail-related-head {
    margin-bottom: 10px;
}

.news-detail-related-head h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.4;
    font-weight: 800;
    color: var(--news-ink);
}

.news-detail-related-list {
    display: flex;
    flex-direction: column;
}

.news-detail-page .news-related-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    color: var(--news-text);
    text-decoration: none;
    border-bottom: 1px solid #edf2f7;
    transition: color 0.25s ease, transform 0.25s ease;
}

.news-detail-page .news-related-item:last-child {
    border-bottom: 0;
}

.news-detail-page .news-related-item:hover {
    color: var(--news-blue);
    transform: translateX(-3px);
}

.news-related-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 72px;
    overflow: hidden;
    background: var(--news-soft);
    border-radius: 0;
}

.news-related-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.news-related-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.news-related-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-related-date {
    font-size: 12px;
    color: #94a3b8;
}

.news-detail-related-foot {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
    text-align: center;
}

.news-detail-page .news-detail-related-foot a {
    display: inline-block;
    padding: 8px 20px;
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    background: #eff6ff;
    border-radius: 0;
    transition: all 0.25s ease;
}

.news-detail-page .news-detail-related-foot a:hover {
    background: #dbeafe;
}

.news-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #475569;
    text-decoration: none;
}

.news-detail-back span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
}

.news-detail-article {
    padding: 52px 64px;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 0;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .07);
}

.news-detail-head {
    padding-bottom: 30px;
    margin-bottom: 32px;
    text-align: center;
    border-bottom: 1px solid #edf2f7;
}

.news-detail-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.news-detail-breadcrumb span {
    padding: 5px 10px;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 999px;
}

.news-detail-head h1 {
    max-width: 850px;
    margin: 0 auto;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.3;
    color: #0f172a;
}

.news-detail-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 20px;
    font-size: 13px;
    color: #94a3b8;
}

.news-detail-cover {
    margin-bottom: 32px;
    overflow: hidden;
    border-radius: 14px;
}

.news-detail-cover img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.news-detail-body {
    font-size: 16px;
    line-height: 1.95;
    color: #334155;
    overflow-wrap: anywhere;
}

.news-detail-body img,
.news-detail-body video {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.news-detail-body h2,
.news-detail-body h3,
.news-detail-body h4 {
    margin: 1.8em 0 .7em;
    color: #0f172a;
}

.news-detail-body pre {
    padding: 18px;
    overflow: auto;
    color: #e2e8f0;
    background: #0f172a;
    border-radius: 10px;
}

.news-detail-attachments {
    padding: 22px;
    margin-top: 38px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0;
}

.news-detail-attachments h2 {
    margin: 0 0 14px;
    font-size: 17px;
    color: #0f172a;
}

.news-detail-attachments > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.news-detail-attachments a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    color: #334155;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0;
}

.news-detail-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding-top: 30px;
    margin-top: 38px;
    border-top: 1px solid #edf2f7;
}

.news-detail-navigation > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0;
}

.news-detail-toc-card {
    padding: 24px;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 0;
    box-shadow: var(--news-shadow);
}

.news-detail-toc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}

.news-detail-toc-head h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.4;
    font-weight: 800;
    color: var(--news-ink);
}

.news-detail-toc-head span {
    flex: 0 0 auto;
    font-size: 12px;
    color: #94a3b8;
}

.news-detail-toc-list {
    display: flex;
    flex-direction: column;
}

.news-detail-toc-loading,
.news-detail-toc-empty {
    padding: 16px 0 4px;
    font-size: 13px;
    line-height: 1.7;
    color: #94a3b8;
}

.news-detail-page .news-detail-toc-item {
    position: relative;
    display: block;
    padding: 14px 4px 14px 20px;
    font-size: 14px;
    line-height: 1.7;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border-bottom: 1px solid #edf2f7;
    transition: color 0.2s ease, background 0.2s ease;
}

.news-detail-page .news-detail-toc-item:last-child {
    border-bottom: 0;
}

.news-detail-page .news-detail-toc-item::before {
    content: "";
    position: absolute;
    top: 23px;
    left: 3px;
    width: 6px;
    height: 6px;
    background: #cbd5e1;
}

.news-detail-page .news-detail-toc-item:hover,
.news-detail-page .news-detail-toc-item.active {
    color: var(--news-blue);
    background: #f8fbff;
}

.news-detail-page .news-detail-toc-item.active::before {
    background: var(--news-blue);
}

.news-detail-page .news-detail-toc-item.level-2 {
    padding-left: 28px;
}

.news-detail-page .news-detail-toc-item.level-2::before {
    left: 11px;
}

.news-detail-page .news-detail-toc-item.level-3,
.news-detail-page .news-detail-toc-item.level-4,
.news-detail-page .news-detail-toc-item.level-5,
.news-detail-page .news-detail-toc-item.level-6 {
    padding-left: 38px;
    font-size: 13px;
    font-weight: 500;
}

.news-detail-page .news-detail-toc-item.level-3::before,
.news-detail-page .news-detail-toc-item.level-4::before,
.news-detail-page .news-detail-toc-item.level-5::before,
.news-detail-page .news-detail-toc-item.level-6::before {
    left: 21px;
    width: 5px;
    height: 5px;
}

.news-detail-toc-anchor {
    scroll-margin-top: 118px;
}

.news-detail-navigation > div:last-child {
    text-align: right;
}

.news-detail-navigation span,
.news-detail-navigation em {
    font-size: 13px;
    color: #94a3b8;
    font-style: normal;
}

.news-detail-navigation a {
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
}

.news-detail-related {
    padding: 30px;
    margin-top: 24px;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 18px;
}

.news-detail-related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.news-detail-related-head h2 {
    margin: 0;
    font-size: 21px;
    color: #0f172a;
}

.news-detail-related-head a {
    color: #2563eb;
    text-decoration: none;
}

.news-detail-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.news-detail-related-grid > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 16px;
    color: #334155;
    text-decoration: none;
    background: #f8fafc;
    border-radius: 10px;
}

.news-detail-related-grid time {
    flex: 0 0 auto;
    font-size: 12px;
    color: #94a3b8;
}

.news-detail-missing {
    width: min(720px, calc(100% - 40px));
    padding: 70px 30px;
    margin: 60px auto;
    text-align: center;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 18px;
}

.news-detail-missing strong {
    font-size: 26px;
    color: #0f172a;
}

.news-detail-missing p {
    color: #64748b;
}

.news-detail-missing a {
    display: inline-flex;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    background: #2563eb;
    border-radius: 9px;
}

.news-detail-action-toast {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 1100;
    padding: 11px 18px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.92);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.20);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.news-detail-action-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1280px) {
    .news-detail-shell {
        width: min(100% - 40px, 980px);
    }

    .news-detail-layout-grid,
    .news-detail-layout-grid.no-related {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .news-detail-related-sidebar {
        position: static;
        grid-column: 2;
        max-height: none;
        padding-right: 0;
        overflow: visible;
    }

    .news-detail-related-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
    }
}

@media (max-width: 760px) {
    .news-detail-page .news-shell {
        padding-top: 28px;
    }

    .news-detail-shell {
        width: min(100% - 24px, 1120px);
    }

    .news-detail-layout-grid,
    .news-detail-layout-grid.no-related {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Mobile: Hide left sidebar, move actions to bottom */
    .news-detail-actions-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: space-around;
        padding: 12px 16px;
        background: #fff;
        border-top: 1px solid #e2e8f0;
        z-index: 100;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }

    .news-detail-page .news-detail-action-btn {
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
    }

    .news-detail-page .news-detail-action-btn:hover:not(.disabled),
    .news-detail-page .news-detail-action-btn:focus-visible:not(.disabled) {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        transform: none;
    }

    /* Mobile: Move related to bottom */
    .news-detail-related-sidebar {
        position: static;
        grid-column: auto;
        max-height: none;
        overflow: visible;
    }

    .news-detail-related-card {
        padding: 20px 16px;
    }

    .news-detail-related-list {
        display: flex;
    }

    .news-detail-page .news-related-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 12px;
    }

    .news-related-thumb {
        width: 76px;
        height: 60px;
    }

    .news-detail-article {
        padding: 32px 20px;
        border-radius: 0;
    }

    .news-detail-attachments > div,
    .news-detail-navigation,
    .news-detail-related-grid {
        grid-template-columns: 1fr;
    }

    .news-detail-navigation > div:last-child {
        text-align: left;
    }

    .news-detail-related {
        padding: 22px 18px;
    }

    /* Add padding to bottom for fixed action bar */
    .news-detail-page {
        padding-bottom: 80px;
    }

    .news-detail-action-toast {
        right: 50%;
        bottom: 86px;
        transform: translate(50%, 12px);
        white-space: nowrap;
    }

    .news-detail-action-toast.is-visible {
        transform: translate(50%, 0);
    }
}

.news-page a {
    color: inherit;
    text-decoration: none;
}

.news-page .nav-link.news-active {
    color: var(--news-blue);
}

.news-page .nav-link.news-active::after {
    opacity: 1;
}

.news-page h1,
.news-page h2,
.news-page h3,
.news-page p,
.news-page span,
.news-page strong,
.news-page a,
.news-page button,
.news-page input,
.news-page time,
.news-page em {
    overflow-wrap: anywhere;
    letter-spacing: 0;
}

.news-shell {
    min-height: 100vh;
    overflow: hidden;
}

.news-hero {
    position: relative;
    min-height: 424px;
    background:
        linear-gradient(180deg, rgba(242, 248, 255, 0.44), rgba(242, 248, 255, 0.72)),
        url("../img/news/news-doc-panel-bg.jpg") center top / cover no-repeat;
}

.news-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 82px;
    background: linear-gradient(180deg, rgba(243, 247, 255, 0), var(--news-page-bg) 86%);
    pointer-events: none;
}

.news-hero-inner {
    position: relative;
    z-index: 1;
    width: var(--news-wide);
    margin: 0 auto;
    padding: 72px 0 0;
    text-align: center;
}

.news-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(22, 93, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--news-blue);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(22, 93, 255, 0.10);
}

.news-hero-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--news-orange);
    box-shadow: 0 0 0 5px rgba(255, 122, 69, 0.15);
}

.news-hero h1 {
    margin: 18px 0 0;
    color: #07142b;
    font-size: 42px;
    line-height: 1.18;
    font-weight: 900;
}

.news-hero-desc {
    max-width: 650px;
    margin: 14px auto 0;
    color: #4b5d79;
    font-size: 15px;
    line-height: 1.72;
    font-weight: 700;
}

.news-hero-search {
    width: min(720px, 100%);
    height: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    margin: 28px auto 0;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(22, 93, 255, 0.12);
    border-radius: 4px;
    box-shadow: 0 18px 38px rgba(31, 66, 112, 0.12);
    overflow: hidden;
}

.news-hero-search label {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.news-search-icon {
    position: absolute;
    left: 20px;
    width: 18px;
    height: 18px;
    color: #8ca0bd;
    pointer-events: none;
}

.news-hero-search input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 18px 0 52px;
    background: transparent;
    color: #1d2433;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
}

.news-hero-search input::placeholder {
    color: #8b99ae;
}

.news-hero-search button {
    border: 0;
    background: var(--news-blue);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.2s ease;
}

.news-hero-search button:hover {
    background: var(--news-blue-deep);
}

.news-doc-entry {
    position: relative;
    z-index: 3;
    width: var(--news-wide);
    margin: -74px auto 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 1px solid rgba(219, 231, 247, 0.88);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--news-shadow);
    overflow: hidden;
}

.news-doc-card {
    min-height: 116px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 22px;
    border-right: 1px solid var(--news-line);
    background: linear-gradient(180deg, #fff, #fbfdff);
    transition: background 0.2s ease, transform 0.2s ease;
}

.news-doc-card:last-child {
    border-right: 0;
}

.news-doc-card:hover {
    background: #f6faff;
    transform: translateY(-2px);
}

.news-doc-card img {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    object-fit: contain;
}

.news-doc-copy {
    min-width: 0;
}

.news-doc-card strong {
    display: block;
    color: #172033;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
}

.news-doc-meta {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    color: #65758c;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.news-doc-meta::after,
.news-list-more::after,
.news-rank-more::after,
.news-empty a::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    flex: 0 0 auto;
}

.news-content {
    width: var(--news-max);
    margin: 42px auto 72px;
    display: grid;
    grid-template-columns: 246px minmax(0, 1fr) 312px;
    gap: 22px;
    align-items: start;
}

.news-category-panel,
.news-list-panel,
.news-rank-panel {
    background: #fff;
    border: 1px solid rgba(219, 231, 247, 0.92);
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(31, 66, 112, 0.07);
}

.news-category-panel {
    position: sticky;
    top: 82px;
    padding: 14px;
    min-width: 0;
    overflow: hidden;
}

.news-category-title {
    padding: 16px 18px 14px;
    color: #172033;
    font-size: 17px;
    font-weight: 900;
}

.news-category-list {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.news-category-button {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-radius: 6px;
    padding: 0 16px;
    background: transparent;
    color: #344054;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.news-category-button span {
    white-space: nowrap;
}

.news-category-button em {
    min-width: 28px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef4ff;
    color: #6b7b94;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.news-category-button:hover,
.news-category-button.active {
    background: #edf5ff;
    color: var(--news-blue);
}

.news-category-button.active em {
    background: var(--news-blue);
    color: #fff;
}

.news-category-help {
    margin: 16px 0 0;
    padding: 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f2f8ff, #f7fbff);
    border: 1px solid #e4eefb;
}

.news-category-help strong {
    display: block;
    color: #172033;
    font-size: 14px;
    line-height: 1.42;
    font-weight: 900;
}

.news-category-help p {
    margin: 8px 0 12px;
    color: #667085;
    font-size: 13px;
    line-height: 1.58;
    font-weight: 600;
}

.news-category-help a {
    color: var(--news-blue);
    font-size: 13px;
    font-weight: 900;
}

.news-list-panel {
    min-width: 0;
    overflow: hidden;
}

.news-list-head {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 32px;
    border-bottom: 1px solid var(--news-line);
}

.news-list-head h2 {
    margin: 0;
    color: #172033;
    font-size: 23px;
    line-height: 1.34;
    font-weight: 900;
}

.news-list-head span {
    color: #71819a;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.news-toolbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 32px;
    border-bottom: 1px solid #edf3fb;
    background: #fbfdff;
}

.news-filter-label {
    color: #667085;
    font-size: 13px;
    font-weight: 800;
}

.news-order-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-order-button {
    min-height: 30px;
    border: 1px solid #dbe7f7;
    border-radius: 4px;
    padding: 0 12px;
    background: #fff;
    color: #5d6b82;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.news-order-button.active {
    border-color: rgba(22, 93, 255, 0.28);
    background: #edf5ff;
    color: var(--news-blue);
}

.news-list {
    display: grid;
}

.news-item {
    min-height: 112px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 124px;
    gap: 20px;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #edf3fb;
    background: #fff;
    transition: background 0.2s ease, transform 0.2s ease;
}

.news-item:last-child {
    border-bottom: 0;
}

.news-item:hover {
    background: #f8fbff;
}

.news-item[hidden] {
    display: none;
}

.news-item-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef5ff;
    color: var(--news-blue);
    box-shadow: inset 0 0 0 1px rgba(22, 93, 255, 0.10);
}

.news-item-icon::before {
    content: "";
    width: 18px;
    height: 14px;
    border: 2px solid currentColor;
    border-left-width: 7px;
    border-radius: 3px 6px 6px 3px;
    transform: skewX(-10deg);
}

.news-item-main {
    min-width: 0;
    overflow: hidden;
}

.news-item-title {
    display: block;
    max-width: 100%;
    color: #172033;
    font-size: 17px;
    line-height: 1.42;
    font-weight: 900;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-item-title:hover {
    color: var(--news-blue);
}

.news-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 11px;
    color: #7a889c;
    font-size: 13px;
    font-weight: 700;
}

.news-badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf5ff;
    color: var(--news-blue);
    font-size: 12px;
    font-weight: 900;
}

.news-badge.notice {
    background: #fff4ed;
    color: #f05a28;
}

.news-badge.log {
    background: #ecfdf5;
    color: #0f9461;
}

.news-badge.help {
    background: #f3f0ff;
    color: #6b46c1;
}

.news-list-more {
    justify-self: end;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--news-blue);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.news-empty {
    display: none;
    padding: 46px 24px;
    text-align: center;
}

.news-empty.show {
    display: block;
}

.news-empty strong {
    display: block;
    color: #172033;
    font-size: 18px;
    font-weight: 900;
}

.news-empty p {
    margin: 10px 0 18px;
    color: #667085;
    font-size: 14px;
    line-height: 1.62;
    font-weight: 600;
}

.news-empty a {
    display: inline-flex;
    align-items: center;
    color: var(--news-blue);
    font-size: 14px;
    font-weight: 900;
}

.news-pagination {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 32px;
    border-top: 1px solid var(--news-line);
    color: #667085;
    font-size: 13px;
    font-weight: 800;
}

.news-page-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-page-controls button,
.news-page-controls strong {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid #dbe7f7;
    background: #fff;
    color: #5d6b82;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
}

.news-page-controls strong {
    border-color: var(--news-blue);
    background: var(--news-blue);
    color: #fff;
}

.news-rank-panel {
    overflow: hidden;
}

.news-rank-banner {
    display: block;
    height: 122px;
    background: #eaf2ff;
    overflow: hidden;
}

.news-rank-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-rank-body {
    padding: 22px 20px 20px;
}

.news-rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.news-rank-head h2 {
    margin: 0;
    color: #172033;
    font-size: 20px;
    font-weight: 900;
}

.news-rank-head span {
    color: #8b99ae;
    font-size: 12px;
    font-weight: 800;
}

.news-rank-list {
    display: grid;
    gap: 2px;
}

.news-rank-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #edf3fb;
}

.news-rank-item:last-child {
    border-bottom: 0;
}

.news-rank-num {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #edf5ff;
    color: var(--news-blue);
    font-size: 13px;
    font-weight: 900;
}

.news-rank-item:nth-child(1) .news-rank-num {
    background: #ffefe8;
    color: #f05a28;
}

.news-rank-item:nth-child(2) .news-rank-num {
    background: #fff7df;
    color: #d48a00;
}

.news-rank-item:nth-child(3) .news-rank-num {
    background: #eafbf5;
    color: #0f9461;
}

.news-rank-copy {
    min-width: 0;
}

.news-rank-copy a {
    display: block;
    color: #263348;
    font-size: 14px;
    line-height: 1.48;
    font-weight: 900;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-rank-copy a:hover {
    color: var(--news-blue);
}

.news-rank-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.news-rank-meta span {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf5ff;
    color: var(--news-blue);
    font-size: 12px;
    font-weight: 900;
}

.news-rank-meta time {
    color: #9aa7bb;
    font-size: 12px;
    font-weight: 700;
}

.news-rank-more {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    color: var(--news-blue);
    font-size: 14px;
    font-weight: 900;
}

.news-aside-card {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid rgba(219, 231, 247, 0.92);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(22, 93, 255, 0.09), rgba(20, 184, 212, 0.06)),
        #fff;
    box-shadow: 0 12px 34px rgba(31, 66, 112, 0.07);
}

.news-aside-card h2 {
    margin: 0;
    color: #172033;
    font-size: 18px;
    line-height: 1.36;
    font-weight: 900;
}

.news-aside-card p {
    margin: 10px 0 16px;
    color: #667085;
    font-size: 13px;
    line-height: 1.64;
    font-weight: 700;
}

.news-aside-actions {
    display: flex;
    gap: 10px;
}

.news-aside-actions a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0 14px;
    background: #fff;
    color: var(--news-blue);
    border: 1px solid rgba(22, 93, 255, 0.16);
    font-size: 13px;
    font-weight: 900;
}

.news-aside-actions a:first-child {
    background: var(--news-blue);
    color: #fff;
}

.news-floating {
    position: fixed;
    right: 18px;
    top: 50%;
    z-index: 90;
    display: grid;
    gap: 10px;
    transform: translateY(-50%);
}

.news-floating a {
    width: 58px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--news-blue);
    border: 1px solid rgba(22, 93, 255, 0.12);
    box-shadow: 0 12px 26px rgba(31, 66, 112, 0.14);
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    font-weight: 900;
}

.news-floating .news-feedback {
    min-height: 132px;
    border-radius: 999px;
    background: var(--news-blue);
    color: #fff;
    writing-mode: vertical-rl;
    letter-spacing: 2px;
}

@media (max-width: 1180px) {
    .news-content {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .news-aside {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 18px;
    }

    .news-aside-card {
        margin-top: 0;
    }

    .news-rank-banner {
        height: 142px;
    }
}

@media (max-width: 1539px) {
    .news-floating {
        display: none;
    }
}

@media (max-width: 1024px) {
    .news-page {
        --news-wide: min(100% - 32px, 900px);
        --news-max: min(100% - 32px, 900px);
    }

    .news-doc-entry {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .news-doc-card {
        border-bottom: 1px solid var(--news-line);
    }

    .news-doc-card:nth-child(3) {
        border-right: 0;
    }

    .news-doc-card:nth-child(n+4) {
        border-bottom: 0;
    }

    .news-content {
        grid-template-columns: 1fr;
    }

    .news-category-panel {
        position: static;
    }

    .news-category-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .news-category-help {
        display: none;
    }

    .news-aside {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .news-page {
        --news-wide: min(100% - 24px, 640px);
        --news-max: min(100% - 24px, 640px);
        padding-top: 58px;
    }

    .news-hero {
        min-height: 488px;
        background-size: auto 100%;
    }

    .news-hero-inner {
        padding-top: 48px;
    }

    .news-hero h1 {
        font-size: 34px;
    }

    .news-hero-desc {
        font-size: 14px;
    }

    .news-hero-search {
        height: auto;
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .news-hero-search label {
        height: 52px;
    }

    .news-hero-search button {
        height: 48px;
    }

    .news-doc-entry {
        margin-top: -92px;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(236px, 72%);
        grid-template-columns: none;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        touch-action: pan-x;
    }

    .news-doc-entry::-webkit-scrollbar {
        display: none;
    }

    .news-doc-card,
    .news-doc-card:nth-child(n) {
        min-height: 112px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        border-right: 1px solid var(--news-line);
        border-bottom: 0;
        padding: 18px;
    }

    .news-doc-card:last-child {
        border-right: 0;
    }

    .news-content {
        margin-top: 28px;
        margin-bottom: 52px;
        gap: 16px;
    }

    .news-category-panel {
        padding: 10px;
    }

    .news-category-title {
        display: none;
    }

    .news-category-list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .news-category-button {
        width: auto;
        min-height: 40px;
        padding: 0 12px;
        white-space: nowrap;
    }

    .news-list-head,
    .news-toolbar,
    .news-pagination {
        padding-left: 18px;
        padding-right: 18px;
    }

    .news-list-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content;
        align-items: stretch;
    }

    .news-list-head {
        grid-column: 1;
        grid-row: 1;
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 18px 8px 16px 18px;
        gap: 8px;
    }

    .news-toolbar {
        grid-column: 2;
        grid-row: 1;
        min-height: auto;
        align-items: flex-end;
        flex-direction: column;
        justify-content: center;
        padding: 18px 18px 16px 8px;
        background: #fff;
        gap: 9px;
    }

    .news-filter-label {
        max-width: 142px;
        color: #697891;
        font-size: 12px;
        line-height: 1.35;
        text-align: right;
    }

    .news-order-group {
        width: auto;
        justify-content: flex-end;
        overflow-x: visible;
        gap: 6px;
        padding-bottom: 2px;
    }

    .news-order-button {
        min-height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .news-list,
    .news-empty,
    .news-pagination {
        grid-column: 1 / -1;
    }

    .news-item {
        min-height: auto;
        grid-template-columns: 32px minmax(0, 1fr) auto;
        gap: 10px;
        row-gap: 8px;
        padding: 16px 14px;
    }

    .news-item-icon {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: start;
        width: 32px;
        height: 32px;
    }

    .news-item-icon::before {
        width: 15px;
        height: 12px;
        border-left-width: 6px;
    }

    .news-item-main {
        display: contents;
    }

    .news-item-title {
        grid-column: 2 / 4;
        grid-row: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
        word-break: normal;
    }

    .news-item-meta {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
        margin-top: 0;
    }

    .news-list-more {
        grid-column: 3;
        grid-row: 2;
        justify-self: end;
        align-self: center;
        min-height: 24px;
        margin-top: 0;
    }

    .news-pagination {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding-top: 16px;
        padding-bottom: 18px;
    }

    .news-aside {
        grid-template-columns: 1fr;
    }

    .news-rank-banner {
        height: 138px;
    }

    .news-floating {
        display: none;
    }
}

@media (max-width: 480px) {
    .news-hero {
        min-height: 460px;
    }

    .news-hero-kicker {
        font-size: 12px;
    }

    .news-hero h1 {
        font-size: 30px;
    }

    .news-doc-card strong {
        font-size: 15px;
    }

    .news-doc-meta {
        font-size: 12px;
    }

    .news-list-head h2 {
        font-size: 21px;
    }

    .news-item-title {
        font-size: 15px;
    }

    .news-item-meta {
        gap: 8px;
    }

    .news-aside-actions {
        flex-direction: column;
    }

    .news-aside-actions a {
        width: 100%;
    }
}

/* MagStack help content body */
.bo-nh-article-body img{max-width:100%;height:auto}
.bo-nh-article-body p{margin:0 0 1em}
.news-page a{text-decoration:none}

/* Category count badges — beside label, not flush right */
.news-category-button{
  justify-content:flex-start;
  gap:10px;
  padding:0 14px;
}
.news-category-button em{
  margin-left:0;
  flex:0 0 auto;
  min-width:28px;
  height:24px;
  padding:0 8px;
  box-sizing:border-box;
  background:#dbeafe;
  color:#165dff;
  border:1px solid rgba(22,93,255,.28);
  font-size:12px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  letter-spacing:.02em;
  box-shadow:none;
}
.news-category-button:hover em{
  background:#bfdbfe;
  color:#0f3cc9;
  border-color:rgba(15,60,201,.35);
}
.news-category-button.active em{
  background:#165dff;
  color:#fff;
  border-color:transparent;
  box-shadow:0 2px 6px rgba(22,93,255,.28);
}
