:root {
            --primary: #0A2540;
            --primary-light: #1E3A5F;
            --accent: #0066cc;
            --text-primary: #1a1a1a;
            --text-secondary: #4a5568;
            --text-muted: #718096;
            --bg-primary: #ffffff;
            --bg-secondary: #f7fafc;
            --bg-tertiary: #edf2f7;
            --border: #e2e8f0;
            --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
            --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
            --radius: 8px;
            --radius-lg: 12px;
            
            /* Bias colors */
            --bias-left: #3b82f6;
            --bias-left-center: #60a5fa;
            --bias-center: #6b7280;
            --bias-right-center: #f87171;
            --bias-right: #ef4444;
        }
        
        * { box-sizing: border-box; margin: 0; padding: 0; }
        
        body { 
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; 
            line-height: 1.6; 
            color: var(--text-primary); 
            background: var(--bg-primary);
            min-height: 100vh;
            overflow-x: hidden;
        }
        
        /* Sticky Header */
        .header-container {
            position: sticky;
            top: 0;
            z-index: 100;
            background: var(--bg-primary);
            border-bottom: 1px solid var(--border);
            box-shadow: var(--shadow);
        }
        
        header {
            max-width: 1200px;
            margin: 0 auto;
            padding: 12px 16px;
        }
        
        .header-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            flex-wrap: nowrap;
            gap: 16px;
        }

        .header-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-right: auto;
        }
        
        .header-logo img {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            object-fit: cover;
        }
        
        .header-logo-text {
            display: flex;
            flex-direction: column;
        }
        
        .header-logo-text .logo-title {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.2;
            letter-spacing: -0.5px;
        }
        
        .header-logo-text .logo-tagline {
            font-size: 0.75rem;
            color: var(--text-secondary);
            line-height: 1.2;
        }
        
        .header-actions {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 12px;
        }

        @media (max-width: 640px) {
            header {
                padding: 10px 12px;
            }
            
            .header-top {
                flex-direction: row;
                align-items: center;
                gap: 8px;
                flex-wrap: nowrap;
                margin-bottom: 8px;
            }
            
            .header-logo {
                justify-content: center;
                margin-right: 0;
            }
            
            .header-logo img {
                width: 36px;
                height: 36px;
            }
            
            .header-logo-text .logo-title {
                font-size: 1.2rem;
            }
            
            .header-logo-text .logo-tagline {
                display: none;
            }
            
            .header-actions {
                width: auto;
                gap: 8px;
                flex-direction: row;
                flex-wrap: nowrap;
                flex-shrink: 0;
            }
            
            .header-logo {
                flex: 1;
                min-width: 0;
                justify-content: flex-start;
                margin-right: 0;
            }
            
            .header-logo-text {
                min-width: 0;
                overflow: hidden;
            }
            
            .header-logo-text .logo-title {
                font-size: 1.1rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            
            .bias-filters {
                justify-content: flex-start;
                overflow-x: auto;
                flex-wrap: nowrap;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                padding-bottom: 0;
                gap: 6px;
            }
            
            .bias-filters::-webkit-scrollbar {
                display: none;
            }
            
            .bias-filters > span {
                display: none;
            }
            
            .bias-pill {
                padding: 4px 8px;
                font-size: 0.7rem;
                white-space: nowrap;
            }
            
            .search-container {
                max-width: none;
            }
            
            .search-input {
                padding: 8px 14px 8px 36px;
                font-size: 0.85rem;
            }
            
            .search-icon {
                left: 12px;
            }
            
            .search-icon svg {
                width: 16px;
                height: 16px;
            }
            
            .story-links {
                gap: 8px;
            }
            
            .story-links a {
                font-size: 0.75rem;
            }
        }
        
        /* Search Bar */
        .search-container {
            position: relative;
            flex: 0 0 auto;
            width: 200px;
            max-width: 200px;
        }
        
        .search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border: 1px solid var(--border);
            border-radius: 24px;
            font-size: 0.9rem;
            background: var(--bg-secondary);
            transition: all 0.2s;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--accent);
            background: var(--bg-primary);
            box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            pointer-events: none;
        }
        
        .search-icon svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }
        
        /* Bias Filter Pills */
        .bias-filters {
            display: flex;
            gap: 8px;
            flex-wrap: nowrap;
            align-items: center;
            min-width: min-content;
        }
        
        .bias-pill {
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: transparent;
            font-family: inherit;
        }

        .bias-pill:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow);
        }

        .bias-pill.apply-btn {
            background: var(--primary) !important;
            color: white !important;
            border-color: var(--primary) !important;
            animation: pulse 0.3s ease;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        
        .bias-pill.active {
            border-color: currentColor;
            box-shadow: var(--shadow-md);
            font-weight: 700;
            position: relative;
            padding-left: 28px;
        }

        .bias-pill.active::before {
            content: "✓";
            position: absolute;
            left: 10px;
            font-weight: 700;
            font-size: 0.9rem;
        }
        
        .bias-pill.left { background: rgba(59,130,246,0.1); color: var(--bias-left); }
        .bias-pill.left-center { background: rgba(96,165,250,0.1); color: var(--bias-left-center); }
        .bias-pill.center { background: rgba(107,114,128,0.1); color: var(--bias-center); }
        .bias-pill.right-center { background: rgba(248,113,113,0.1); color: var(--bias-right-center); }
        .bias-pill.right { background: rgba(239,68,68,0.1); color: var(--bias-right); }
        .bias-pill.all { background: var(--bg-tertiary); color: var(--text-secondary); }
        
        /* Language & Theme Toggle */
        .header-controls {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 12px;
        }
        
        #lang-select {
            padding: 8px 12px;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            font-size: 0.85rem;
            background: var(--bg-primary);
            cursor: pointer;
        }
        
        .theme-toggle {
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 50%;
            cursor: pointer;
            padding: 8px;
            font-size: 1rem;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        
        .theme-toggle:hover {
            background: var(--bg-secondary);
            transform: scale(1.05);
        }
        
        /* Main Content */
        main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 16px;
        }

        @media (min-width: 640px) {
            main {
                padding: 24px;
            }
        }
        
        /* Tabs */
        .tabs-wrapper {
            position: relative;
            margin-bottom: 24px;
            border-bottom: 2px solid var(--border);
        }



        .tabs-container {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: var(--border) transparent;
            padding: 0 40px;
        }

        .tabs-container::-webkit-scrollbar {
            height: 6px;
        }

        .tabs-container::-webkit-scrollbar-track {
            background: transparent;
        }

        .tabs-container::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 3px;
        }

        .tabs-container::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

        .tabs {
            display: flex;
            gap: 4px;
            min-width: min-content;
        }

        .scroll-btn {
            position: absolute;
            top: 0;
            bottom: 2px;
            width: 40px;
            background: var(--bg-primary);
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            transition: opacity 0.2s;
        }

        .scroll-btn:hover {
            background: var(--bg-secondary);
        }

        .scroll-btn.left {
            left: 0;
            border-right: 1px solid var(--border);
        }

        .scroll-btn.right {
            right: 0;
            border-left: 1px solid var(--border);
        }

        .scroll-btn svg {
            width: 20px;
            height: 20px;
            fill: var(--text-secondary);
        }

        .scroll-btn:hover svg {
            fill: var(--primary);
        }
        
        .tab {
            padding: 8px 16px;
            background: transparent;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-muted);
            text-decoration: none;
            transition: all 0.2s;
            white-space: nowrap;
        }
        
        .tab:hover {
            color: var(--text-primary);
            background: var(--bg-secondary);
            border-radius: var(--radius) var(--radius) 0 0;
        }
        
        .tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
            font-weight: 600;
        }
        
        .tab-count {
            background: var(--bg-tertiary);
            color: var(--text-muted);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            margin-left: 6px;
        }
        
        /* Story Cards Grid */
        .stories-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
            max-width: 100%;
        }

        .story-card {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 16px;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            height: 100%;
            max-width: 100%;
            overflow-x: hidden;
        }

        @media (min-width: 640px) {
            .story-card {
                padding: 20px;
            }
        }

        .story-card:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
            border-color: var(--accent);
        }

        /* Book Recommendation Cards */
        .book-card {
            background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
            border: 2px solid #eab308;
            border-radius: var(--radius-lg);
            padding: 20px;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            height: 100%;
            max-width: 100%;
            overflow-x: hidden;
            text-align: center;
            position: relative;
        }

        .book-card:hover {
            box-shadow: 0 8px 16px -4px rgba(234, 179, 8, 0.3);
            transform: translateY(-2px);
            border-color: #ca8a04;
        }

        .book-badge {
            display: inline-block;
            background: #eab308;
            color: #713f12;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 4px 10px;
            border-radius: 4px;
            margin-bottom: 12px;
            align-self: center;
        }

        .book-cover {
            width: 100px;
            height: 150px;
            object-fit: cover;
            border-radius: 6px;
            margin: 0 auto 16px auto;
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
            display: block;
            background: #f3f4f6;
        }

        .book-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: #713f12;
            line-height: 1.4;
            margin: 0 0 8px 0;
        }

        .book-author {
            font-size: 0.85rem;
            color: #92400e;
            margin-bottom: 12px;
            font-style: italic;
        }

        .book-description {
            font-size: 0.85rem;
            color: #78350f;
            line-height: 1.5;
            margin-bottom: 16px;
            flex-grow: 1;
        }

        .book-link {
            display: inline-block;
            background: #ca8a04;
            color: white;
            text-decoration: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.2s;
            align-self: center;
        }

        .book-link:hover {
            background: #a16207;
            transform: translateY(-1px);
        }
        
        /* Inline Poll Card */
        .poll-card-inline {
            background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
            border: 2px solid #7dd3fc;
            border-radius: var(--radius-lg);
            padding: 20px;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            height: 100%;
            max-width: 100%;
            overflow-x: hidden;
        }
        
        .poll-card-inline:hover {
            box-shadow: 0 8px 16px -4px rgba(14, 165, 233, 0.25);
            transform: translateY(-2px);
            border-color: #0ea5e9;
        }
        
        .poll-badge-inline {
            display: inline-block;
            background: #0ea5e9;
            color: white;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 4px 10px;
            border-radius: 4px;
            margin-bottom: 12px;
            align-self: flex-start;
        }
        
        .poll-question-inline {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--primary);
            line-height: 1.4;
            margin: 0 0 14px 0;
        }
        
        .poll-options-inline {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 14px;
        }
        
        .poll-option-btn-inline {
            width: 100%;
            padding: 10px 14px;
            border: 1.5px solid #bae6fd;
            border-radius: var(--radius);
            background: white;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            text-align: left;
            transition: all 0.2s;
        }
        
        .poll-option-btn-inline:hover {
            border-color: var(--accent);
            background: #f0f7ff;
        }
        
        .poll-option-btn-inline:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        
        .poll-results-inline {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 12px;
        }
        
        .poll-result-row {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .poll-result-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        .poll-result-bar-bg {
            height: 6px;
            background: #e0f2fe;
            border-radius: 3px;
            overflow: hidden;
        }
        
        .poll-result-bar-fill {
            height: 100%;
            background: #0ea5e9;
            border-radius: 3px;
            transition: width 0.5s ease;
        }
        
        .poll-view-full {
            font-size: 0.8rem;
            color: var(--accent);
            text-decoration: none;
            font-weight: 600;
        }
        
        .poll-view-full:hover {
            text-decoration: underline;
        }
        
        .story-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
        }

        .story-image-link {
            display: block;
            margin-bottom: 12px;
            border-radius: 8px;
            overflow: hidden;
            text-decoration: none;
        }

        .story-image {
            width: 100%;
            height: 160px;
            object-fit: cover;
            display: block;
            transition: transform 0.3s;
        }

        .story-image-link:hover .story-image {
            transform: scale(1.03);
        }

        @media (min-width: 640px) {
            .story-image {
                height: 180px;
            }
        }
        
        .story-title {
            font-size: 1.1rem;
            font-weight: 600;
            line-height: 1.4;
            color: var(--text-primary);
            text-decoration: none;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .story-title:hover {
            color: var(--accent);
        }
        
        .story-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 12px;
            font-size: 0.8rem;
        }
        
        .source-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            background: var(--bg-tertiary);
            border-radius: 4px;
            font-weight: 500;
            color: var(--text-secondary);
        }
        
        .paywall-badge {
            color: #e65100;
            font-size: 0.75rem;
            font-weight: 600;
        }
        
        .bias-badge {
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .bias-badge.left { background: rgba(59,130,246,0.15); color: var(--bias-left); }
        .bias-badge.left-center { background: rgba(96,165,250,0.15); color: var(--bias-left-center); }
        .bias-badge.center { background: rgba(107,114,128,0.15); color: var(--bias-center); }
        .bias-badge.right-center { background: rgba(248,113,113,0.15); color: var(--bias-right-center); }
        .bias-badge.right { background: rgba(239,68,68,0.15); color: var(--bias-right); }
        
        .time-badge {
            color: var(--text-muted);
            font-size: 0.75rem;
        }
        
        .covered-badge {
            background: rgba(34,197,94,0.1);
            color: #16a34a;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 600;
        }
        
        .story-excerpt {
            color: var(--text-secondary);
            font-size: 0.9rem;
            line-height: 1.5;
            margin-bottom: 16px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            flex-grow: 1;
        }
        
        .story-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 12px;
            border-top: 1px solid var(--border);
        }
        
        .story-links {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }
        
        .story-links a {
            font-size: 0.8rem;
            color: var(--accent);
            text-decoration: none;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .story-links a:hover {
            text-decoration: underline;
        }
        
        .share-btn {
            background: var(--bg-tertiary);
            border: none;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            transition: all 0.2s;
        }
        
        .share-btn:hover {
            background: var(--bg-secondary);
            transform: scale(1.1);
        }
        
        .different-angle-btn {
            background: transparent;
            border: 1px solid var(--accent);
            border-radius: 4px;
            padding: 4px 10px;
            cursor: pointer;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--accent);
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .different-angle-btn:hover {
            background: var(--accent);
            color: white;
        }
        
        /* Different Angle Modal */
        .different-angle-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            padding: 20px;
            opacity: 0;
            transition: opacity 0.25s ease;
        }

        .different-angle-modal.active {
            display: flex;
            opacity: 1;
        }

        .different-angle-content {
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            max-width: 680px;
            width: 100%;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
            transform: translateY(20px) scale(0.98);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .different-angle-modal.active .different-angle-content {
            transform: translateY(0) scale(1);
        }

        .different-angle-header {
            padding: 24px 24px 20px;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
        }

        .different-angle-header h3 {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--primary);
            margin: 0 0 6px 0;
        }

        .different-angle-header .original-story {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .different-angle-header .original-story strong {
            color: var(--text-primary);
        }

        .close-modal {
            background: var(--bg-tertiary);
            border: none;
            font-size: 1.4rem;
            cursor: pointer;
            color: var(--text-muted);
            padding: 0;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s;
        }

        .close-modal:hover {
            background: var(--border);
            color: var(--text-primary);
            transform: rotate(90deg);
        }

        .different-angle-list {
            padding: 8px 0;
        }

        .different-angle-item {
            padding: 20px 24px;
            border-bottom: 1px solid var(--border);
            transition: all 0.2s;
            position: relative;
        }

        .different-angle-item:last-child {
            border-bottom: none;
        }

        .different-angle-item:hover {
            background: var(--bg-secondary);
        }

        .different-angle-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background: var(--accent);
            opacity: 0;
            transition: opacity 0.2s;
        }

        .different-angle-item:hover::before {
            opacity: 1;
        }

        .different-angle-item a {
            color: var(--text-primary);
            text-decoration: none;
            font-weight: 600;
            font-size: 1rem;
            display: block;
            margin-bottom: 10px;
            line-height: 1.4;
        }

        .different-angle-item a:hover {
            color: var(--accent);
        }

        .different-angle-meta {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }

        .different-angle-meta .source-tag {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-weight: 500;
        }

        .different-angle-meta .bias-badge {
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .different-angle-excerpt {
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.5;
            margin-top: 8px;
        }

        .no-different-angle {
            padding: 48px 24px;
            text-align: center;
            color: var(--text-muted);
        }

        .no-different-angle svg {
            margin-bottom: 12px;
            opacity: 0.5;
        }
        
        /* Featured Section for Most Covered */
        .featured-section {
            background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
            border-radius: var(--radius-lg);
            padding: 24px;
            margin-bottom: 32px;
        }
        
        .featured-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }
        
        .featured-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .featured-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 16px;
        }
        
        .featured-card {
            background: var(--bg-primary);
            border-radius: var(--radius);
            padding: 16px;
            border: 2px solid transparent;
            transition: all 0.2s;
        }
        
        .featured-card:hover {
            border-color: var(--accent);
            box-shadow: var(--shadow-md);
        }
        
        /* Category Section */
        .category-section {
            margin-bottom: 40px;
            max-width: 100%;
            overflow-x: hidden;
        }

        @media (min-width: 1024px) {
            .category-section {
                margin-bottom: 24px;
            }
        }

        .category-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid var(--border);
        }

        @media (min-width: 1024px) {
            .category-header {
                margin-bottom: 16px;
                padding-bottom: 8px;
            }
        }
        
        .category-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary);
        }
        
        .category-count {
            color: var(--text-muted);
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        /* Footer */
        footer {
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
            margin-top: 60px;
            padding: 40px 24px;
        }
        
        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 32px;
        }
        
        .footer-section h4 {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .footer-section p, .footer-section a {
            font-size: 0.85rem;
            color: var(--text-secondary);
            text-decoration: none;
            line-height: 1.8;
        }
        
        .footer-section a:hover {
            color: var(--accent);
        }
        
        .footer-bottom {
            max-width: 1200px;
            margin: 32px auto 0;
            padding-top: 24px;
            border-top: 1px solid var(--border);
            text-align: center;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        /* Dark Mode */
        [data-theme="dark"] {
            --primary: #60a5fa;
            --primary-light: #3b82f6;
            --accent: #60a5fa;
            --text-primary: #f1f5f9;
            --text-secondary: #cbd5e1;
            --text-muted: #94a3b8;
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-tertiary: #334155;
            --border: #475569;
            --shadow: 0 1px 3px rgba(0,0,0,0.3);
            --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
        }
        
        [data-theme="dark"] .story-card {
            background: var(--bg-secondary);
        }
        
        [data-theme="dark"] .source-tag {
            background: var(--bg-tertiary);
        }
        
        [data-theme="dark"] .search-input {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            border-color: var(--border);
        }
        
        [data-theme="dark"] .search-input::placeholder {
            color: var(--text-muted);
        }
        
        [data-theme="dark"] .search-input:focus {
            background: var(--bg-secondary);
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(96,165,250,0.2);
        }

        [data-theme="dark"] #lang-select {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            border-color: var(--border);
        }

        [data-theme="dark"] #lang-select option {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }

        [data-theme="dark"] .scroll-btn {
            background: var(--bg-primary);
        }

        [data-theme="dark"] .scroll-btn:hover {
            background: var(--bg-secondary);
        }

        [data-theme="dark"] .scroll-btn svg {
            fill: var(--text-secondary);
        }

        [data-theme="dark"] .scroll-btn:hover svg {
            fill: var(--primary);
        }
        
        [data-theme="dark"] .poll-card-inline {
            background: linear-gradient(135deg, #1e3a5f 0%, #172554 100%);
            border-color: #3b82f6;
        }
        
        [data-theme="dark"] .poll-card-inline:hover {
            border-color: #60a5fa;
            box-shadow: 0 8px 16px -4px rgba(59, 130, 246, 0.3);
        }
        
        [data-theme="dark"] .poll-option-btn-inline {
            background: var(--bg-secondary);
            border-color: #3b82f6;
            color: var(--text-primary);
        }
        
        [data-theme="dark"] .poll-option-btn-inline:hover {
            background: #1e3a5f;
            border-color: #60a5fa;
        }
        
        [data-theme="dark"] .poll-result-bar-bg {
            background: #1e3a5f;
        }
        
        [data-theme="dark"] .poll-result-bar-fill {
            background: #60a5fa;
        }
        
        [data-theme="dark"] .poll-result-label {
            color: var(--text-primary);
        }
        
        [data-theme="dark"] .poll-view-full {
            color: #60a5fa;
        }
        
        /* Share Overlay */
        #share-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 2000;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .share-overlay-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
        }
        
        .share-overlay-content {
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            max-width: 400px;
            width: 90%;
            position: relative;
            box-shadow: var(--shadow-lg);
            animation: slideUp 0.3s ease;
        }
        
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .share-overlay-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            border-bottom: 1px solid var(--border);
        }
        
        .share-overlay-header h3 {
            margin: 0;
            font-size: 1.1rem;
            color: var(--text-primary);
        }
        
        .close-overlay {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-muted);
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .close-overlay:hover {
            color: var(--text-primary);
        }
        
        .share-overlay-preview {
            padding: 20px;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
        }
        
        .share-preview-text {
            margin: 0 0 8px 0;
            font-size: 0.95rem;
            color: var(--text-primary);
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .share-preview-source {
            margin: 0;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        .share-overlay-buttons {
            padding: 16px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }
        
        .share-option {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px;
            border: none;
            border-radius: var(--radius);
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.2s;
        }
        
        .share-option:hover {
            transform: translateY(-1px);
        }
        
        .share-option.twitter {
            background: #000;
            color: white;
        }
        
        .share-option.facebook {
            background: #1877F2;
            color: white;
        }
        
        .share-option.linkedin {
            background: #0A66C2;
            color: white;
        }
        
        .share-option.copy {
            background: var(--bg-tertiary);
            color: var(--text-primary);
        }
        
        .share-option.copy:hover {
            background: var(--border);
        }
        
        @media (max-width: 400px) {
            .share-overlay-buttons {
                grid-template-columns: 1fr;
            }
        }
        
        /* Ongoing Coverage - Topic Cards */
        .topics-section {
            margin-bottom: 32px;
            padding: 0;
        }

        .topics-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        .topics-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .topics-scroll {
            display: flex;
            gap: 12px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: var(--border) transparent;
            padding-bottom: 8px;
        }

        .topics-scroll::-webkit-scrollbar {
            height: 6px;
        }

        .topics-scroll::-webkit-scrollbar-track {
            background: transparent;
        }

        .topics-scroll::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 3px;
        }

        .topics-scroll::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

        .topic-card {
            flex: 0 0 auto;
            width: 260px;
            background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 16px;
            text-decoration: none;
            color: inherit;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            min-height: 100px;
        }

        .topic-card:hover {
            border-color: var(--accent);
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

        .topic-card-title {
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--primary);
            line-height: 1.3;
            margin-bottom: 6px;
        }

        .topic-card-headline {
            font-size: 0.8rem;
            color: var(--text-secondary);
            line-height: 1.4;
            flex-grow: 1;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .topic-card-arrow {
            font-size: 0.8rem;
            color: var(--accent);
            margin-top: 8px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        @media (max-width: 640px) {
            .topic-card {
                width: 220px;
                padding: 14px;
            }

            .topic-card-title {
                font-size: 0.9rem;
            }
        }

        [data-theme="dark"] .topic-card {
            background: linear-gradient(135deg, var(--bg-secondary) 0%, #1e293b 100%);
        }

        /* Collapsible coverage rows (Ongoing Coverage + Most Covered) */
        .coverage-row {
            transition: max-height 0.35s ease, opacity 0.35s ease, margin-bottom 0.35s ease;
            max-height: 600px;
            opacity: 1;
            overflow: hidden;
        }

        .coverage-row.coverage-collapsed {
            max-height: 0;
            opacity: 0;
            margin-bottom: 0 !important;
        }

        .coverage-toggle {
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            color: var(--text-primary);
            border-radius: var(--radius);
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1.2rem;
            line-height: 1;
            transition: background 0.2s, border-color 0.2s;
        }

        .coverage-toggle:hover {
            background: var(--bg-secondary);
            border-color: var(--accent);
        }

        /* Most Covered horizontal scroll row */
        .most-covered-scroll {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: var(--border) transparent;
            padding-bottom: 8px;
        }

        .most-covered-scroll::-webkit-scrollbar {
            height: 6px;
        }

        .most-covered-scroll::-webkit-scrollbar-track {
            background: transparent;
        }

        .most-covered-scroll::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 3px;
        }

        .most-covered-scroll::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

        .most-covered-card {
            flex: 0 0 auto;
            width: 320px;
            margin-bottom: 0 !important;
        }

        @media (max-width: 640px) {
            .most-covered-card {
                width: 260px;
            }
        }

        /* Cookie Banner */
        #cookie-banner {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
            padding: 16px 24px;
            z-index: 1000;
            box-shadow: var(--shadow-md);
        }
        
        #cookie-banner > div {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
        }
        
        /* Admin Link */
        .admin-link {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-top: 8px;
        }

        .admin-link a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 500;
        }

        .admin-link a:hover {
            text-decoration: underline;
        }
        
        /* Mobile-specific fixes */
        @media (max-width: 768px) {
            body {
                overflow-x: hidden;
            }
            
            main {
                padding: 0 12px;
                max-width: 100vw;
                box-sizing: border-box;
            }
            
            .header-container {
                max-width: 100vw;
                overflow-x: hidden;
            }
            
            .category-section {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                padding: 0;
                margin-left: 0;
                margin-right: 0;
            }
            
            .category-header {
                width: 100%;
                box-sizing: border-box;
            }
            
            .stories-grid {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                display: grid;
                grid-template-columns: 1fr;
                gap: 12px;
            }
            
            .story-card {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
            }
            
            .header-controls-row {
                flex-direction: column;
                align-items: stretch;
            }
            
            .bias-filters {
                max-width: 100vw;
                overflow-x: auto;
                padding-bottom: 8px;
            }
        }

/* ===== 24HourWire front-end enhancements ===== */
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

.story-image { aspect-ratio: 16 / 9; width: 100%; height: auto; }
@media (min-width: 640px) { .story-image { height: auto; } }

.story-image-link { background: var(--bg-tertiary); }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
.tab[aria-selected="true"] {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
