/* News-only bridge to the Khac Dau Moc design system. Load after both source styles. */
body.cx-news-surface .article-content .cx-editor-product-callout > div:last-child { min-width: 0; flex: 1; }
body.cx-news-surface .article-content .cx-editor-pros-cons { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (max-width: 600px) {
    body.cx-news-surface .article-content .cx-editor-pros-cons { grid-template-columns: minmax(0, 1fr) !important; }
}
body.cx-news-surface .cx-news-root,
body.cx-news-surface .sforum-article-progress {
    --primary: #c62828;
    --primary-dark: #9f2020;
    --primary-container: #ad2424;
    --primary-light: #fff1ef;
    --surface: #faf9f7;
    --surface-container-lowest: #fff;
    --surface-container-low: #f7f5f2;
    --surface-container: #eeeae4;
    --surface-container-high: #e7e2db;
    --on-surface: #22201e;
    --on-surface-variant: #625c55;
    --sforum-blue: var(--primary);
    --sforum-border: #e7e2db;
    --sforum-muted: #6a645e;
    --container-max: 1200px;
    --total-header-height: 108px;
    --cx-news-sticky-top: 120px;
}

body.cx-news-surface .cx-news-root {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    color: var(--on-surface);
    font-family: inherit;
    overflow-wrap: break-word;
}

body.cx-news-surface .cx-news-root *,
body.cx-news-surface .cx-news-root *::before,
body.cx-news-surface .cx-news-root *::after {
    box-sizing: border-box;
}

body.cx-news-surface .cx-news-root [hidden] {
    display: none !important;
}

body.cx-news-surface .cx-news-root .sforum-container,
body.cx-news-surface .cx-news-root .sforum-article-container {
    width: 100%;
    max-width: var(--container-max);
    min-width: 0;
    margin-inline: auto;
    padding-inline: 24px;
}

body.cx-news-surface .cx-news-root :is(h1, h2, h3, h4, h5, h6) {
    font-family: inherit;
    overflow-wrap: anywhere;
}

body.cx-news-surface .cx-news-root :is(button, input, select, textarea) {
    font-family: inherit;
}

body.cx-news-surface .cx-news-root :is(a, button, input):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

body.cx-news-surface .cx-news-root :is(.sforum-main-col, .sforum-sidebar,
    .sforum-featured-section, .sforum-featured-body, .sforum-spotlight-list,
    .sforum-latest-body, .sforum-popular-copy, .sforum-article-main,
    .sforum-article-sidebar, .article-content, .article-related-grid,
    .sforum-widget, .sidebar-widget, .sforum-product-pick > span) {
    min-width: 0;
    max-width: 100%;
}

body.cx-news-surface .cx-news-root .sforum-search {
    min-width: 0;
    max-width: 100%;
}

body.cx-news-surface .cx-news-root .sforum-search input[type="search"] {
    min-width: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

body.cx-news-surface .cx-news-root .sforum-header {
    margin: 12px 0 20px;
}

body.cx-news-surface .cx-news-root .sforum-header h1 {
    margin: 0 0 10px;
    font-size: clamp(24px, 2.4vw, 30px);
    line-height: 1.3;
}

body.cx-news-surface .cx-news-root .sforum-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
}

body.cx-news-surface .cx-news-root .sforum-main {
    min-width: 0;
}

body.cx-news-surface .cx-news-root .cxnews-search-submit {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

body.cx-news-surface .cx-news-root .sforum-latest-body h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.4;
}

body.cx-news-surface .cx-news-root .sforum-latest-body h2 a {
    color: inherit;
    text-decoration: none;
}

body.cx-news-surface .cx-news-root .sforum-latest-body h2 a:hover {
    color: var(--primary);
}

body.cx-news-surface .cx-news-root .navigation.pagination {
    display: block;
    margin: 24px 0;
    border: 0;
    background: transparent;
}

body.cx-news-surface .cx-news-root .navigation.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.cx-news-surface .cx-news-root .navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 4px 10px;
    border: 1px solid var(--sforum-border);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
}

body.cx-news-surface .cx-news-root .navigation.pagination .current {
    background: var(--primary);
    color: #fff;
}

body.cx-news-surface .cx-news-root .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid var(--sforum-border);
    border-radius: 10px;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    white-space: normal;
}

body.cx-news-surface .cx-news-root .btn-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

body.cx-news-surface .cx-news-root .sforum-top-grid.cx-news-no-sidebar,
body.cx-news-surface .cx-news-root .sforum-featured-layout.cx-news-solo {
    grid-template-columns: minmax(0, 1fr);
}

body.cx-news-surface .cx-news-root .cx-news-solo .sforum-featured-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: stretch;
}

body.cx-news-surface .cx-news-root .cx-news-solo .sforum-featured-media {
    align-self: stretch;
    max-height: 440px;
}

