:root {
    --news-bg: #0f1116;
    --news-panel: #14171d;
    --news-panel-2: #191d25;
    --news-text: #e8ecf0;
    --news-muted: #929aa5;
    --news-dim: #636b76;
    --news-line: rgba(232, 236, 240, .12);
    --news-line-soft: rgba(232, 236, 240, .07);
}

body.xewex-news {
    margin: 0;
    background: var(--news-bg);
    color: var(--news-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.xewex-news::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
        radial-gradient(circle at 78% 8%, rgba(151, 166, 184, .09), transparent 32%);
    background-size: 72px 72px, 72px 72px, auto;
}

.xewex-news-main,
.xewex-article-main {
    min-height: 70vh;
    overflow: hidden;
}

.xewex-news-shell,
.xewex-article-shell {
    width: min(calc(100% - 64px), 1360px);
    margin-inline: auto;
}

.xewex-news-hero {
    position: relative;
    padding: 190px 0 92px;
    border-bottom: 1px solid var(--news-line-soft);
}

.xewex-news-hero::after {
    position: absolute;
    right: max(32px, calc((100vw - 1360px) / 2));
    bottom: 42px;
    color: rgba(232, 236, 240, .045);
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(5rem, 13vw, 12rem);
    font-weight: 800;
    line-height: .75;
    content: "8i";
}

.xewex-news-kicker,
.xewex-article-meta,
.xewex-article-breadcrumbs {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 0 28px;
    color: var(--news-muted);
    font-family: "JetBrains Mono", monospace;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.xewex-news-kicker span {
    color: var(--news-text);
}

.xewex-news-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 1020px;
    margin: 0;
    font-size: clamp(3.3rem, 7.6vw, 7.8rem);
    font-weight: 600;
    letter-spacing: -.075em;
    line-height: .9;
}

.xewex-news-intro {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin-top: 38px;
    color: var(--news-muted);
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(.95rem, 1.4vw, 1.12rem);
    line-height: 1.8;
}

.xewex-news-intro p {
    margin: 0;
}

.xewex-news-hero__line {
    position: relative;
    z-index: 1;
    width: min(520px, 70%);
    height: 1px;
    margin-top: 44px;
    overflow: hidden;
    background: var(--news-line-soft);
}

.xewex-news-hero__line span {
    display: block;
    width: 34%;
    height: 100%;
    background: var(--news-text);
}

.xewex-news-feed,
.xewex-related {
    padding: 84px 0 110px;
}

.xewex-news-feed__head {
    display: flex;
    gap: 24px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 34px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--news-line);
}

.xewex-news-feed__head h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 550;
    letter-spacing: -.045em;
}

.xewex-news-feed__head > span {
    color: var(--news-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.xewex-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.xewex-news-card {
    min-width: 0;
    overflow: hidden;
    background: rgba(20, 23, 29, .86);
    border: 1px solid var(--news-line-soft);
    border-radius: 22px;
    transition: background .3s ease, border-color .3s ease, transform .3s ease;
}

.xewex-news-card:hover {
    background: var(--news-panel-2);
    border-color: rgba(232, 236, 240, .17);
    transform: translateY(-4px);
}

.xewex-news-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    color: var(--news-text);
    background: #0b0d11;
    border-bottom: 1px solid var(--news-line-soft);
}

.xewex-news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.68) contrast(1.04);
    transition: filter .45s ease, transform .6s cubic-bezier(.23, 1, .32, 1);
}

.xewex-news-card:hover .xewex-news-card__media img {
    filter: saturate(.95) contrast(1.04);
    transform: scale(1.035);
}

.xewex-news-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, transparent 49.7%, rgba(255, 255, 255, .07) 50%, transparent 50.3%),
        radial-gradient(circle at 68% 32%, rgba(151, 166, 184, .18), transparent 34%);
}

.xewex-news-card__placeholder::before,
.xewex-news-card__placeholder::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(232, 236, 240, .1);
    border-radius: 50%;
}

.xewex-news-card__placeholder::before {
    width: 38%;
    aspect-ratio: 1;
}

.xewex-news-card__placeholder::after {
    width: 56%;
    aspect-ratio: 1;
}

.xewex-news-card__placeholder i {
    color: rgba(232, 236, 240, .82);
    font-size: 2.2rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: -.08em;
}

