/* ============================================================
   AIONITY GAZETTE – Newspaper-Style News System (v2)
   ============================================================ */

/* Google Fonts: Inter — now loaded from layout.html <head> for performance.
   The @import was removed to avoid a render-blocking CSS waterfall. */

/* ── Category Color System ───────────────────────────────── */
:root {
    --cat-crypto: #f7931a;
    --cat-stocks: #60a5fa;
    --cat-forex: #a78bfa;
    --cat-commodities: #fbbf24;
    --cat-indices: #34d399;
    --cat-all: #60a5fa;
}

/* ── Modal Backdrop ──────────────────────────────────────── */
#news-modal {
    transition: opacity 0.3s ease;
}

#news-modal.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

#news-modal.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.news-backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ── Newspaper Container ─────────────────────────────────── */
.news-paper {
    position: relative;
    width: 90vw;
    max-width: 1400px;
    height: 88vh;
    max-height: 900px;
    margin: auto;
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.95));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

/* ── Masthead / Header ───────────────────────────────────── */
.news-paper-header {
    position: relative;
    padding: 0.85rem 1.75rem 0.5rem;
    text-align: center;
    flex-shrink: 0;
}

.news-paper-masthead {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: #f1f5f9;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.news-paper-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.news-paper-subtitle .news-date {
    font-weight: 600;
}

.news-paper-subtitle .news-edition {
    opacity: 0.7;
}

.news-paper-subtitle .separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #475569;
}

.news-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.news-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Newspaper Rules / Dividers ──────────────────────────── */
.news-rule {
    border: none;
    height: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin: 0 1.75rem;
    flex-shrink: 0;
}

.news-rule.thin {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
}

/* ── Category Filter Tabs ────────────────────────────────── */
.news-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.75rem;
    overflow-x: auto;
    flex-shrink: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: box-shadow 0.3s ease;
}

.news-filter-bar.is-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.news-filter-bar::-webkit-scrollbar {
    display: none;
}

