/* ============================================================
   theAIcatchup — Premium AI News Site
   Dark Mode · Glassmorphism · Vibrant Accents · Breaking Ticker
   ============================================================ */

/* ---------- Design Tokens (Apple HIG Style) ---------- */
:root {
    /* Colors — Fresh & Elegant Light Palette */
    --bg-primary: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F9FA;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-elevated: #F1F3F5;

    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #475569;

    /* Elegant Accents */
    --accent-primary: #2563EB;
    /* Clean Royal Blue */
    --accent-secondary: #1E40AF;
    /* Deep Blue */
    --accent-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
    /* Sleek Blue Gradient */
    --accent-glow: rgba(37, 99, 235, 0.1);
    --accent-cyan: #0891B2;
    --accent-pink: #E11D48;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);

    /* Typography — Editorial Brand */
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: "Playfair Display", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Georgia, serif;

    /* Spacing */
    --container-max: 1200px;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius — Apple Continuous Corners / Squircles */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Legacy theme blocks removed — all themes defined in SITE FACTORY THEMES section below */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base Buttons (Apple Style tap effect) */
button,
.btn {
    transition: all var(--transition-base);
}

button:active,
.btn:active,
.poll-btn:active,
.banner-btn:active {
    transform: scale(0.97) !important;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Elegant Selection (Apple Style) */
::selection {
    background: rgba(10, 132, 255, 0.4);
    color: #fff;
}

/* Custom Premium Scrollbar */
/* Typography Refinements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    /* Apple SF Pro Display tracking */
    font-weight: 700;
}

/* Dynamic Premium Background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(8, 145, 178, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(225, 29, 72, 0.02) 0%, transparent 50%);
    filter: blur(80px);
    animation: auth-gradient-shift 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes auth-gradient-shift {
    0% {
        transform: scale(1) translate(0px, 0px);
    }

    50% {
        transform: scale(1.1) translate(2%, 2%);
    }

    100% {
        transform: scale(1) translate(-2%, -2%);
    }
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

code {
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
    color: var(--accent-cyan);
}

/* ---------- Container ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

/* ---------- Breaking News Ticker ---------- */
.ticker-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: hidden;
    position: relative;
    width: 100%;
    margin-top: 70px; /* Offset for fixed navbar */
}

.ticker-container {
    display: flex;
    align-items: center;
    height: 42px;
    gap: var(--space-md);
    overflow: hidden;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent-primary);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
}

.ticker-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse-dot 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.ticker-track {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.ticker-scroll {
    display: flex;
    gap: var(--space-xl);
    animation: ticker-slide 40s linear infinite;
    white-space: nowrap;
    width: max-content;
}

.ticker-scroll:hover {
    animation-play-state: paused;
}

@keyframes ticker-slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    flex-shrink: 0;
    padding: 0 var(--space-md);
}

.ticker-item:hover {
    color: var(--text-primary);
}

.ticker-dot {
    color: var(--accent-primary);
    font-size: 0.6rem;
}

.navbar {
    position: fixed; /* Changed from sticky to fixed for smoother performance */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9); /* Stable, elegant glass background */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* Subtle border for separation */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Constant shadow for depth */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.logo-text, .nav-link {
    color: var(--text-primary) !important;
}

.nav-link:hover {
    color: var(--accent-primary) !important;
}

.navbar::after {
    display: none;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    overflow: visible;
    flex: 1;
    margin: 0 var(--space-sm);
    justify-content: flex-start;
}

/* --- Nav "More" Dropdown --- */
.nav-dropdown {
    position: relative;
}

.nav-more-btn {
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-body);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    padding: var(--space-xs) 0;
    z-index: 100;
}

.nav-dropdown-menu.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-link {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.nav-dropdown-link:hover,
.nav-dropdown-link.active {
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.06);
}

/* --- Sticky Sidebar Ad --- */
.sticky-sidebar {
    position: sticky;
    top: 90px;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.95rem; /* Better readability */
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(10, 132, 255, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* Search */
.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0 var(--space-md);
    transition: all var(--transition-fast);
}

.search-form:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 8px 0;
    width: 180px;
    font-family: var(--font-body);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color var(--transition-fast);
}

.search-btn:hover {
    color: var(--accent-primary);
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ---------- Hero ---------- */
.hero-section {
    margin: var(--space-xl) 0 var(--space-2xl);
}

.hero-card {
    display: block;
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hero-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-slow);
}

.hero-card:hover .hero-image {
    transform: scale(1.03);
}

.hero-gradient {
    background: var(--accent-gradient);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            transparent 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-2xl) var(--space-xl);
    z-index: 2;
    color: #FFFFFF; /* Ensure text visible against dark image overlay */
}

/* Because elegant light mode makes hero meta dark by default, we force it white over images */
.hero-meta, .hero-excerpt {
    color: rgba(255, 255, 255, 0.9);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-2xl) var(--space-xl);
    z-index: 2;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: var(--space-md) 0;
    max-width: 700px;
}

.hero-excerpt {
    font-size: 1.05rem;
    max-width: 600px;
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    font-size: 0.875rem;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--badge-color, var(--accent-primary));
}

.badge-sm {
    padding: 2px 8px;
    font-size: 0.7rem;
}

/* ---------- Content Grid ---------- */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-2xl);
    align-items: start;
}

/* ---------- Section Header ---------- */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-color), transparent);
}

/* ---------- Article Grid ---------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.articles-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ---------- Article Card ---------- */
.article-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all var(--transition-base);
    position: relative;
}

.article-card::before {
    display: none;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.06);
    border-color: rgba(37, 99, 235, 0.3);
}

.article-card:hover::before {
    opacity: 0.03;
}

.card-link {
    display: block;
    position: relative;
    z-index: 1;
}

.card-image {
    width: 100%;
    height: 190px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .card-image img {
    transform: scale(1.06);
}

.card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0F172A; /* Deep Space */
    position: relative;
    overflow: hidden;
}

.ai-wave-placeholder {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.ai-wave-placeholder::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, rgba(37, 99, 235, 0.2), transparent 40%);
    animation: placeholder-rotate 10s linear infinite;
}

@keyframes placeholder-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.placeholder-icon {
    font-size: 2.5rem;
    font-weight: 800;
    color: #FFFFFF;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.8);
    opacity: 0.9;
}

.card-body {
    padding: var(--space-lg);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    margin: var(--space-sm) 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

/* Trending */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.trending-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.trending-item:hover {
    background: var(--bg-elevated);
    transform: translateX(4px);
}

.trending-rank {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trending-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Categories sidebar */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: 2px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--badge-color, var(--accent-primary));
    transition: all var(--transition-fast);
}

.category-chip:hover {
    background: var(--bg-elevated);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.category-count {
    background: var(--bg-elevated);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Newsletter */
.newsletter-box {
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    position: relative;
    overflow: hidden;
}

.newsletter-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0.05;
}

.newsletter-box p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
    position: relative;
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    position: relative;
}

.newsletter-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition-fast);
}

.newsletter-input:focus {
    border-color: var(--accent-primary);
}

.newsletter-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.newsletter-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ---------- Empty State ---------- */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.empty-state h3 {
    font-family: var(--font-heading);
    margin-bottom: var(--space-sm);
}

.empty-state p {
    color: var(--text-secondary);
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
    padding: var(--space-lg) 0;
}

.page-btn {
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.page-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
}