.xewex-news-card__placeholder b {
    position: absolute;
    right: 18px;
    bottom: 15px;
    color: var(--news-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: .66rem;
    letter-spacing: .12em;
}

.xewex-news-card__body {
    display: flex;
    min-height: 310px;
    padding: 24px;
    flex-direction: column;
}

.xewex-news-card__meta,
.xewex-news-card__footer {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    color: var(--news-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: .65rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.xewex-news-card__meta a,
.xewex-news-card__meta span {
    overflow: hidden;
    color: #bec7d1;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xewex-news-card h2 {
    margin: 22px 0 14px;
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    font-weight: 560;
    letter-spacing: -.04em;
    line-height: 1.14;
}

.xewex-news-card h2 a {
    color: var(--news-text);
    text-decoration: none;
}

.xewex-news-card__body > p {
    margin: 0 0 28px;
    color: var(--news-muted);
    font-size: .92rem;
    line-height: 1.65;
}

.xewex-news-card__footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--news-line-soft);
}

.xewex-news-card__footer a {
    color: var(--news-text);
    text-decoration: none;
}

.xewex-news-card__footer b {
    display: inline-block;
    margin-left: 4px;
    transition: transform .25s ease;
}

.xewex-news-card:hover .xewex-news-card__footer b {
    transform: translate(3px, -3px);
}

.xewex-news-pagination {
    margin-top: 58px;
}

.xewex-news-pagination .page-numbers {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.xewex-news-pagination a,
.xewex-news-pagination span {
    display: inline-flex;
    min-width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: var(--news-muted);
    font-family: "JetBrains Mono", monospace;
    font-size: .72rem;
    text-decoration: none;
    background: var(--news-panel);
    border: 1px solid var(--news-line-soft);
    border-radius: 12px;
}

.xewex-news-pagination a:hover,
.xewex-news-pagination .current {
    color: var(--news-bg);
    background: var(--news-text);
}

.xewex-news-empty {
    padding: 76px 28px;
    text-align: center;
    background: rgba(20, 23, 29, .7);
    border: 1px solid var(--news-line-soft);
    border-radius: 24px;
}

.xewex-news-empty > span {
    color: var(--news-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: .72rem;
}

.xewex-news-empty h2 {
    margin: 18px 0 10px;
    font-size: clamp(2rem, 5vw, 4rem);
}

.xewex-news-empty p {
    color: var(--news-muted);
}

.xewex-news-empty a {
    display: inline-flex;
    padding: 13px 20px;
    margin-top: 18px;
    color: var(--news-bg);
    font-weight: 650;
    text-decoration: none;
    background: var(--news-text);
    border-radius: 999px;
}

/* Single article */
.xewex-article-hero {
    padding: 178px 0 78px;
    border-bottom: 1px solid var(--news-line-soft);
}

.xewex-article-breadcrumbs {
    gap: 9px;
    margin-bottom: 48px;
    letter-spacing: .05em;
    text-transform: none;
}

.xewex-article-breadcrumbs a {
    color: var(--news-muted);
    text-decoration: none;
}

.xewex-article-breadcrumbs a:hover {
    color: var(--news-text);
}

.xewex-article-meta {
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.xewex-article-meta > *:not(:last-child)::after {
    margin-left: 12px;
    color: var(--news-dim);
    content: "·";
}

.xewex-article-meta a {
    color: var(--news-text);
    text-decoration: none;
}

.xewex-article-hero h1 {
    max-width: 1180px;
    margin: 0;
    font-size: clamp(2.8rem, 6.3vw, 6.6rem);
    font-weight: 590;
    letter-spacing: -.07em;
    line-height: .98;
    text-wrap: balance;
}

.xewex-article-lead {
    max-width: 830px;
    margin: 34px 0 0;
    color: #aeb6c0;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.65;
}

.xewex-article-cover {
    width: min(calc(100% - 64px), 1360px);
    margin: 54px auto 0;
}

.xewex-article-cover img {
    display: block;
    width: 100%;
    max-height: 760px;
    object-fit: cover;
    border: 1px solid var(--news-line-soft);
    border-radius: 24px;
}

.xewex-article-cover figcaption {
    margin-top: 12px;
    color: var(--news-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: .67rem;
    line-height: 1.5;
}

.xewex-article-layout {
    display: grid;
    width: min(calc(100% - 64px), 1100px);
    grid-template-columns: 180px minmax(0, 760px);
    gap: 80px;
    margin: 76px auto 0;
}

.xewex-article-aside {
    position: sticky;
    top: 110px;
    display: grid;
    height: max-content;
    gap: 8px;
    padding-top: 10px;
    color: var(--news-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: .64rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.xewex-article-aside strong {
    margin-bottom: 16px;
    color: #b9c1cb;
    font-size: .68rem;
    font-weight: 550;
    letter-spacing: .02em;
    text-transform: none;
}

.xewex-article-content {
    min-width: 0;
    color: #cbd1d8;
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.85;
}

.xewex-article-content > *:first-child {
    margin-top: 0;
}

.xewex-article-content h2,
.xewex-article-content h3,
.xewex-article-content h4 {
    color: var(--news-text);
    font-weight: 580;
    letter-spacing: -.035em;
    line-height: 1.2;
}

.xewex-article-content h2 {
    margin: 2.3em 0 .7em;
    font-size: clamp(1.9rem, 4vw, 3rem);
}

.xewex-article-content h3 {
    margin: 2em 0 .65em;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.xewex-article-content p,
.xewex-article-content ul,
.xewex-article-content ol {
    margin: 0 0 1.5em;
}

.xewex-article-content a {
    color: var(--news-text);
    text-decoration-color: rgba(232, 236, 240, .38);
    text-underline-offset: 4px;
}

.xewex-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.xewex-article-content figure {
    max-width: 100%;
    margin: 2.2em 0;
}

.xewex-article-content figcaption {
    margin-top: 10px;
    color: var(--news-dim);
    font-size: .72rem;
}

.xewex-article-content blockquote {
    padding: 8px 0 8px 28px;
    margin: 2.2em 0;
    color: var(--news-text);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.5;
    border-left: 2px solid var(--news-text);
}

.xewex-article-content blockquote p:last-child {
    margin-bottom: 0;
}

.xewex-article-content pre,
.xewex-article-content code {
    font-family: "JetBrains Mono", monospace;
}

.xewex-article-content code {
    padding: .14em .35em;
    font-size: .88em;
    background: var(--news-panel-2);
    border-radius: 5px;
}

.xewex-article-content pre {
    max-width: 100%;
    padding: 22px;
    overflow: auto;
    background: #090b0e;
    border: 1px solid var(--news-line-soft);
    border-radius: 14px;
}

.xewex-article-content pre code {
    padding: 0;
    background: transparent;
}

.xewex-article-content table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
}

.xewex-article-content th,
.xewex-article-content td {
    padding: 13px 15px;
    text-align: left;
    border: 1px solid var(--news-line);
}

.xewex-article-content th {
    color: var(--news-text);
    background: var(--news-panel-2);
}

.xewex-article-footer {
    display: flex;
    width: min(calc(100% - 64px), 1100px);
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0 82px;
    margin: 58px auto 0;
    border-top: 1px solid var(--news-line);
}

.xewex-article-footer a,
.xewex-article-footer__tags span {
    color: var(--news-muted);
    font-family: "JetBrains Mono", monospace;
    font-size: .68rem;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
}

.xewex-article-footer__tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.xewex-article-footer__tags a {
    color: var(--news-text);
}

.xewex-related {
    background: rgba(9, 11, 14, .42);
    border-top: 1px solid var(--news-line-soft);
}

@media (max-width: 1024px) {
    .xewex-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xewex-article-layout {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 48px;
    }
}

@media (max-width: 720px) {
    .xewex-news-shell,
    .xewex-article-shell,
    .xewex-article-cover,
    .xewex-article-layout,
    .xewex-article-footer {
        width: min(calc(100% - 32px), 100%);
    }

    .xewex-news-hero {
        padding: 130px 0 64px;
    }

    .xewex-news-hero::after {
        right: 14px;
        bottom: 26px;
    }

    .xewex-news-hero h1 {
        font-size: clamp(2.7rem, 15vw, 5rem);
    }

    .xewex-news-intro {
        margin-top: 26px;
        font-size: .88rem;
    }

    .xewex-news-feed,
    .xewex-related {
        padding: 56px 0 72px;
    }

    .xewex-news-feed__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .xewex-news-grid {
        grid-template-columns: 1fr;
    }

    .xewex-news-card__body {
        min-height: 280px;
    }

    .xewex-news-pagination .page-numbers {
        flex-wrap: wrap;
    }

    .xewex-article-hero {
        padding: 130px 0 54px;
    }

    .xewex-article-breadcrumbs {
        margin-bottom: 34px;
    }

    .xewex-article-hero h1 {
        font-size: clamp(2.5rem, 13vw, 4.7rem);
    }

    .xewex-article-cover {
        margin-top: 30px;
    }

    .xewex-article-cover img {
        border-radius: 14px;
    }

    .xewex-article-layout {
        display: block;
        margin-top: 48px;
    }

    .xewex-article-aside {
        position: static;
        display: flex;
        gap: 8px 12px;
        align-items: baseline;
        margin-bottom: 36px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--news-line-soft);
        flex-wrap: wrap;
    }

    .xewex-article-aside strong {
        margin: 0 12px 0 0;
    }

    .xewex-article-content {
        line-height: 1.75;
    }

    .xewex-article-content table {
        display: block;
        overflow-x: auto;
    }

    .xewex-article-footer {
        align-items: flex-start;
        flex-direction: column;
        padding-bottom: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xewex-news-card,
    .xewex-news-card__media img,
    .xewex-news-card__footer b {
        transition: none;
    }
}