.news-filter-tab {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.news-filter-tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border-color: color-mix(in srgb, var(--cat-color, #60a5fa) 30%, transparent);
}

.news-filter-tab.active {
    background: color-mix(in srgb, var(--cat-color, #60a5fa) 12%, transparent);
    border-color: color-mix(in srgb, var(--cat-color, #60a5fa) 40%, transparent);
    color: var(--cat-color, #93c5fd);
    font-weight: 600;
    box-shadow: 0 0 12px color-mix(in srgb, var(--cat-color, #60a5fa) 15%, transparent);
}

.news-filter-tab svg {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.news-filter-tab.active svg {
    opacity: 1;
    color: var(--cat-color, #93c5fd);
}

.news-filter-icon {
    display: flex;
    align-items: center;
    line-height: 0;
}

.news-filter-label {
    line-height: 1;
}

.news-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.62rem;
    font-weight: 600;
    color: #64748b;
}

.news-filter-tab.active .news-filter-count {
    background: color-mix(in srgb, var(--cat-color, #60a5fa) 20%, transparent);
    color: var(--cat-color, #93c5fd);
}

/* ── Section Header (mobile only) ───────────────────────── */
.news-section-header {
    display: none;
}

@media (max-width: 640px) {
    .news-section-header {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.55rem 1rem 0.45rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(2, 6, 23, 0.7);
    }

    .news-section-header__icon {
        display: flex;
        align-items: center;
        line-height: 0;
        color: var(--section-header-color, #60a5fa);
        opacity: 0.85;
    }

    .news-section-header__label {
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--section-header-color, #93c5fd);
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }
}

/* ── Pages Container ─────────────────────────────────────── */
.news-pages-wrapper {
    position: relative;
    flex: 1;
    overflow: hidden;
    perspective: 1200px;
}

.news-page {
    position: absolute;
    inset: 0;
    padding: 0.5rem 1rem;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.3) transparent;
}

.news-page::-webkit-scrollbar {
    width: 6px;
}

.news-page::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.3);
    border-radius: 10px;
}

.news-page.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.news-page.exit-left {
    opacity: 0;
    transform: translateX(-40px);
}

.news-page.exit-right {
    opacity: 0;
    transform: translateX(40px);
}

/* ── Featured Article (Page 1 Top) ───────────────────────── */

.news-featured-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.news-featured-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.2rem;
    align-items: center;
    border-radius: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--cat-color, rgba(255, 255, 255, 0.06));
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.news-featured-card--top {
    border-left-width: 4px;
}

.news-featured-card:hover {
    border-color: color-mix(in srgb, var(--cat-color, #60a5fa) 40%, transparent);
    border-left-color: var(--cat-color, #60a5fa);
    background: rgba(96, 165, 250, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                0 0 0 1px color-mix(in srgb, var(--cat-color, #60a5fa) 10%, transparent);
}

.news-top-story-badge {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    z-index: 3;
    font-size: 1.15rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.news-featured-card,
.news-featured-card:hover,
.news-featured-card:visited,
.news-featured-card:active,
.news-featured-card:link {
    color: #f1f5f9;
    text-decoration: none !important;
}

.news-featured-card .news-featured-title,
.news-featured-card:hover .news-featured-title,
.news-featured-card:visited .news-featured-title,
.news-featured-card:link .news-featured-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #f1f5f9 !important;
    text-decoration: none !important;
}

.news-featured-card .news-featured-desc,
.news-featured-card:hover .news-featured-desc {
    color: #94a3b8 !important;
}

.news-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.news-featured-image {
    position: relative;
    border-radius: 0.875rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    width: 240px;
    height: 240px;
}

.news-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-featured-card:hover .news-featured-image img {
    transform: none;
}

.news-featured-image .news-img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.5), rgba(30, 41, 59, 0.5));
}

.news-article-image .news-img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.4), rgba(30, 41, 59, 0.4));
}

.news-featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    min-width: 0;
}

/* Category badge in featured body (right side) */
.news-featured-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem 0.2rem 0.4rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--cat-color, #60a5fa) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--cat-color, #60a5fa) 30%, transparent);
    color: var(--cat-color, #60a5fa);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    width: fit-content;
    line-height: 1;
    margin-top: -0.3rem;
    margin-bottom: 0.3rem;
}

.news-featured-cat-badge svg {
    color: var(--cat-color, #60a5fa);
    flex-shrink: 0;
}

.news-featured-cat-badge span {
    line-height: 1;
}

.news-featured-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: #f1f5f9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured-desc {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.6;
    color: #94a3b8;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    flex-wrap: wrap;
}

.news-featured-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #475569;
}

.news-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--cat-color, #60a5fa) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--cat-color, #60a5fa) 25%, transparent);
    color: var(--cat-color, #60a5fa);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.news-featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #60a5fa;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    margin-top: auto;
}

.news-featured-link:hover {
    color: #93c5fd;
}

/* ── Section Divider ─────────────────────────────────────── */
.news-section-divider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.2rem 0 0.6rem;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.news-section-divider::before,
.news-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

/* ── Article Grid ────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

/* Wide screens: use available space */
@media (min-width: 1400px) {
    .news-paper--inline .news-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .news-paper--inline .news-grid-bento {
        grid-template-columns: repeat(5, 1fr);
    }
}

.news-article {
    display: flex;
    flex-direction: column;
    border-radius: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--cat-color, rgba(255, 255, 255, 0.06));
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
    position: relative;
}

.news-article:hover {
    border-color: color-mix(in srgb, var(--cat-color, #60a5fa) 40%, transparent);
    border-left-color: var(--cat-color, #60a5fa);
    background: rgba(96, 165, 250, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                0 0 0 1px color-mix(in srgb, var(--cat-color, #60a5fa) 10%, transparent);
}

.news-article,
.news-article:hover,
.news-article:visited,
.news-article:active,
.news-article:link {
    color: #f1f5f9;
    text-decoration: none !important;
}

.news-article .news-article-title,
.news-article:hover .news-article-title,
.news-article:visited .news-article-title,
.news-article:link .news-article-title {
    color: #f1f5f9 !important;
    text-decoration: none !important;
}

.news-article * {
    color: inherit;
    text-decoration: none !important;
}

.news-article-image {
    position: relative;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.news-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-article:hover .news-article-image img {
    transform: scale(1.05);
}

/* ── Category Overlay Badge ───────────────────────────── */
.news-cat-overlay {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--cat-color, #60a5fa) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--cat-color, #60a5fa) 25%, transparent);
    color: var(--cat-color, #60a5fa);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1;
}

.news-cat-overlay svg {
    color: var(--cat-color, #60a5fa);
    flex-shrink: 0;
}

.news-cat-overlay span {
    line-height: 1;
}

.news-cat-overlay--sm {
    padding: 0.15rem 0.4rem 0.15rem 0.25rem;
    font-size: 0.55rem;
    border-radius: 6px;
    gap: 0.2rem;
}

/* ── Freshness Badges ────────────────────────────────── */
.news-freshness-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 2;
    animation: freshness-pulse 2s ease-in-out infinite;
}

.news-freshness-badge.breaking {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    border: 1px solid rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.news-freshness-badge.fresh {
    background: rgba(34, 211, 238, 0.8);
    color: #020617;
    border: 1px solid rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

@keyframes freshness-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ── Sentiment Pill ──────────────────────────────────── */
.news-sentiment-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1;
}

.news-sentiment-pill.sentiment-positive {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: #34d399;
}

.news-sentiment-pill.sentiment-negative {
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.25);
    color: #fb7185;
}

.news-sentiment-pill.sentiment-neutral {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.news-sentiment-arrow {
    flex-shrink: 0;
}

/* ── Score Pill ──────────────────────────────────────── */
.news-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.16rem 0.5rem;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #fbbf24;
    white-space: nowrap;
}

.news-score-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.08rem;
    line-height: 1;
}

.news-score-star {
    font-size: 0.62rem;
    line-height: 1;
}

.news-score-star.is-on {
    color: #fbbf24;
    opacity: 1;
}

.news-score-star.is-off {
    color: #64748b;
    opacity: 0.5;
}

.news-score-value {
    color: #fde68a;
    font-weight: 800;
}

/* ── Sentiment Gradient (Featured) ─────────────────── */
.news-sentiment-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    pointer-events: none;
    z-index: 1;
}

.news-sentiment-gradient.sentiment-positive {
    background: linear-gradient(to top, rgba(52, 211, 153, 0.08), transparent);
}

.news-sentiment-gradient.sentiment-negative {
    background: linear-gradient(to top, rgba(251, 113, 133, 0.08), transparent);
}

.news-sentiment-gradient.sentiment-neutral {
    background: none;
}

/* ── Source Favicon ─────────────────────────────────── */
.news-source-favicon {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
    opacity: 0.8;
}

.news-article-body {
    padding: 0.45rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.news-article-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: #f1f5f9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-article-desc {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #94a3b8;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-article-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    margin-top: auto;
    padding-top: 0.3rem;
    flex-wrap: wrap;
}

.news-article-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #475569;
}

/* ── Sentiment Colors ────────────────────────────────────── */
.sentiment-positive .news-sentiment-dot,
.sentiment-bullish .news-sentiment-dot {
    background: #34d399;
    color: #34d399;
}

.sentiment-positive .news-sentiment-badge,
.sentiment-bullish .news-sentiment-badge {
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #6ee7b7;
}

.sentiment-negative .news-sentiment-dot,
.sentiment-bearish .news-sentiment-dot {
    background: #fb7185;
    color: #fb7185;
}

.sentiment-negative .news-sentiment-badge,
.sentiment-bearish .news-sentiment-badge {
    background: rgba(251, 113, 133, 0.15);
    border: 1px solid rgba(251, 113, 133, 0.3);
    color: #fda4af;
}

.sentiment-neutral .news-sentiment-dot {
    background: #94a3b8;
    color: #94a3b8;
}

.sentiment-neutral .news-sentiment-badge {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
}

/* ── Read-Status ─────────────────────────────────────────── */
.news-article.is-read {
    position: relative;
}

.news-featured-card.is-read {
    position: relative;
}

.news-read-check {
    margin-left: auto;
    color: #34d399;
    font-size: 1rem;
    font-weight: 700;
}

/* ── Footer / Pagination ─────────────────────────────────── */
.news-paper-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.news-page-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.news-page-btn:hover:not(:disabled) {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(96, 165, 250, 0.1);
    color: #e2e8f0;
}

.news-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.news-page-indicator {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

/* ── New Articles Badge ──────────────────────────────────── */
.news-new-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
    animation: pulse-badge 2s infinite;
    z-index: 10;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* ── Homepage News Strip (horizontal layout) ─────────────── */

/* Container: horizontal grid on desktop, scroll on mobile */
.news-teaser-strip {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

/* Individual card in the strip */
.news-strip-card {
    border-radius: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
}

.news-strip-card:hover {
    border-color: rgba(96, 165, 250, 0.2);
    background: rgba(96, 165, 250, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.news-strip-card * {
    color: inherit;
    text-decoration: none !important;
}

/* Sentiment border colors */
.news-strip-card.sentiment-positive,
.news-strip-card.sentiment-bullish {
    border-left-color: #34d399;
}

.news-strip-card.sentiment-negative,
.news-strip-card.sentiment-bearish {
    border-left-color: #fb7185;
}

.news-strip-card.sentiment-neutral {
    border-left-color: #64748b;
}

/* Card image */
.news-strip-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
    position: relative;
}

.news-strip-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.news-strip-card:hover .news-strip-card-image img {
    transform: scale(1.05);
}

.news-strip-card-image .news-img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.3), rgba(30, 41, 59, 0.3));
}

/* Card body */
.news-strip-card-body {
    padding: 0.6rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* Featured card: larger title, show description */
.news-strip-featured .news-strip-card-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-strip-featured .news-strip-card-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.15rem;
}

/* Compact cards: smaller title, no description */
.news-strip-card-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-strip-card-desc {
    display: none;
}

/* Card meta */
.news-strip-card-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6rem;
    color: #94a3b8;
    margin-top: auto;
    padding-top: 0.25rem;
}

.news-strip-card-meta .news-sentiment-pill {
    padding: 0.1rem 0.3rem;
    font-size: 0;
    border-radius: 4px;
}

.news-strip-card-meta .news-sentiment-pill svg {
    width: 10px;
    height: 10px;
}

/* Global sentiment label styling */
.news-sentiment-label {
    font-weight: 700;
}

/* Spacing before time in meta */
.news-featured-meta .dot,
.news-article-meta .dot,
.news-strip-card-meta .dot {
    margin: 0 0.15rem;
}

.sentiment-positive .news-sentiment-label,
.sentiment-bullish .news-sentiment-label {
    color: #34d399;
}

.sentiment-negative .news-sentiment-label,
.sentiment-bearish .news-sentiment-label {
    color: #fb7185;
}

.sentiment-neutral .news-sentiment-label {
    color: #94a3b8;
}

.news-strip-card-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #475569;
    flex-shrink: 0;
}

/* Read status */
.news-strip-card.is-read {
    opacity: 0.55;
    filter: grayscale(0.3);
}

.news-open-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(96, 165, 250, 0.25);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(139, 92, 246, 0.08));
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-open-all-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(139, 92, 246, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-open-all-btn:hover {
    border-color: rgba(96, 165, 250, 0.5);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(139, 92, 246, 0.12));
    color: #bfdbfe;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.15);
    transform: translateY(-1px);
}

.news-open-all-btn:hover::before {
    opacity: 1;
}

.news-open-all-btn svg {
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.news-open-all-btn:hover svg {
    transform: rotateY(180deg);
}

.news-open-all-btn span {
    position: relative;
    z-index: 1;
}

/* ── Gazette Button ─────────────── */

/* ── Bento Grid (Page 1) ───────────────────────────── */
.news-grid-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

.news-grid-bento .news-article:first-child {
    grid-column: span 2;
}

.news-grid-bento .news-article:first-child .news-article-title {
    font-size: 1rem;
    -webkit-line-clamp: 3;
}

.news-grid-bento .news-article:first-child .news-article-desc {
    -webkit-line-clamp: 4;
}

/* ── Time Freshness Colors ─────────────────────────── */
.news-time-fresh {
    color: #22d3ee !important;
    font-weight: 600;
}

.news-time-recent {
    color: #94a3b8 !important;
}

.news-time-old {
    color: #475569 !important;
    font-style: italic;
}
/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1023px) {
    .news-paper {
        width: 95vw;
        height: 92vh;
        max-height: none;
        border-radius: 1rem;
    }

    .news-paper-masthead {
        font-size: 1.6rem;
    }

    .news-featured-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .news-featured-card {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 0;
        padding: 0;
        overflow: hidden;
    }

    .news-featured-image {
        width: 100%;
        height: auto;
        max-height: none;
        aspect-ratio: 16 / 9;
        border-radius: 0.875rem 0.875rem 0 0;
        border-width: 0 0 1px 0;
    }

    .news-featured-body {
        justify-content: flex-start;
        gap: 0.45rem;
        padding: 0.75rem 0.85rem 0.85rem;
    }

    .news-featured-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
    }

    .news-featured-desc {
        font-size: 0.82rem;
        line-height: 1.45;
        -webkit-line-clamp: 3;
    }

    .news-featured-cat-badge {
        margin-top: 0;
        margin-bottom: 0.1rem;
    }

    .news-featured-meta {
        flex-wrap: wrap;
        gap: 0.25rem 0.4rem;
        font-size: 0.7rem;
    }

    .news-skeleton-featured {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    .news-skeleton-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: 0.875rem 0.875rem 0 0;
    }

    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .news-grid-bento {
        grid-template-columns: repeat(3, 1fr);
    }

    .news-grid-bento .news-article:first-child {
        grid-column: span 2;
    }

    /* News strip: 2 columns on tablet */
    .news-teaser-strip {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 640px) and (max-width: 760px) {
    .news-featured-row {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .news-featured-card {
        grid-template-columns: minmax(150px, 36%) 1fr;
        gap: 0.85rem;
        padding: 0.75rem;
    }

    .news-featured-image {
        border-radius: 0.75rem;
        border-width: 1px;
        aspect-ratio: 1 / 1;
    }

    .news-featured-body {
        padding: 0;
    }

    .news-skeleton-featured-row {
        grid-template-columns: 1fr;
    }

    .news-skeleton-featured {
        grid-template-columns: minmax(150px, 36%) 1fr;
        gap: 0.85rem;
        padding: 0.75rem;
    }

    .news-skeleton-img {
        border-radius: 0.75rem;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 639px) {
    .news-paper {
        width: 100vw;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }

    .news-paper-header {
        padding: 1rem 1rem 0.5rem;
    }

    .news-paper-masthead {
        font-size: 1.3rem;
        letter-spacing: 0.1em;
    }

    .news-page {
        padding: 0.75rem;
    }

    .news-scroll-content {
        padding: 0.5rem 0.75rem;
    }

    .news-featured-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Featured cards: vertical stacking on mobile */
    .news-featured-card {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 0;
        overflow: hidden;
    }

    .news-featured-card--top {
        border-left-width: 4px;
        box-shadow:
            0 12px 30px rgba(0, 0, 0, 0.28),
            0 0 0 1px color-mix(in srgb, var(--cat-color, #60a5fa) 18%, transparent);
    }

    .news-top-story-badge {
        font-size: 1rem;
    }

    .news-featured-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 200px;
        border-radius: 0.875rem 0.875rem 0 0;
    }

    .news-featured-body {
        padding: 0.6rem 0.75rem 0.75rem;
        gap: 0.4rem;
    }

    .news-featured-title {
        font-size: 1rem;
        -webkit-line-clamp: 3;
    }

    .news-featured-desc {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
        line-height: 1.5;
    }

    .news-featured-meta {
        flex-wrap: wrap;
        gap: 0.25rem 0.4rem;
        font-size: 0.7rem;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid-bento .news-article:first-child {
        grid-column: span 1;
    }

    .news-article-title {
        font-size: 0.82rem;
    }

    .news-article-desc {
        font-size: 0.72rem;
        -webkit-line-clamp: 2;
    }

    .news-article-meta {
        font-size: 0.62rem;
        gap: 0.25rem;
    }

    .news-filter-bar {
        padding: 0.5rem 0.5rem;
        gap: 0.25rem;
        justify-content: center;
    }

    .news-filter-tab {
        padding: 0.35rem 0.55rem;
        font-size: 0.72rem;
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
    }

    .news-filter-label {
        display: none;
    }

    .news-skeleton-featured-row {
        grid-template-columns: 1fr;
    }

    .news-skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Skeleton: match vertical layout */
    .news-skeleton-featured {
        grid-template-columns: 1fr;
    }

    .news-skeleton-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    /* News strip: horizontal scroll on mobile */
    .news-teaser-strip {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
        gap: 0.5rem;
    }

    .news-teaser-strip::-webkit-scrollbar {
        display: none;
    }

    .news-strip-card {
        flex: 0 0 82vw;
        scroll-snap-align: start;
    }

    .news-strip-featured {
        flex: 0 0 85vw;
    }

    .news-strip-featured .news-strip-card-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ── Extra small screens (≤ 479px) ───────────────────────── */
@media (max-width: 479px) {
    .news-page {
        padding: 0.5rem;
    }

    .news-scroll-content {
        padding: 0.5rem;
    }

    /* Grid: single column with horizontal card layout */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .news-grid-bento {
        grid-template-columns: 1fr;
    }

    .news-article {
        flex-direction: column;
        align-items: stretch;
    }

    .news-article-image {
        width: 100%;
        min-width: unset;
        aspect-ratio: 16 / 9;
        border-radius: 0.875rem 0.875rem 0 0;
        flex-shrink: 0;
        max-height: 180px;
    }

    .news-article-body {
        padding: 0.5rem 0.65rem 0.6rem;
        justify-content: flex-start;
        gap: 0.25rem;
    }

    .news-article-title {
        font-size: 0.88rem;
        -webkit-line-clamp: 2;
        font-weight: 700;
    }

    .news-article-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.75rem;
        color: #94a3b8;
        line-height: 1.4;
    }

    .news-article-meta {
        font-size: 0.65rem;
        gap: 0.25rem 0.35rem;
        padding-top: 0.2rem;
        flex-wrap: wrap;
    }

    .news-section-divider {
        margin: 0.8rem 0 0.4rem;
        font-size: 0.72rem;
    }

    .news-skeleton-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   INLINE MODE – Dedicated /news page (no modal overlay)
   ============================================================ */
.news-paper--inline {
    position: relative;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    min-height: calc(100vh - 5rem);
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #020617;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
}

.news-paper--inline .news-close-btn {
    display: none;
}

/* Scrollable pages area fills available space */
.news-paper--inline .news-pages-wrapper {
    flex: 1 1 auto;
    min-height: 60vh;
    overflow: visible;
    perspective: none;
}

/* Scroll content container */
.news-scroll-content {
    padding: 0.75rem 2rem;
}

/* In inline mode, no page-based layout needed */
.news-paper--inline .news-page {
    display: none;
}

.news-paper--inline .news-paper-header {
    padding-top: 1.25rem;
}

.news-paper--inline .news-paper-footer {
    padding: 0.75rem 1.75rem;
}

@media (max-width: 640px) {
    html.page--news #news_main_page {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding-top: 0;
    }

    html.page--news #news-inline-gazette {
        min-height: calc(100vh - var(--shared-mobile-topbar-height, 3rem)) !important;
        min-height: calc(100dvh - var(--shared-mobile-topbar-height, 3rem)) !important;
    }

    html.page--news .news-filter-bar {
        top: var(--shared-mobile-topbar-height, 3rem);
    }
}

@media (min-width: 1400px) {
    .news-scroll-content {
        padding: 1rem 3rem;
    }
    .news-paper--inline .news-featured-title {
        font-size: 1rem;
    }
}

@media (min-width: 1800px) {
    .news-scroll-content {
        padding: 1rem 4.5rem;
    }
    .news-paper--inline .news-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .news-paper--inline .news-grid-bento {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.news-skeleton-section {
    margin-bottom: 1.5rem;
}

.news-skeleton-divider {
    height: 28px;
    width: 180px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    margin-bottom: 0.7rem;
}

.news-skeleton-featured-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.news-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

.news-skeleton-card {
    border-radius: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.015);
    overflow: hidden;
}

.news-skeleton-featured {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 0.75rem;
}

.news-skeleton-img {
    width: 200px;
    height: 200px;
    border-radius: 0.75rem;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.news-skeleton-img-sm {
    width: 100%;
    aspect-ratio: 16/8;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.news-skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    justify-content: center;
}

.news-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.news-skeleton-line.w80 { width: 80%; }
.news-skeleton-line.w60 { width: 60%; }
.news-skeleton-line.w50 { width: 50%; }
.news-skeleton-line.w40 { width: 40%; }

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */
html.theme-light .news-paper {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.96) 100%);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html.theme-light .news-paper--inline {
    background: var(--theme-bg, #f1f5f9);
}

html.theme-light .news-paper-masthead {
    color: #0f172a;
}

html.theme-light .news-paper-subtitle {
    color: #475569;
}

html.theme-light .news-paper-subtitle .separator {
    background: #cbd5e1;
}

html.theme-light .news-close-btn {
    border-color: rgba(15, 23, 42, 0.1);
    background: rgba(15, 23, 42, 0.04);
    color: #64748b;
}

html.theme-light .news-close-btn:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
}

html.theme-light .news-rule {
    border-top-color: rgba(15, 23, 42, 0.1);
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

html.theme-light .news-rule.thin {
    border-top-color: rgba(15, 23, 42, 0.08);
}

html.theme-light .news-filter-bar {
    background: rgba(248, 250, 252, 0.95);
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

html.theme-light .news-filter-bar.is-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

html.theme-light .news-filter-tab {
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.8);
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html.theme-light .news-filter-tab:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.95);
    border-color: color-mix(in srgb, var(--cat-color, #3b82f6) 40%, transparent);
}

html.theme-light .news-filter-count {
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
}

html.theme-light .news-filter-tab.active {
    background: color-mix(in srgb, var(--cat-color, #3b82f6) 12%, #ffffff);
    border-color: color-mix(in srgb, var(--cat-color, #3b82f6) 50%, transparent);
    color: color-mix(in srgb, var(--cat-color, #3b82f6) 85%, #0f172a);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--cat-color, #3b82f6) 15%, transparent);
}

html.theme-light .news-filter-tab.active .news-filter-count {
    background: color-mix(in srgb, var(--cat-color, #3b82f6) 12%, #ffffff);
    color: color-mix(in srgb, var(--cat-color, #3b82f6) 85%, #0f172a);
}

html.theme-light .news-featured-card {
    border-color: rgba(15, 23, 42, 0.08);
    border-left-color: var(--cat-color, #60a5fa);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html.theme-light .news-featured-card--top {
    border-left-width: 4px;
}

html.theme-light .news-featured-card:hover {
    border-left-color: var(--cat-color, #60a5fa);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
                0 0 0 1px color-mix(in srgb, var(--cat-color, #3b82f6) 15%, transparent);
}

html.theme-light .news-featured-card,
html.theme-light .news-featured-card:hover,
html.theme-light .news-featured-card:visited,
html.theme-light .news-featured-card:active,
html.theme-light .news-featured-card:link {
    color: #1e293b;
}

html.theme-light .news-featured-card .news-featured-title,
html.theme-light .news-featured-card:hover .news-featured-title,
html.theme-light .news-featured-card:visited .news-featured-title,
html.theme-light .news-featured-card:link .news-featured-title {
    color: #0f172a !important;
}

html.theme-light .news-featured-card .news-featured-desc,
html.theme-light .news-featured-card:hover .news-featured-desc {
    color: #475569 !important;
}

html.theme-light .news-featured-image .news-img-fallback {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.8), rgba(226, 232, 240, 0.8));
    color: rgba(15, 23, 42, 0.1);
}

html.theme-light .news-article-image .news-img-fallback {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.6), rgba(226, 232, 240, 0.6));
    color: rgba(15, 23, 42, 0.08);
}

html.theme-light .news-featured-title {
    color: #0f172a;
}

html.theme-light .news-featured-desc {
    color: #475569;
}

html.theme-light .news-featured-meta {
    color: #64748b;
}

html.theme-light .news-featured-meta .dot {
    background: #cbd5e1;
}

html.theme-light .news-section-divider {
    color: #0f172a;
    font-weight: 700;
}

html.theme-light .news-section-divider::before,
html.theme-light .news-section-divider::after {
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.1), transparent);
}

html.theme-light .news-article {
    border-color: rgba(15, 23, 42, 0.08);
    border-left-color: var(--cat-color, #60a5fa);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html.theme-light .news-article:hover {
    border-left-color: var(--cat-color, #60a5fa);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
                0 0 0 1px color-mix(in srgb, var(--cat-color, #60a5fa) 15%, transparent);
}

html.theme-light .news-article,
html.theme-light .news-article:hover,
html.theme-light .news-article:visited,
html.theme-light .news-article:active,
html.theme-light .news-article:link {
    color: #1e293b;
}

html.theme-light .news-article .news-article-title,
html.theme-light .news-article:hover .news-article-title,
html.theme-light .news-article:visited .news-article-title,
html.theme-light .news-article:link .news-article-title {
    color: #0f172a !important;
}

html.theme-light .news-article-image {
    background: rgba(241, 245, 249, 0.5);
}

html.theme-light .news-article-title {
    color: #0f172a;
}

html.theme-light .news-article-desc {
    color: #475569;
}

html.theme-light .news-article-meta {
    color: #64748b;
}

html.theme-light .news-article-meta .dot {
    background: #cbd5e1;
}

html.theme-light .news-sentiment-pill.sentiment-neutral {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.1);
    color: #64748b;
}

html.theme-light .sentiment-neutral .news-sentiment-dot {
    background: #94a3b8;
    color: #94a3b8;
}

html.theme-light .sentiment-neutral .news-sentiment-badge {
    color: #64748b;
}

html.theme-light .news-score-star.is-off {
    color: #cbd5e1;
}

html.theme-light .news-score-pill {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(217, 119, 6, 0.32);
    color: #b45309;
}

html.theme-light .news-score-star.is-on {
    color: #d97706;
    opacity: 1;
}

html.theme-light .news-score-star.is-off {
    color: #94a3b8;
    opacity: 0.85;
}

html.theme-light .news-score-value {
    color: #92400e;
}

html.theme-light .news-page-btn {
    color: #64748b;
}

html.theme-light .news-page-btn:hover {
    color: #0f172a;
}

html.theme-light .news-page-indicator {
    color: #94a3b8;
}

/* ── News strip cards (light) ─────  */
html.theme-light .news-strip-card {
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html.theme-light .news-strip-card:hover {
    background: rgba(255, 255, 255, 0.95);
}

html.theme-light .news-strip-card.sentiment-positive,
html.theme-light .news-strip-card.sentiment-bullish {
    border-left-color: #34d399;
}

html.theme-light .news-strip-card.sentiment-negative,
html.theme-light .news-strip-card.sentiment-bearish {
    border-left-color: #fb7185;
}

html.theme-light .news-strip-card.sentiment-neutral {
    border-left-color: #64748b;
}

html.theme-light .news-strip-card-image .news-img-fallback {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.5), rgba(226, 232, 240, 0.5));
}

html.theme-light .news-strip-featured .news-strip-card-title {
    color: #0f172a;
}

html.theme-light .news-strip-featured .news-strip-card-desc {
    color: #475569;
}

html.theme-light .news-strip-card-title {
    color: #0f172a;
}

html.theme-light .news-strip-card-meta {
    color: #64748b;
}

html.theme-light .news-strip-card-meta .dot {
    background: #cbd5e1;
}

html.theme-light .news-time-recent {
    color: #475569 !important;
}

html.theme-light .news-time-old {
    color: #94a3b8 !important;
}

/* Skeleton loading (light) */
html.theme-light .news-skeleton-card {
    border-color: rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.5);
}

html.theme-light .news-skeleton-divider,
html.theme-light .news-skeleton-img,
html.theme-light .news-skeleton-img-sm,
html.theme-light .news-skeleton-line {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.04) 25%, rgba(15, 23, 42, 0.08) 50%, rgba(15, 23, 42, 0.04) 75%);
    background-size: 200% 100%;
}

/* Scrollbar (light) */
html.theme-light .news-page::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
}
