/**
 * Rich article components — charts, KPIs, diagrams (news detail).
 */

.lb-news-article__layout {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.lb-news-article__layout--rich {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.lb-news-article__layout:not(.lb-news-article__layout--rich) {
    grid-template-columns: minmax(0, 1fr);
}

.lb-news-article__main {
    min-width: 0;
}

.lb-news-article__aside {
    position: sticky;
    top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lb-news-article__toc,
.lb-news-article__insight {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 212, 255, 0.14);
    background: linear-gradient(155deg, rgba(12, 18, 30, 0.94), rgba(6, 8, 14, 0.9));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.lb-news-article__toc strong,
.lb-news-article__insight strong {
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0, 212, 255, 0.75);
    font-family: 'JetBrains Mono', monospace;
}

.lb-news-article__toc nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lb-news-article__toc a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.58);
    text-decoration: none;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: color 0.2s ease;
}

.lb-news-article__toc a:hover,
.lb-news-article__toc a.is-active {
    color: #00d4ff;
}

.lb-news-article__insight p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.55);
}

.lb-news-article__insight .lb-article-kpi {
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
}

.lb-news-article__content-wrap--rich {
    max-width: none;
}

.lb-news-article__content-wrap--rich .lb-news-article__content {
    max-width: none;
}

.lb-news-article__figure-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 21 / 9;
    max-height: 420px;
    min-height: clamp(220px, 40vw, 380px);
    border-radius: 18px;
    border: 1px solid rgba(0, 212, 255, 0.18);
    background:
        linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(6, 8, 14, 0.95)),
        repeating-linear-gradient(45deg, rgba(0, 212, 255, 0.03) 0, rgba(0, 212, 255, 0.03) 2px, transparent 2px, transparent 10px);
    overflow: hidden;
}

@media (max-width: 640px) {
    .lb-news-article__figure-placeholder {
        aspect-ratio: 16 / 10;
        min-height: 200px;
    }
}

.lb-news-article__figure-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    filter: saturate(0.7) contrast(1.1);
}

.lb-news-article__figure-placeholder__label {
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    background: rgba(3, 5, 8, 0.82);
    backdrop-filter: blur(8px);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
}

.lb-news-article__figure-placeholder__label i {
    color: #00d4ff;
}

/* —— Rich prose inside content wrap —— */
.lb-article-rich .lb-article-lead {
    font-size: 1.08rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid rgba(0, 212, 255, 0.45);
}

.lb-article-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0 0 2rem;
}

.lb-article-kpi {
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.12);
    background: rgba(0, 212, 255, 0.04);
}

.lb-article-kpi__label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    text-transform: lowercase;
    color: rgba(0, 212, 255, 0.65);
    margin-bottom: 0.35rem;
}

.lb-article-kpi__value {
    display: block;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 700;
    color: #fff;
}

.lb-article-kpi__value span {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
}

.lb-article-kpi__delta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.4rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
}

.lb-article-kpi__delta.is-up { color: #00ff88; }
.lb-article-kpi__delta.is-down { color: #00d4ff; }

.lb-article-chart-panel {
    margin: 1.5rem 0 2rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 212, 255, 0.14);
    background: rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.lb-article-chart-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 212, 255, 0.04);
}

.lb-article-chart-panel__tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    color: rgba(0, 212, 255, 0.7);
    text-transform: lowercase;
}

.lb-article-chart-panel__head strong {
    font-size: 0.85rem;
    color: #fff;
}

.lb-article-chart-panel__body {
    padding: 1rem;
    position: relative;
    min-height: 240px;
}

.lb-article-chart-panel__body canvas {
    width: 100% !important;
    max-height: 320px;
}

.lb-article-chart-panel__body--donut {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

.lb-article-chart-panel figcaption {
    padding: 0.55rem 1rem 0.75rem;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.38);
    font-family: 'JetBrains Mono', monospace;
}

.lb-article-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 1.25rem 0 1.75rem;
}

.lb-article-progress__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.lb-article-progress__head strong {
    color: #00d4ff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

.lb-article-progress__track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.lb-article-progress__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.45);
    transition: width 1.2s ease;
}

.lb-article-progress__fill.is-mid {
    background: linear-gradient(90deg, #00d4ff, #38bdf8);
}

.lb-article-progress__fill.is-high {
    background: linear-gradient(90deg, #00ff88, #00d4ff);
}

.lb-article-callout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    margin: 1.5rem 0 2rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.22);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.06), rgba(0, 212, 255, 0.04));
}