body.cx-news-surface .cx-news-root .sforum-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 80px;
    padding: 14px;
    background: linear-gradient(135deg, #f5efea, #fff7f4);
    color: #79534d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

body.cx-news-surface .cx-news-root .sforum-product-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

body.cx-news-surface .cx-news-root :is(.sforum-img, .sforum-thumb-placeholder,
    .sforum-article-cover img) {
    max-width: 100%;
}

body.cx-news-surface .cx-news-root :is(.sforum-spotlight-title,
    .sforum-channel-card strong, .sforum-popular-copy strong,
    .sforum-product-pick strong, .sforum-product-pick em,
    .sidebar-post-title, .article-related-name, .article-author-name) {
    overflow-wrap: anywhere;
}

body.cx-news-surface .cx-news-root :is(.sforum-back-news,
    .sforum-more-category, .sforum-article-more-box a) {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
}

body.cx-news-surface .cx-news-root .sforum-back-news {
    color: var(--primary);
    background: var(--primary-light);
    border-color: #efd2ce;
}

body.cx-news-surface .cx-news-root .sforum-back-news:hover {
    color: #fff;
    background: var(--primary);
}

body.cx-news-surface .cx-news-root :is(.sforum-cat, .sforum-section-link,
    .sforum-latest-body h3 a:hover, .sforum-channel-card:hover strong) {
    color: var(--primary);
}

body.cx-news-surface .cx-news-root .sforum-article-head .article-title {
    display: block;
    color: var(--on-surface);
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.32;
    letter-spacing: -.02em;
}

body.cx-news-surface .cx-news-root :is(.sforum-share-rail,
    .sforum-article-sidebar, .sforum-sidebar) {
    top: var(--cx-news-sticky-top);
}

body.cx-news-surface .cx-news-root .article-toc-header {
    width: 100%;
    min-height: 48px;
    gap: 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
    font: inherit;
}

body.cx-news-surface .cx-news-root .toc-title-text {
    min-width: 0;
}

body.cx-news-surface .cx-news-root .toc-toggle-text {
    flex: 0 0 auto;
}

body.cx-news-surface .cx-news-root .article-toc-body li a {
    overflow-wrap: anywhere;
}

body.cx-news-surface .cx-news-root .article-toc-body li.toc-h3 {
    padding-left: 20px;
}

body.cx-news-surface .cx-news-root .article-content {
    overflow-wrap: anywhere;
    line-height: 1.8;
}

body.cx-news-surface .cx-news-root .article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.cx-news-surface .cx-news-root .article-content :is(h2, h3, h4, h5, h6) {
    scroll-margin-top: calc(var(--cx-news-sticky-top) + 12px);
}

body.cx-news-surface .cx-news-root .article-content :is(figure, picture,
    video, iframe, embed, object, canvas, svg) {
    max-width: 100%;
}

body.cx-news-surface .cx-news-root .article-content img {
    max-width: 100% !important;
    height: auto;
}

body.cx-news-surface .cx-news-root .article-content figure {
    margin-inline: 0;
}

body.cx-news-surface .cx-news-root .article-content :is(pre, table) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

body.cx-news-surface .cx-news-root .article-content :is(th, td) {
    min-width: 110px;
    overflow-wrap: anywhere;
}

body.cx-news-surface .cx-news-root .article-content :not(pre) > code {
    white-space: normal;
    overflow-wrap: anywhere;
}

body.cx-news-surface .cx-news-root .article-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

body.cx-news-surface .cx-news-root .article-pages :is(a, .post-page-numbers) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 4px 10px;
    border: 1px solid var(--sforum-border);
    border-radius: 8px;
    text-decoration: none;
}

body.cx-news-surface .cx-news-root .sforum-article-more-box {
    border-color: #efd9d2;
    background: linear-gradient(135deg, #fff4ef, #fff);
}

body.cx-news-surface .cx-news-root .sforum-article-more-box a:hover {
    background: var(--primary-dark);
}

body.cx-news-surface .cx-news-root .sforum-homepage .sforum-featured-card:hover,
body.cx-news-surface .cx-news-root.sforum-homepage .sforum-featured-card:hover {
    border-color: #e2aaa1;
}

@media (max-width: 1100px) {
    body.cx-news-surface .cx-news-root .sforum-article-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 22px;
    }

    body.cx-news-surface .cx-news-root .sforum-share-rail {
        display: none;
    }
}

@media (max-width: 920px) {
    body.cx-news-surface .cx-news-root .sforum-article-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.cx-news-surface .cx-news-root .sforum-article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 768px) {
    body.cx-news-surface .cx-news-root,
    body.cx-news-surface .sforum-article-progress {
        --cx-news-sticky-top: 122px;
        --total-header-height: 110px;
    }

    body.cx-news-surface .cx-news-root .sforum-container,
    body.cx-news-surface .cx-news-root .sforum-article-container {
        padding-inline: 16px;
    }

    body.cx-news-surface .cx-news-root .sforum-article-head {
        padding: 20px 16px 6px;
    }

    body.cx-news-surface .cx-news-root .sforum-article-card .article-content {
        padding-inline: 16px;
    }

    body.cx-news-surface .cx-news-root .sforum-article-card :is(.article-toc,
        .article-tags, .sforum-inline-share, .article-author-bio, .article-related) {
        margin-left: 16px;
        margin-right: 16px;
    }

    body.cx-news-surface .cx-news-root .sforum-article-lead {
        font-size: 15px;
    }

    body.cx-news-surface .cx-news-root .sforum-latest-body h2 {
        font-size: 16px;
    }

    body.cx-news-surface .cx-news-root .cx-news-solo .sforum-featured-card {
        grid-template-columns: minmax(0, 1fr);
    }

    body.cx-news-surface .cx-news-root .article-author-bio {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    body.cx-news-surface .cx-news-root .sforum-article-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    body.cx-news-surface .cx-news-root .article-related-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.cx-news-surface .cx-news-root *,
    body.cx-news-surface .sforum-article-progress {
        scroll-behavior: auto;
        transition: none !important;
        animation: none !important;
    }
}