.page-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---------- Article Detail Page ---------- */
.article-page {
    padding: var(--space-xl) 0 var(--space-3xl);
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--space-2xl);
    align-items: start;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.breadcrumb a:hover {
    color: var(--accent-primary);
}

.breadcrumb-sep {
    opacity: 0.4;
}

.breadcrumb-current {
    color: var(--text-secondary);
}

/* Article Header */
.article-header {
    margin-bottom: var(--space-xl);
}

.article-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    margin: var(--space-md) 0;
}

.article-excerpt {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    font-family: 'Merriweather', serif;
    font-style: italic;
    opacity: 0.9;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Hero Image */
.article-hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.article-hero-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

/* Article Body */
.article-body {
    font-family: 'Merriweather', var(--font-body);
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 720px; /* Optimal reading line length */
}

.article-body p {
    margin-bottom: var(--space-lg);
}

.article-body h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem; /* Larger headers */
    font-weight: 700;
    margin: var(--space-3xl) 0 var(--space-md);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.article-body h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin: var(--space-xl) 0 var(--space-md);
}

.article-body blockquote {
    border-left: 4px solid var(--accent-primary);
    padding: var(--space-md) var(--space-xl);
    margin: var(--space-2xl) 0;
    background: var(--bg-elevated);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: var(--text-secondary);
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.6;
}

.article-body ul,
.article-body ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.article-body li {
    margin-bottom: var(--space-sm);
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: all var(--transition-fast);
}

.article-body a:hover {
    color: var(--accent-secondary);
    text-decoration-color: var(--accent-secondary);
    text-decoration-thickness: 2px;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-xl) 0;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.tag-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--accent-primary);
    transition: all var(--transition-fast);
}

.tag-chip:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

/* Share Section */
.share-section {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.share-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.share-buttons {
    display: flex;
    gap: var(--space-md);
}

.share-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.share-linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
}

.share-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.share-copy:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Source Attribution */
.source-attribution {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: var(--space-lg);
}

.source-attribution a {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Sticky sidebar for article */
.sticky-sidebar {
    position: sticky;
    top: 90px;
}

/* Article ad */
.article-ad {
    margin: var(--space-xl) 0;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    text-align: center;
}

/* ---------- Page Header (Category, Tag, Search) ---------- */
.page-section {
    padding: var(--space-xl) 0 var(--space-3xl);
}

.page-header {
    margin-bottom: var(--space-2xl);
}

.page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.5rem;
    background: color-mix(in srgb, var(--badge-color) 15%, transparent);
    margin-bottom: var(--space-md);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
}

.page-description {
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

/* Search Page */
.search-page-form {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
}

.search-page-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-page-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-page-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-page-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ---------- Related Section ---------- */
.related-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--border-color);
}

/* ---------- Footer ---------- */
.footer {
    margin-top: var(--space-3xl);
    padding: var(--space-3xl) 0 var(--space-lg);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0.2;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}