.lb-article-callout__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 255, 136, 0.12);
    color: #00ff88;
    font-size: 1rem;
}

.lb-article-callout strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #fff;
}

.lb-article-callout p {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.62);
}

.lb-article-diagram {
    position: relative;
    margin: 1.5rem 0 2rem;
    padding: 1.25rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 212, 255, 0.16);
    background: rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.lb-article-diagram__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.lb-article-diagram__nodes {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.lb-article-diagram__node {
    flex: 1 1 140px;
    max-width: 180px;
    padding: 0.85rem 0.75rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.18);
    background: rgba(12, 18, 30, 0.9);
}

.lb-article-diagram__node i {
    display: block;
    font-size: 1.1rem;
    color: #00d4ff;
    margin-bottom: 0.35rem;
}

.lb-article-diagram__node span {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
}

.lb-article-diagram__node small {
    display: block;
    margin-top: 0.2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: rgba(0, 212, 255, 0.6);
    text-transform: lowercase;
}

.lb-article-diagram__node.is-accent {
    border-color: rgba(0, 255, 136, 0.35);
    box-shadow: 0 0 24px rgba(0, 255, 136, 0.12);
}

.lb-article-diagram__node.is-accent i {
    color: #00ff88;
}

.lb-article-diagram__arrow {
    color: rgba(0, 212, 255, 0.45);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.lb-article-split-charts {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
    margin: 1rem 0 2rem;
}

.lb-article-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0 2rem;
}

.lb-article-gallery__item {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
}

.lb-article-gallery__item--wide {
    grid-column: 1 / -1;
}

.lb-article-gallery__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    opacity: 0.85;
}

.lb-article-gallery__item figcaption {
    padding: 0.55rem 0.7rem 0.7rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
}

.lb-article-gallery__item figcaption span {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    color: rgba(0, 212, 255, 0.7);
    margin-bottom: 0.2rem;
    text-transform: lowercase;
}

.lb-article-compare {
    margin: 1.25rem 0 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.12);
    overflow: hidden;
}

.lb-article-compare__row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.62);
}

.lb-article-compare__row--head {
    background: rgba(0, 212, 255, 0.06);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 212, 255, 0.75);
}

.lb-article-compare__row .is-weak {
    color: rgba(255, 255, 255, 0.38);
}

.lb-article-compare__row .is-strong {
    color: #00ff88;
    font-weight: 600;
}

.lb-article-checklist {
    list-style: none;
    margin: 1rem 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.lb-article-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.68);
}

.lb-article-checklist i {
    color: #00ff88;
    margin-top: 0.15rem;
}

.lb-article-rich h2 {
    margin-top: 2rem;
    padding-top: 0.5rem;
    font-size: 1.25rem;
    scroll-margin-top: 6rem;
}

/* Animate progress bars when visible */
.lb-article-rich.is-animated .lb-article-progress__fill {
    animation: lbArticleProgressPulse 2.5s ease-in-out infinite alternate;
}

@keyframes lbArticleProgressPulse {
    from { filter: brightness(1); }
    to { filter: brightness(1.15); }
}

.lb-news-article__shell {
    width: min(1320px, 94vw);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 2.5vw, 1.75rem);
    padding-right: clamp(1rem, 2.5vw, 1.75rem);
}

@media (max-width: 1023px) {
    .lb-news-article__layout {
        grid-template-columns: 1fr;
    }

    .lb-news-article__aside {
        position: static;
        order: -1;
    }

    .lb-news-article__toc nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .lb-news-article__toc a {
        border: 1px solid rgba(0, 212, 255, 0.15);
        border-radius: 999px;
        padding: 0.35rem 0.65rem;
        border-bottom: none;
        font-size: 0.72rem;
    }

    .lb-article-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lb-article-split-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .lb-article-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .lb-article-diagram__arrow {
        display: none;
    }

    .lb-article-diagram__nodes {
        flex-direction: column;
    }

    .lb-article-diagram__node {
        max-width: none;
        width: 100%;
    }

    .lb-article-compare__row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .lb-article-compare__row--head {
        display: none;
    }

    .lb-article-compare__row span:first-child {
        font-weight: 600;
        color: #fff;
    }

    .lb-article-gallery {
        grid-template-columns: 1fr;
    }

    .lb-news-article__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .lb-news-article__share {
        justify-content: flex-start;
    }
}