.footer-grid > * {
    min-width: 0;
}
.footer-brand {
    max-width: 400px;
}
.footer-links {
    min-width: 120px;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-top: var(--space-sm);
    font-size: 0.9rem;
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

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

    .nav-links {
        display: none;
    }

    .gamification-widgets {
        gap: 0.25rem;
        margin-right: 0.5rem;
    }

    .neural-sync-badge {
        display: none;
        /* Hide on small mobile to save space, but keep streak and hacker mode */
    }

    .hacker-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .daily-streak-badge {
        padding: 0.15rem 0.5rem;
        font-size: 0.75rem;
    }

    .nav-links.active {
        display: flex;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-lg);
        gap: var(--space-xs);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.active .nav-link {
        font-size: 1rem;
        padding: var(--space-md);
        color: var(--text-primary);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .search-form {
        display: none;
    }

    .ticker-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 768px) {
    .hero-card {
        min-height: 320px;
    }

    .hero-content {
        padding: var(--space-lg);
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .article-meta-bar {
        gap: var(--space-md);
    }

    .search-page-form {
        flex-direction: column;
    }

    .ticker-container {
        height: 36px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-card {
        min-height: 280px;
    }

    .hero-content {
        padding: var(--space-md);
    }

    .hero-title {
        font-size: 1.25rem;
        margin: var(--space-sm) 0;
    }

    .card-image {
        height: 160px;
    }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.5s ease both;
}

.article-card:nth-child(1) {
    animation-delay: 0ms;
}

.article-card:nth-child(2) {
    animation-delay: 60ms;
}

.article-card:nth-child(3) {
    animation-delay: 120ms;
}

.article-card:nth-child(4) {
    animation-delay: 180ms;
}

.article-card:nth-child(5) {
    animation-delay: 240ms;
}

.article-card:nth-child(6) {
    animation-delay: 300ms;
}

.article-card:nth-child(7) {
    animation-delay: 360ms;
}

.article-card:nth-child(8) {
    animation-delay: 420ms;
}

.article-card:nth-child(9) {
    animation-delay: 480ms;
}

.hero-section {
    animation: fadeInUp 0.6s ease both;
}

.sidebar-section {
    animation: fadeInUp 0.5s ease both;
    animation-delay: 200ms;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* ---------- Selection ---------- */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* ---------- Key Takeaways Box ---------- */
.key-takeaways {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.key-takeaways h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--accent-primary);
}

.key-takeaways ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-takeaways li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.key-takeaways li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

/* ---------- Author Card ---------- */
.author-card {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.author-info .author-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.author-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.15rem 0 0.25rem;
    color: var(--text-primary);
}

.author-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Author mini avatar in meta bar */
.author-meta {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
}

.author-mini-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    background: var(--bg-secondary);
}

/* ---------- Newsletter Popup ---------- */
.newsletter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.newsletter-overlay.visible {
    display: flex;
}

.newsletter-popup {
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.popup-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.popup-close:hover {
    color: var(--text-primary);
}

.popup-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.newsletter-popup h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.newsletter-popup>p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.popup-form {
    display: flex;
    gap: 0.5rem;
}

.popup-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.popup-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.popup-form button {
    padding: 0.75rem 1.25rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.popup-form button:hover {
    opacity: 0.9;
}

.popup-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* ---------- About Page ---------- */
.page-section {
    padding: 3rem 0;
}

.page-header {
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.about-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.team-member {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.3s;
}

.team-member:hover {
    border-color: var(--accent-primary);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    margin-bottom: 1rem;
    background: var(--bg-secondary);
}

.team-member h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.team-role {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
}

.team-member p:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---------- Legal Pages ---------- */
.legal-content {
    max-width: 720px;
}

.legal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--text-primary);
}

.legal-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.legal-content ul {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

/* ---------- Reading Progress Bar ---------- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ---------- Table of Contents ---------- */
.article-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 12px 12px 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.article-toc h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.article-toc ol {
    list-style: decimal;
    padding-left: 1.25rem;
    margin: 0;
}

.article-toc li {
    margin-bottom: 0.4rem;
}

.article-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.article-toc a:hover {
    color: var(--accent-primary);
}

/* ---------- Inline Subscribe Banner ---------- */
.inline-subscribe-banner {
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.inline-subscribe-banner::before {
    display: none;
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.banner-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.banner-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.banner-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.banner-form {
    display: flex;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto 1rem;
}

.banner-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.banner-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.banner-btn {
    padding: 1rem 2rem;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.2);
}

.banner-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.banner-disclaimer {
    font-size: 0.875rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 0 !important;
}

@media (max-width: 640px) {
    .banner-form {
        flex-direction: column;
    }

    .banner-content h2 {
        font-size: 1.75rem;
    }

    .banner-input,
    .banner-btn {
        width: 100%;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RICH AI METADATA (Impact & Sentiment)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.impact-meter {
    margin-top: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.impact-bar-bg {
    flex: 1;
    height: 4px;
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
}

.impact-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563EB 0%, #06b6d4 100%);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.sentiment-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.sentiment-BULLISH {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.sentiment-BEARISH {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.sentiment-OBJECTIVE {
    background: #6366f1;
    box-shadow: 0 0 8px #6366f1;
}

.sentiment-WARNING {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.category-chip.active {
    box-shadow: 0 0 15px var(--badge-color);
    border: 1px solid var(--badge-color);
}

.category-chip:not(.has-count) {
    opacity: 0.4;
    filter: grayscale(1);
}

/* ---------- Phase 9: Sentiment & Impact Badges ---------- */
.sentiment-badge {
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.sentiment-badge[data-sentiment="BULLISH"] {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #10b981 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.sentiment-badge[data-sentiment="BEARISH"] {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.sentiment-badge[data-sentiment="WARNING"] {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #f59e0b !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.sentiment-badge[data-sentiment="OBJECTIVE"] {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.5);
    color: #8b5cf6 !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.impact-badge {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff !important;
    border: none;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

/* ---------- Phase 9: Jargon Buster ---------- */
.jargon-term {
    border-bottom: 2px dotted var(--accent-primary);
    cursor: help;
    transition: all 0.2s ease;
    color: var(--accent-light);
}

.jargon-term:hover {
    background: rgba(56, 189, 248, 0.1);
    border-bottom-style: solid;
}

.jargon-tooltip {
    position: absolute;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 300px;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.15);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.jargon-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Phase 9: Executive Summary Toggle ---------- */
.view-toggle-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: fit-content;
}

.view-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(139, 92, 246, 0.2));
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.executive-summary-view {
    animation: fadeIn 0.4s ease forwards;
    padding: 2rem;
    background: rgba(16, 185, 129, 0.05);
    border-left: 4px solid #10b981;
    border-radius: 0 1rem 1rem 0;
    margin-bottom: 3rem;
}

.executive-summary-view h2 {
    color: #10b981;
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.tldr-list {
    list-style: none;
    padding: 0;
}

.tldr-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.tldr-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Phase 10: "Fun" Gamification & Hacker Mode ---------- */

.gamification-widgets {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 1.5rem;
}

.hacker-btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hacker-btn:hover {
    background: #10b981;
    color: #0f172a;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.neural-sync-badge {
    display: flex;
    align-items: center;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 100px;
    padding: 0.25rem 0.75rem 0.25rem 0.5rem;
    gap: 0.5rem;
    position: relative;
    cursor: default;
}

.daily-streak-badge {
    display: flex;
    align-items: center;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 100px;
    padding: 0.25rem 0.75rem 0.25rem 0.5rem;
    gap: 0.5rem;
    cursor: default;
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.streak-icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
}

#streakCount {
    letter-spacing: 0.05em;
}

#neuralLevel {
    color: #a78bfa;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.xp-bar-bg {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    width: 0%;
    /* Dynamic via JS */
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transition: width 0.5s ease;
    box-shadow: 0 0 5px #ec4899;
}

/* Hacker Mode Body Override */
body.hacker-mode {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --text-primary: #00ff41;
    --text-secondary: #008f11;
    --text-muted: #003b00;
    --accent-primary: #00ff41;
    --accent-secondary: #008f11;
    font-family: 'Courier New', Courier, monospace;
}

body.hacker-mode * {
    font-family: inherit !important;
}

body.hacker-mode::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 255, 0, 0.05) 50%) 0 0 / 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.8;
}

body.hacker-mode img,
body.hacker-mode .article-hero-image {
    filter: sepia(100%) hue-rotate(90deg) saturate(300%) contrast(150%);
}

.level-up-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.4);
    z-index: 10000;
    font-weight: 800;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.level-up-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ---------- Phase 11: Community Sentiment Interactive Poll ---------- */

.sentiment-poll-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.poll-title {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.poll-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.poll-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.poll-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
    max-width: 200px;
}

.poll-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-primary);
}

.poll-btn[data-vote="bullish"]:hover {
    border-color: #10b981;
    color: #10b981;
}

.poll-btn[data-vote="bearish"]:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.poll-btn[data-vote="unsure"]:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.poll-results {
    animation: fadeIn 0.4s ease forwards;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.results-title {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    text-align: center;
}

.result-bar-wrapper {
    margin-bottom: 1.25rem;
}

.result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-bar-bg {
    background: rgba(0, 0, 0, 0.3);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.result-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bullish-fill {
    background: linear-gradient(90deg, #059669, #10b981);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.bearish-fill {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.unsure-fill {
    background: linear-gradient(90deg, #7c3aed, #8b5cf6);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* ---------- Social Proof Stats Bar ---------- */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.stat-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.stat-item strong {
    color: var(--text-primary);
    font-weight: 700;
}

@media (max-width: 640px) {
    .stats-bar {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
        padding: var(--space-md);
    }
}

/* ---------- Inline Mini Newsletter ---------- */
.inline-subscribe-mini {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(8, 145, 178, 0.04));
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
}

.mini-sub-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.mini-sub-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mini-sub-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.mini-sub-form {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.mini-sub-form .newsletter-input {
    width: 200px;
    padding: 8px 14px;
    font-size: 0.85rem;
}

.mini-sub-form .newsletter-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .inline-subscribe-mini {
        flex-direction: column;
        text-align: center;
        padding: var(--space-lg);
    }
    .mini-sub-content {
        flex-direction: column;
    }
    .mini-sub-form .newsletter-input {
        width: 100%;
    }
}

/* ---------- Article-Bottom Conversion Funnel ---------- */
.article-conversion-funnel {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(8, 145, 178, 0.03));
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-xl);
    text-align: center;
}

.funnel-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.funnel-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 0.95rem;
}

/* ---------- Weekly Roundup Section (Item 4.8) ---------- */
.weekly-roundup-section {
    margin: var(--space-2xl) 0;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
}

.weekly-roundup-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.roundup-item {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    transition: all var(--transition-base);
    text-decoration: none;
}

.roundup-item:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

.roundup-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.roundup-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.roundup-body {
    flex: 1;
    min-width: 0;
}

.roundup-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 4px 0;
}

.roundup-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    flex-wrap: wrap;
}

.impact-chip {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(8, 145, 178, 0.1));
    color: var(--accent-primary);
    padding: 1px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.72rem;
}

/* ---------- AI Tools Nav Link (Item 9.9) ---------- */
.nav-tools-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(8,145,178,0.1));
    border: 1px solid rgba(37,99,235,0.2);
    color: var(--accent-primary);
    transition: all var(--transition-fast);
    text-decoration: none;
    flex-shrink: 0;
}

.nav-tools-link:hover {
    background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(8,145,178,0.18));
    border-color: rgba(37,99,235,0.4);
    transform: translateY(-1px);
    color: var(--accent-primary) !important;
}

/* ---------- /tools/ Directory Page ---------- */
.tools-hero {
    text-align: center;
    padding: var(--space-3xl) 0 var(--space-2xl);
}

.tools-hero-badge {
    display: inline-block;
    padding: 4px 16px;
    background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(8,145,178,0.1));
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.03em;
}

.tools-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tools-hero-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto var(--space-md);
    line-height: 1.65;
}

.tools-hero-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.tools-section {
    margin-bottom: var(--space-3xl);
}

/* Featured grid (2 or 3 col) */
.tools-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* Standard grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-lg);
}

/* Tool Card */
.tool-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
    transform-origin: left;
}

.tool-card:hover {
    border-color: rgba(37,99,235,0.3);
    box-shadow: 0 12px 28px rgba(0,0,0,0.07);
    transform: translateY(-3px);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card-featured {
    border-color: rgba(37,99,235,0.25);
    box-shadow: 0 4px 16px rgba(37,99,235,0.08);
}

.tool-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.tool-logo {
    height: 36px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    border-radius: 6px;
}

.tool-logo-placeholder {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.tool-meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.featured-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 0.03em;
}

.commission-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(16,185,129,0.1);
    color: #10b981;
    border-radius: 12px;
    white-space: nowrap;
}

.tool-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tool-tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.tool-description {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-cta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-md);
}

.tool-cta-btn {
    display: inline-block;
    padding: 7px 16px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: opacity var(--transition-fast);
    text-decoration: none;
}

.tool-cta-btn:hover {
    opacity: 0.88;
}

.tool-cta-sm {
    margin-top: auto;
    font-size: 0.78rem;
    padding: 5px 13px;
}

.tool-affiliate-note {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.tools-empty {
    text-align: center;
    padding: var(--space-3xl) 0;
}

.tools-empty-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.tools-disclosure {
    margin: var(--space-3xl) 0 var(--space-2xl);
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-left: 3px solid var(--border-color);
}

/* ---------- /advertise/ Page ---------- */
.advertise-hero {
    text-align: center;
    padding: var(--space-3xl) 0 var(--space-2xl);
}

.adv-hero-badge {
    display: inline-block;
    padding: 4px 16px;
    background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(8,145,178,0.1));
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
}

.adv-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
}

.adv-hero-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto var(--space-xl);
    line-height: 1.65;
}

.adv-cta-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 28px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

.adv-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.4);
}

.adv-cta-btn-lg {
    font-size: 1.05rem;
    padding: 14px 36px;
}

.adv-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-2xl) 0 var(--space-3xl);
}

.adv-stat {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.adv-stat-num {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.adv-stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.adv-section {
    margin-bottom: var(--space-3xl);
}

.adv-audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.adv-audience-card {
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.adv-audience-icon {
    font-size: 1.8rem;
    margin-bottom: var(--space-md);
}

.adv-audience-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.adv-audience-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.adv-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.adv-package {
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    position: relative;
}

.adv-package-featured {
    border-color: rgba(37,99,235,0.3);
    box-shadow: 0 8px 24px rgba(37,99,235,0.1);
}

.adv-pkg-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 12px;
    white-space: nowrap;
}

.adv-pkg-icon { font-size: 1.8rem; margin-bottom: var(--space-md); }

.adv-pkg-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.adv-pkg-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: var(--space-lg);
}

.adv-pkg-price {
    margin-bottom: var(--space-md);
}

.adv-price-range {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: -0.02em;
}

.adv-price-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.adv-pkg-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.adv-contact-section {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    background: linear-gradient(135deg, rgba(37,99,235,0.03), rgba(8,145,178,0.03));
    border: 1px solid rgba(37,99,235,0.1);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-3xl);
}

.adv-contact-section h2 {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.adv-contact-section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.adv-contact-note {
    margin-top: var(--space-md) !important;
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
}

@media (max-width: 768px) {
    .nav-tools-link { display: none; }
    .adv-stats-row { grid-template-columns: repeat(2, 1fr); }
    .adv-packages-grid { grid-template-columns: 1fr; }
}

/* ---------- Read Next Flyout Inner (Item 9.6) ---------- */
.read-next-inner {
    flex: 1;
    min-width: 0;
}

.read-next-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.read-next-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.read-next-btn {
    display: inline-block;
    padding: 5px 14px;
    background: var(--accent-gradient);
    color: #fff !important;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: opacity var(--transition-fast);
}

.read-next-btn:hover {
    opacity: 0.88;
}

@media (max-width: 640px) {
    .weekly-roundup-section {
        display: none; /* Don't clutter mobile homepage */
    }
    #readNextFlyout {
        max-width: 240px;
        bottom: 16px;
        right: 16px;
    }
    
    /* UX Fix: Tighten header padding on mobile (Audit D) */
    .page-header {
        padding: var(--space-xl) var(--space-md) var(--space-lg);
    }
    .page-header h1 {
        font-size: 2rem;
    }
    .tools-hero {
        padding: var(--space-xl) var(--space-md) var(--space-lg);
    }
    .tools-hero-title {
        font-size: 2rem;
    }
}

/* ============================================================
   SITE FACTORY THEMES — 7 Distinctive Identities
   Each site has a unique visual personality
   ============================================================ */

/* ═══════════════════════════════════════════════════════════════
   1. CYBER — threatdigest.io
   Identity: Military-grade threat intelligence. Dark war room.
   Palette: Obsidian black, threat-red, tactical cyan, amber warnings
   ═══════════════════════════════════════════════════════════════ */
[data-theme="cyber"] {
    --bg-primary: #05080F;
    --bg-secondary: #0A0F1A;
    --bg-card: #0D1220;
    --bg-card-hover: #131B2E;
    --bg-glass: rgba(5, 8, 15, 0.94);
    --bg-elevated: #131B2E;
    --text-primary: #E8ECF4;
    --text-secondary: #8893A7;
    --text-muted: #556178;
    --accent-primary: #EF4444;
    --accent-secondary: #DC2626;
    --accent-gradient: linear-gradient(135deg, #EF4444 0%, #991B1B 100%);
    --accent-glow: rgba(239, 68, 68, 0.15);
    --accent-cyan: #22D3EE;
    --accent-pink: #F87171;
    --border-color: rgba(239, 68, 68, 0.08);
    --border-hover: rgba(239, 68, 68, 0.25);
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Cyber: Scanline overlay on body */
[data-theme="cyber"] body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(239, 68, 68, 0.015) 2px,
        rgba(239, 68, 68, 0.015) 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* Cyber: Threat-red ambient glow background */
[data-theme="cyber"] body::before {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(239, 68, 68, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(239, 68, 68, 0.03) 0%, transparent 50%);
    filter: blur(100px);
}

/* Cyber: Tactical navbar with red accent line */
[data-theme="cyber"] .navbar {
    background: rgba(5, 8, 15, 0.95);
    border-bottom: 1px solid rgba(239, 68, 68, 0.12);
    box-shadow: 0 1px 0 rgba(239, 68, 68, 0.1), 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="cyber"] .logo-text {
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 1.1rem;
}

/* Cyber: Threat-level badge on hero */
[data-theme="cyber"] .hero-card {
    border: 1px solid rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.08), 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="cyber"] .hero-card:hover {
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.12), 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Cyber: Card with threat border pulse */
[data-theme="cyber"] .article-card {
    border: 1px solid rgba(239, 68, 68, 0.06);
    background: linear-gradient(180deg, #0D1220 0%, #0A0F1A 100%);
}

[data-theme="cyber"] .article-card:hover {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.08), 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Cyber: CRITICAL/HIGH/MEDIUM badge colors */
[data-theme="cyber"] .badge {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.68rem;
    border-left-width: 3px;
}

/* Cyber: Radar pulse on ticker */
[data-theme="cyber"] .ticker-pulse {
    background: #EF4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
}

[data-theme="cyber"] .ticker-label {
    color: #EF4444;
    font-family: "Inter", sans-serif;
    letter-spacing: 2px;
}

/* Cyber: Glowing sidebar sections */
[data-theme="cyber"] .sidebar-section {
    border: 1px solid rgba(239, 68, 68, 0.08);
    box-shadow: inset 0 1px 0 rgba(239, 68, 68, 0.05), 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Cyber: Impact bar uses threat colors */
[data-theme="cyber"] .impact-bar-fill {
    background: linear-gradient(90deg, #22D3EE 0%, #EF4444 100%);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Cyber: Section headers with tactical feel */
[data-theme="cyber"] .section-title {
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 700;
}

[data-theme="cyber"] .section-line {
    background: linear-gradient(to right, rgba(239, 68, 68, 0.3), transparent);
}

/* Cyber: Footer with threat accent */
[data-theme="cyber"] .footer {
    background: #05080F;
    border-top: 1px solid rgba(239, 68, 68, 0.1);
}

[data-theme="cyber"] .footer::before {
    background: linear-gradient(90deg, transparent, #EF4444, transparent);
    opacity: 0.3;
}

/* Cyber: Newsletter with danger border */
[data-theme="cyber"] .newsletter-box {
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="cyber"] .newsletter-box::before {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(34, 211, 238, 0.05));
}

/* Cyber: Stats bar with dark military feel */
[data-theme="cyber"] .stats-bar {
    background: rgba(13, 18, 32, 0.8);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

/* Cyber: Dropdown dark */
[data-theme="cyber"] .nav-dropdown-menu {
    background: rgba(13, 18, 32, 0.98);
}

/* Cyber: Mobile menu */
[data-theme="cyber"] .nav-links.active {
    background: rgba(5, 8, 15, 0.98);
}


/* ═══════════════════════════════════════════════════════════════
   2. LEGAL — legalaibeat.com
   Identity: Supreme Court authority. Where law meets tech.
   Palette: Ivory/cream, deep navy, burgundy accents, gold touches
   ═══════════════════════════════════════════════════════════════ */
[data-theme="legal"] {
    --bg-primary: #FAF9F6;
    --bg-secondary: #F5F1EB;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAF8F5;
    --bg-glass: rgba(250, 249, 246, 0.95);
    --bg-elevated: #F0ECE3;
    --text-primary: #1A1A2E;
    --text-secondary: #4A4A68;
    --text-muted: #8585A0;
    --accent-primary: #7B2D3B;
    --accent-secondary: #5B1D2B;
    --accent-gradient: linear-gradient(135deg, #7B2D3B 0%, #1A1A2E 100%);
    --accent-glow: rgba(123, 45, 59, 0.08);
    --accent-cyan: #1A1A2E;
    --accent-pink: #C4956A;
    --border-color: rgba(26, 26, 46, 0.08);
    --border-hover: rgba(123, 45, 59, 0.2);
    --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* Legal: Warm parchment background */
[data-theme="legal"] body::before {
    background:
        radial-gradient(ellipse at 30% 20%, rgba(196, 149, 106, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(123, 45, 59, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 26, 46, 0.02) 0%, transparent 70%);
    filter: blur(80px);
}

/* Legal: Refined navbar with gold border */
[data-theme="legal"] .navbar {
    background: rgba(250, 249, 246, 0.96);
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
    box-shadow: 0 1px 0 rgba(196, 149, 106, 0.1), 0 4px 15px rgba(0, 0, 0, 0.04);
}

[data-theme="legal"] .logo-text {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.01em;
}

/* Legal: Elegant section dividers */
[data-theme="legal"] .section-title {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

[data-theme="legal"] .section-line {
    background: linear-gradient(to right, rgba(123, 45, 59, 0.2), rgba(196, 149, 106, 0.1), transparent);
}

/* Legal: Article cards with subtle elegance */
[data-theme="legal"] .article-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(26, 26, 46, 0.06);
}

[data-theme="legal"] .article-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(123, 45, 59, 0.15);
}

[data-theme="legal"] .card-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    line-height: 1.4;
}

/* Legal: Hero with judicial gravitas */
[data-theme="legal"] .hero-card {
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="legal"] .hero-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Legal: Badge with formal style */
[data-theme="legal"] .badge {
    font-family: "Inter", sans-serif;
    letter-spacing: 0.06em;
    border-radius: 4px;
    border-left-width: 3px;
}

/* Legal: Impact meter with muted tones */
[data-theme="legal"] .impact-bar-fill {
    background: linear-gradient(90deg, #7B2D3B 0%, #C4956A 100%);
    box-shadow: 0 0 6px rgba(123, 45, 59, 0.3);
}

/* Legal: Sidebar with cream tones */
[data-theme="legal"] .sidebar-section {
    background: #FFFFFF;
    border: 1px solid rgba(26, 26, 46, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Legal: Footer with dark navy */
[data-theme="legal"] .footer {
    background: #1A1A2E;
    color: #C8C8D8;
}

[data-theme="legal"] .footer .logo-text {
    color: #FAF9F6 !important;
    -webkit-text-fill-color: #FAF9F6;
}

[data-theme="legal"] .footer-tagline,
[data-theme="legal"] .footer-links a {
    color: #9090A8;
}

[data-theme="legal"] .footer-links a:hover {
    color: #C4956A;
}

[data-theme="legal"] .footer-links h4 {
    color: #E0E0F0;
}

[data-theme="legal"] .footer-bottom {
    border-color: rgba(255, 255, 255, 0.08);
    color: #6060A0;
}

[data-theme="legal"] .footer::before {
    background: linear-gradient(90deg, transparent, #C4956A, transparent);
    opacity: 0.3;
}

/* Legal: Article body with book typography */
[data-theme="legal"] .article-body {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.85;
}

[data-theme="legal"] .article-body h2 {
    font-family: "Playfair Display", Georgia, serif;
}

/* Legal: Newsletter with subtle warmth */
[data-theme="legal"] .newsletter-box {
    border-color: rgba(123, 45, 59, 0.2);
}

[data-theme="legal"] .newsletter-box::before {
    background: linear-gradient(135deg, rgba(123, 45, 59, 0.04), rgba(196, 149, 106, 0.04));
}

/* Legal: Dropdown styling */
[data-theme="legal"] .nav-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
}

/* Legal: Trending rank */
[data-theme="legal"] .trending-rank {
    font-family: "Playfair Display", Georgia, serif;
    color: #7B2D3B;
    background: none;
    -webkit-text-fill-color: #7B2D3B;
}

/* Legal: Scrollbar */
[data-theme="legal"] ::-webkit-scrollbar-thumb {
    background: rgba(123, 45, 59, 0.15);
}

[data-theme="legal"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(123, 45, 59, 0.3);
}

[data-theme="legal"] ::selection {
    background: rgba(123, 45, 59, 0.25);
    color: #1A1A2E;
}


/* ═══════════════════════════════════════════════════════════════
   3. FINTECH — fintechdose.com
   Identity: Bloomberg terminal meets modern fintech.
   Palette: Deep navy, emerald green (bull), amber (bear), data-dense
   ═══════════════════════════════════════════════════════════════ */
[data-theme="fintech"] {
    --bg-primary: #080D19;
    --bg-secondary: #0E1525;
    --bg-card: #111B2E;
    --bg-card-hover: #162035;
    --bg-glass: rgba(8, 13, 25, 0.95);
    --bg-elevated: #162035;
    --text-primary: #E2E8F0;
    --text-secondary: #8B9DC3;
    --text-muted: #5A6B88;
    --accent-primary: #10B981;
    --accent-secondary: #059669;
    --accent-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --accent-glow: rgba(16, 185, 129, 0.12);
    --accent-cyan: #F59E0B;
    --accent-pink: #EF4444;
    --border-color: rgba(16, 185, 129, 0.06);
    --border-hover: rgba(16, 185, 129, 0.25);
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Fintech: Grid pattern background (subtle data grid) */
[data-theme="fintech"] body::before {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(245, 158, 11, 0.04) 0%, transparent 40%);
    filter: blur(80px);
}

[data-theme="fintech"] body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Fintech: Bloomberg-style navbar */
[data-theme="fintech"] .navbar {
    background: rgba(8, 13, 25, 0.96);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: 0 1px 0 rgba(16, 185, 129, 0.08), 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="fintech"] .logo-text {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Fintech: Ticker styled like stock ticker */
[data-theme="fintech"] .ticker-bar {
    background: #060A14;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

[data-theme="fintech"] .ticker-pulse {
    background: #10B981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

[data-theme="fintech"] .ticker-label {
    color: #10B981;
    letter-spacing: 2px;
}

/* Fintech: Cards with market data feel */
[data-theme="fintech"] .article-card {
    background: linear-gradient(180deg, #111B2E 0%, #0E1525 100%);
    border: 1px solid rgba(16, 185, 129, 0.06);
}

[data-theme="fintech"] .article-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.06), 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Fintech: Impact bar green→amber gradient */
[data-theme="fintech"] .impact-bar-fill {
    background: linear-gradient(90deg, #10B981 0%, #F59E0B 100%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Fintech: Section headers with ticker-style */
[data-theme="fintech"] .section-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

[data-theme="fintech"] .section-line {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.3), transparent);
}

/* Fintech: Hero card with data glow */
[data-theme="fintech"] .hero-card {
    border: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.06), 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Fintech: Footer */
[data-theme="fintech"] .footer {
    background: #060A14;
    border-top: 1px solid rgba(16, 185, 129, 0.08);
}

[data-theme="fintech"] .footer::before {
    background: linear-gradient(90deg, transparent, #10B981, transparent);
    opacity: 0.2;
}

/* Fintech: Stats bar glowing */
[data-theme="fintech"] .stats-bar {
    background: rgba(14, 21, 37, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.08);
}

/* Fintech: Sidebar */
[data-theme="fintech"] .sidebar-section {
    border: 1px solid rgba(16, 185, 129, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Fintech: Dropdown */
[data-theme="fintech"] .nav-dropdown-menu {
    background: rgba(14, 21, 37, 0.98);
}

/* Fintech: Mobile menu */
[data-theme="fintech"] .nav-links.active {
    background: rgba(8, 13, 25, 0.98);
}


/* ═══════════════════════════════════════════════════════════════
   4. FINANCE — fintechrundown.com
   Identity: Wall Street Journal meets Stripe. Premium editorial.
   Palette: Rich navy, warm gold, ivory paper, refined serif
   ═══════════════════════════════════════════════════════════════ */
[data-theme="finance"] {
    --bg-primary: #FFFEF8;
    --bg-secondary: #F8F5ED;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FDFBF5;
    --bg-glass: rgba(255, 254, 248, 0.95);
    --bg-elevated: #F0EDE4;
    --text-primary: #0C1B33;
    --text-secondary: #3D4F6C;
    --text-muted: #7A8599;
    --accent-primary: #B8860B;
    --accent-secondary: #8B6508;
    --accent-gradient: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    --accent-glow: rgba(184, 134, 11, 0.08);
    --accent-cyan: #0C1B33;
    --accent-pink: #8B6508;
    --border-color: rgba(12, 27, 51, 0.08);
    --border-hover: rgba(184, 134, 11, 0.2);
    --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* Finance: Warm ivory/gold ambient background */
[data-theme="finance"] body::before {
    background:
        radial-gradient(ellipse at 25% 30%, rgba(184, 134, 11, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 70%, rgba(12, 27, 51, 0.03) 0%, transparent 50%);
    filter: blur(100px);
}

/* Finance: Premium newspaper-style navbar */
[data-theme="finance"] .navbar {
    background: rgba(255, 254, 248, 0.97);
    border-bottom: 2px solid #0C1B33;
    box-shadow: none;
}

[data-theme="finance"] .logo-text {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    background: none;
    -webkit-text-fill-color: #0C1B33;
}

/* Finance: Nav links styled like WSJ */
[data-theme="finance"] .nav-link {
    font-family: "Inter", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 0;
    padding: var(--space-sm) var(--space-md);
}

[data-theme="finance"] .nav-link:hover,
[data-theme="finance"] .nav-link.active {
    background: transparent;
    color: #B8860B !important;
}

[data-theme="finance"] .nav-link.active::after {
    background: #B8860B;
    height: 3px;
    width: 100%;
    bottom: -1px;
}

/* Finance: Section headers — newspaper column style */
[data-theme="finance"] .section-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

[data-theme="finance"] .section-line {
    height: 2px;
    background: linear-gradient(to right, #0C1B33, rgba(12, 27, 51, 0.1));
}

/* Finance: Cards with editorial refinement */
[data-theme="finance"] .article-card {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(12, 27, 51, 0.06);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="finance"] .article-card:hover {
    border-color: rgba(184, 134, 11, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

[data-theme="finance"] .card-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.35;
}

[data-theme="finance"] .card-excerpt {
    font-family: "Source Serif 4", Georgia, serif;
}

/* Finance: Badge with refined style */
[data-theme="finance"] .badge {
    font-family: "Inter", sans-serif;
    letter-spacing: 0.06em;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Finance: Hero with newspaper gravitas */
[data-theme="finance"] .hero-card {
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="finance"] .hero-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Finance: Impact bar gold/navy */
[data-theme="finance"] .impact-bar-fill {
    background: linear-gradient(90deg, #B8860B 0%, #DAA520 100%);
    box-shadow: 0 0 6px rgba(184, 134, 11, 0.3);
}

/* Finance: Sidebar with warm paper feel */
[data-theme="finance"] .sidebar-section {
    background: #FFFFFF;
    border: 1px solid rgba(12, 27, 51, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Finance: Footer with deep navy */
[data-theme="finance"] .footer {
    background: #0C1B33;
    color: #B8C5D8;
}

[data-theme="finance"] .footer .logo-text {
    -webkit-text-fill-color: #FFFEF8;
    color: #FFFEF8 !important;
    font-family: "Playfair Display", Georgia, serif;
}

[data-theme="finance"] .footer-tagline,
[data-theme="finance"] .footer-links a {
    color: #7A8DA8;
}

[data-theme="finance"] .footer-links a:hover {
    color: #DAA520;
}

[data-theme="finance"] .footer-links h4 {
    color: #D0D8E4;
}

[data-theme="finance"] .footer-bottom {
    border-color: rgba(255, 255, 255, 0.08);
    color: #4A6080;
}

[data-theme="finance"] .footer::before {
    background: linear-gradient(90deg, transparent, #B8860B, transparent);
    opacity: 0.4;
}

/* Finance: Article body with book typography */
[data-theme="finance"] .article-body {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.85;
}

[data-theme="finance"] .article-body h2 {
    font-family: "Playfair Display", Georgia, serif;
}

/* Finance: Trending rank gold */
[data-theme="finance"] .trending-rank {
    font-family: "Playfair Display", Georgia, serif;
    background: none;
    -webkit-text-fill-color: #B8860B;
    color: #B8860B;
}

/* Finance: Newsletter with gold accent */
[data-theme="finance"] .newsletter-box {
    border-color: rgba(184, 134, 11, 0.25);
}

[data-theme="finance"] .newsletter-box::before {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.04), rgba(12, 27, 51, 0.03));
}

/* Finance: Scrollbar */
[data-theme="finance"] ::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.15);
}

[data-theme="finance"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.3);
}

[data-theme="finance"] ::selection {
    background: rgba(184, 134, 11, 0.2);
    color: #0C1B33;
}

/* Finance: Dropdown */
[data-theme="finance"] .nav-dropdown-menu {
    background: rgba(255, 254, 248, 0.99);
    border: 1px solid rgba(12, 27, 51, 0.1);
}


/* ═══════════════════════════════════════════════════════════════
   5. DEVTOOLS — devtoolsfeed.com
   Identity: VS Code / GitHub Codespaces. The developer's newsroom.
   Palette: GitHub dark, syntax green, link blue, warn amber, diff pink
   ═══════════════════════════════════════════════════════════════ */
[data-theme="devtools"] {
    --bg-primary: #0D1117;
    --bg-secondary: #161B22;
    --bg-card: #161B22;
    --bg-card-hover: #1C2333;
    --bg-glass: rgba(13, 17, 23, 0.95);
    --bg-elevated: #21262D;
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    --accent-primary: #58A6FF;
    --accent-secondary: #388BFD;
    --accent-gradient: linear-gradient(135deg, #58A6FF 0%, #388BFD 100%);
    --accent-glow: rgba(88, 166, 255, 0.12);
    --accent-cyan: #3FB950;
    --accent-pink: #F778BA;
    --border-color: rgba(240, 246, 252, 0.06);
    --border-hover: rgba(88, 166, 255, 0.3);
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* DevTools: Code editor background — dot grid */
[data-theme="devtools"] body::before {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(88, 166, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(63, 185, 80, 0.03) 0%, transparent 40%);
    filter: blur(80px);
}

/* DevTools: GitHub-style navbar */
[data-theme="devtools"] .navbar {
    background: rgba(13, 17, 23, 0.96);
    border-bottom: 1px solid rgba(240, 246, 252, 0.1);
    box-shadow: 0 1px 0 rgba(88, 166, 255, 0.05), 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="devtools"] .logo-text {
    font-weight: 700;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

/* DevTools: Monospace metadata */
[data-theme="devtools"] code,
[data-theme="devtools"] pre,
[data-theme="devtools"] .card-meta,
[data-theme="devtools"] .trending-meta,
[data-theme="devtools"] .roundup-meta,
[data-theme="devtools"] .ticker-item,
[data-theme="devtools"] .badge {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.78em;
}

/* DevTools: Cards with left-border (like git diff / editor tabs) */
[data-theme="devtools"] .article-card {
    border-left: 3px solid rgba(88, 166, 255, 0.15);
    border-radius: var(--radius-sm);
    background: #161B22;
}

[data-theme="devtools"] .article-card:hover {
    border-left-color: #58A6FF;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.06), 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* DevTools: Badge styled like GitHub labels */
[data-theme="devtools"] .badge {
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    border-left-width: 0;
    padding: 3px 10px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
}

/* DevTools: Section headers with terminal prompt */
[data-theme="devtools"] .section-title::before {
    content: "> ";
    color: #3FB950;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 400;
}

[data-theme="devtools"] .section-line {
    background: linear-gradient(to right, rgba(88, 166, 255, 0.2), transparent);
}

/* DevTools: Ticker with terminal feel */
[data-theme="devtools"] .ticker-bar {
    background: #010409;
    border-bottom: 1px solid rgba(240, 246, 252, 0.08);
}

[data-theme="devtools"] .ticker-label {
    color: #3FB950;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="devtools"] .ticker-pulse {
    background: #3FB950;
    box-shadow: 0 0 10px rgba(63, 185, 80, 0.6);
}

/* DevTools: Hero card */
[data-theme="devtools"] .hero-card {
    border: 1px solid rgba(240, 246, 252, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* DevTools: Impact bar blue→green */
[data-theme="devtools"] .impact-bar-fill {
    background: linear-gradient(90deg, #58A6FF 0%, #3FB950 100%);
    box-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}

/* DevTools: Footer */
[data-theme="devtools"] .footer {
    background: #010409;
    border-top: 1px solid rgba(240, 246, 252, 0.06);
}

[data-theme="devtools"] .footer::before {
    background: linear-gradient(90deg, transparent, #58A6FF, transparent);
    opacity: 0.2;
}

/* DevTools: Sidebar */
[data-theme="devtools"] .sidebar-section {
    border: 1px solid rgba(240, 246, 252, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* DevTools: Category chip like GitHub topic tags */
[data-theme="devtools"] .category-chip {
    border-radius: 20px;
    border-left-width: 0;
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.15);
}

/* DevTools: Search with terminal cursor */
[data-theme="devtools"] .search-input {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.82rem;
}

[data-theme="devtools"] .search-input::placeholder {
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* DevTools: Dropdown */
[data-theme="devtools"] .nav-dropdown-menu {
    background: rgba(22, 27, 34, 0.98);
}

/* DevTools: Mobile menu */
[data-theme="devtools"] .nav-links.active {
    background: rgba(13, 17, 23, 0.98);
}

/* DevTools: Trending rank with blue */
[data-theme="devtools"] .trending-rank {
    background: none;
    -webkit-text-fill-color: #58A6FF;
    color: #58A6FF;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}


/* ═══════════════════════════════════════════════════════════════
   6. OPENSOURCE — opensourcebeat.com
   Identity: Community-driven, warm collaborative energy.
   Palette: Warm charcoal, contribution orange, repo green, PR purple
   ═══════════════════════════════════════════════════════════════ */
[data-theme="opensource"] {
    --bg-primary: #18181B;
    --bg-secondary: #1F1F23;
    --bg-card: #222228;
    --bg-card-hover: #2A2A32;
    --bg-glass: rgba(24, 24, 27, 0.95);
    --bg-elevated: #2A2A32;
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --accent-primary: #F97316;
    --accent-secondary: #EA580C;
    --accent-gradient: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    --accent-glow: rgba(249, 115, 22, 0.12);
    --accent-cyan: #22C55E;
    --accent-pink: #A855F7;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(249, 115, 22, 0.3);
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Opensource: Warm glow background */
[data-theme="opensource"] body::before {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(249, 115, 22, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(34, 197, 94, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
    filter: blur(100px);
}

/* Opensource: Contribution graph dots background */
[data-theme="opensource"] body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(249, 115, 22, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

/* Opensource: Warm navbar */
[data-theme="opensource"] .navbar {
    background: rgba(24, 24, 27, 0.96);
    border-bottom: 1px solid rgba(249, 115, 22, 0.08);
    box-shadow: 0 1px 0 rgba(249, 115, 22, 0.06), 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="opensource"] .logo-text {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Opensource: Cards with community warmth */
[data-theme="opensource"] .article-card {
    background: #222228;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
}

[data-theme="opensource"] .article-card:hover {
    border-color: rgba(249, 115, 22, 0.25);
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.06), 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Opensource: Badge with tag colors */
[data-theme="opensource"] .badge {
    border-radius: 20px;
    border-left-width: 0;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Opensource: Section headers */
[data-theme="opensource"] .section-line {
    background: linear-gradient(to right, rgba(249, 115, 22, 0.3), rgba(34, 197, 94, 0.1), transparent);
}

/* Opensource: Ticker */
[data-theme="opensource"] .ticker-bar {
    background: #131316;
}

[data-theme="opensource"] .ticker-pulse {
    background: #F97316;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.7);
}

[data-theme="opensource"] .ticker-label {
    color: #F97316;
}

/* Opensource: Hero card */
[data-theme="opensource"] .hero-card {
    border: 1px solid rgba(249, 115, 22, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Opensource: Impact bar orange→green */
[data-theme="opensource"] .impact-bar-fill {
    background: linear-gradient(90deg, #F97316 0%, #22C55E 100%);
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

/* Opensource: Footer */
[data-theme="opensource"] .footer {
    background: #131316;
    border-top: 1px solid rgba(249, 115, 22, 0.06);
}

[data-theme="opensource"] .footer::before {
    background: linear-gradient(90deg, transparent, #F97316, #22C55E, transparent);
    opacity: 0.2;
}

/* Opensource: Sidebar */
[data-theme="opensource"] .sidebar-section {
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Opensource: Newsletter with orange accent */
[data-theme="opensource"] .newsletter-box {
    border-color: rgba(249, 115, 22, 0.25);
}

[data-theme="opensource"] .newsletter-box::before {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.06), rgba(34, 197, 94, 0.04));
}

/* Opensource: Stats bar */
[data-theme="opensource"] .stats-bar {
    background: rgba(34, 34, 40, 0.8);
    border: 1px solid rgba(249, 115, 22, 0.06);
}

/* Opensource: Category chips with git-style colors */
[data-theme="opensource"] .category-chip {
    border-left-width: 0;
    border-radius: 20px;
}

/* Opensource: Dropdown */
[data-theme="opensource"] .nav-dropdown-menu {
    background: rgba(31, 31, 35, 0.98);
}

/* Opensource: Mobile menu */
[data-theme="opensource"] .nav-links.active {
    background: rgba(24, 24, 27, 0.98);
}

/* Opensource: Trending rank */
[data-theme="opensource"] .trending-rank {
    background: none;
    -webkit-text-fill-color: #F97316;
    color: #F97316;
}


/* ═══════════════════════════════════════════════════════════════
   7. DEFAULT — theaicatchup.com (Enhanced)
   Identity: Bold editorial, the flagship AI publication.
   Enhancement: Richer gradients, more editorial presence
   ═══════════════════════════════════════════════════════════════ */

/* Default theme: Enhanced hero card with richer depth */
[data-theme="default"] .hero-card {
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.08), 0 10px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="default"] .hero-card:hover {
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.12), 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Default: Card hover with blue glow */
[data-theme="default"] .article-card:hover {
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.05), 0 16px 32px rgba(0, 0, 0, 0.06);
}

/* Default: Enhanced section line */
[data-theme="default"] .section-line {
    background: linear-gradient(to right, rgba(37, 99, 235, 0.3), rgba(8, 145, 178, 0.1), transparent);
}

/* Default: Footer accent */
[data-theme="default"] .footer::before {
    background: linear-gradient(90deg, transparent, #2563EB, #0891B2, transparent);
    opacity: 0.3;
}


/* ═══════════════════════════════════════════════════════════════
   SHARED DARK THEME OVERRIDES
   Common fixes for all dark themes
   ═══════════════════════════════════════════════════════════════ */

[data-theme="cyber"] .logo-text,
[data-theme="cyber"] .nav-link,
[data-theme="fintech"] .logo-text,
[data-theme="fintech"] .nav-link,
[data-theme="devtools"] .logo-text,
[data-theme="devtools"] .nav-link,
[data-theme="opensource"] .logo-text,
[data-theme="opensource"] .nav-link {
    color: var(--text-primary) !important;
}

[data-theme="cyber"] .nav-link:hover,
[data-theme="fintech"] .nav-link:hover,
[data-theme="devtools"] .nav-link:hover,
[data-theme="opensource"] .nav-link:hover {
    color: var(--accent-primary) !important;
}

/* Dark theme mobile menus */
[data-theme="cyber"] .mobile-menu-btn span,
[data-theme="fintech"] .mobile-menu-btn span,
[data-theme="devtools"] .mobile-menu-btn span,
[data-theme="opensource"] .mobile-menu-btn span {
    background: var(--text-primary);
}

/* Dark theme scrollbars */
[data-theme="cyber"] ::-webkit-scrollbar-thumb {
    background: rgba(239, 68, 68, 0.15);
}

[data-theme="cyber"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(239, 68, 68, 0.3);
}

[data-theme="fintech"] ::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="fintech"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.3);
}

[data-theme="devtools"] ::-webkit-scrollbar-thumb {
    background: rgba(88, 166, 255, 0.15);
}

[data-theme="devtools"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 166, 255, 0.3);
}

[data-theme="opensource"] ::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.15);
}

[data-theme="opensource"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.3);
}

/* Dark theme selections */
[data-theme="cyber"] ::selection {
    background: rgba(239, 68, 68, 0.3);
}

[data-theme="fintech"] ::selection {
    background: rgba(16, 185, 129, 0.3);
}

[data-theme="devtools"] ::selection {
    background: rgba(88, 166, 255, 0.3);
}

[data-theme="opensource"] ::selection {
    background: rgba(249, 115, 22, 0.3);
}

/* Dark theme search forms */
[data-theme="cyber"] .search-form,
[data-theme="fintech"] .search-form,
[data-theme="devtools"] .search-form,
[data-theme="opensource"] .search-form {
    background: var(--bg-elevated);
    border-color: var(--border-color);
}

/* Dark theme popup/overlay */
[data-theme="cyber"] .newsletter-popup,
[data-theme="fintech"] .newsletter-popup,
[data-theme="devtools"] .newsletter-popup,
[data-theme="opensource"] .newsletter-popup {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

/* Dark theme view toggle */
[data-theme="cyber"] .view-toggle-container,
[data-theme="fintech"] .view-toggle-container,
[data-theme="devtools"] .view-toggle-container,
[data-theme="opensource"] .view-toggle-container {
    background: var(--bg-elevated);
    border-color: var(--border-color);
}

/* Dark theme poll */
[data-theme="cyber"] .result-bar-bg,
[data-theme="fintech"] .result-bar-bg,
[data-theme="devtools"] .result-bar-bg,
[data-theme="opensource"] .result-bar-bg {
    background: var(--bg-elevated);
}

/* Light theme dark mode toggle — also enable for finance */
[data-theme="legal"] .hacker-btn,
[data-theme="finance"] .hacker-btn {
    background: rgba(123, 45, 59, 0.08);
    border: 1px solid rgba(123, 45, 59, 0.2);
    color: var(--accent-primary);
}


/* ---------- Accessibility utilities ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}