:root {
    --bs-primary: #64748B;
    --bs-secondary: #475569;
    --bs-success: #06B6D4;
    --bs-warning: #F59E0B;
    --bs-danger: #F43F5E;
    --bs-light: #F8FAFC;
    --bs-dark: #111827;
    --text-muted: #64748B;
    --border-subtle: #E2E8F0;
    --tagtaly-blue: #0072CC;
    --tagtaly-green: #47B881;
}

html,
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    scroll-behavior: smooth;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Newsreader', 'Georgia', serif;
    font-weight: 600;
}

/* Header & Navigation */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--bs-dark) !important;
    text-decoration: none;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    display: block;
}

.navbar-brand span {
    font-size: 1.1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.brand-tag {
    color: #999999;
    transition: color 0.3s ease;
}

.brand-taly {
    color: var(--tagtaly-blue);
    transition: color 0.3s ease;
}

.navbar-brand:hover .brand-tag {
    color: var(--tagtaly-blue);
}

.navbar-brand:hover .brand-taly {
    color: #0072CC;
    font-weight: 700;
}

.navbar-nav .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
    margin: 0 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.navbar-nav .nav-link:hover {
    color: var(--bs-primary);
}

.btn-partner {
    background-color: var(--bs-primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-partner:hover {
    background-color: #3B42D4;
    color: white;
    text-decoration: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 4rem 0;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--bs-dark);
    font-family: 'Newsreader', 'Georgia', serif;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f0f4ff;
    color: var(--bs-primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.hero-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hero-meta-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-meta-value {
    font-size: 1.125rem;
    color: var(--bs-dark);
    font-weight: 600;
}

/* Featured Image */
.featured-image {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    display: block;
}

/* Hero featured image specific sizing */
#hero-featured-image {
    min-height: 350px;
    max-height: none;
    width: 100%;
}

#hero-secondary-image {
    min-height: 350px;
    max-height: none;
    width: 100%;
}

/* Featured narrative styling */
.hero-narrative-content {
    padding: 0 0 0 1.5rem;
}

.hero-narrative-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-dark);
    line-height: 1.4;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hero-narrative-source {
    margin: 0;
    font-size: 0.875rem;
}

/* Responsive hero featured section */
@media (max-width: 992px) {
    .hero-narrative-content {
        padding: 1rem 0 0 0;
    }

    #hero-featured-image,
    #hero-secondary-image {
        min-height: 300px;
    }
}

@media (max-width: 576px) {

    #hero-featured-image,
    #hero-secondary-image {
        min-height: 250px;
        margin-top: 1rem;
    }

    .featured-image {
        margin-top: 1rem;
    }
}

/* Featured Jumbotron */
.featured-jumbotron {
    position: relative;
    min-height: 450px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #667eea;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 3rem;
}

.featured-jumbotron::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.28) 100%);
    z-index: 1;
}

.jumbotron-overlay {
    position: absolute;
    left: 1.25rem;
    right: auto;
    bottom: 1.25rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: fit-content;
    max-width: min(680px, calc(100% - 2rem));
    padding: 0.9rem 1rem;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(2px);
    color: white;
}

.jumbotron-overlay h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.jumbotron-overlay p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jumbotron-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* Social Stats Grid */
.social-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 0;
}

.social-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
    text-align: center;
    transition: all 0.3s;
}

.social-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(76, 81, 255, 0.1);
}

.social-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.social-card-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.social-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
}

.social-card-caption {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Social Handles Grid */
.social-handles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.social-handle-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border-subtle);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 120px;
}

.social-handle-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 8px 24px rgba(76, 81, 255, 0.15);
    transform: translateY(-4px);
}

.social-handle-icon {
    font-size: 3rem;
    display: block;
}

.social-handle-icon i {
    display: block;
}

.social-handle-card:hover .social-handle-icon {
    transform: scale(1.1);
}

.social-handle-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.social-handle-handle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.social-handle-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Smarticon Brand Colors */
.social-handle-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 8px 24px rgba(76, 81, 255, 0.15);
    transform: translateY(-4px);
}


@media (max-width: 576px) {
    .featured-jumbotron {
        min-height: 300px;
    }

    .jumbotron-overlay {
        left: 0.75rem;
        right: auto;
        bottom: 0.75rem;
        width: fit-content;
        max-width: calc(100% - 1.5rem);
        padding: 0.7rem 0.8rem;
    }

    .jumbotron-overlay h2 {
        font-size: 1rem;
        margin-bottom: 0.35rem;
    }

    .jumbotron-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .social-stats-grid {
        grid-template-columns: 1fr;
    }

    .social-handles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .social-handle-card {
        padding: 2rem 1.5rem;
    }

    .social-handle-icon {
        font-size: 2.5rem;
    }
}

/* Keep topic hero images sharp on mobile by disabling overlay blur */
@media (max-width: 768px) {
    #topicHeroCarousel .jumbotron-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* Breakdown Section */
.breakdown-section {
    background: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border-radius: 0.5rem;
}

.breakdown-header {
    margin-bottom: 2rem;
}

.breakdown-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.breakdown-bars {
    display: grid;
    gap: 1.5rem;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breakdown-item-label {
    min-width: 100px;
    font-weight: 600;
    color: var(--bs-dark);
}

.breakdown-item-percent {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--bs-primary);
}

.breakdown-bar {
    flex: 1;
    height: 24px;
    background-color: var(--border-subtle);
    border-radius: 9999px;
    overflow: hidden;
}

.breakdown-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background-color: var(--bs-primary);
    transition: width 0.3s ease;
    border-radius: 9999px;
}

.market-pulse-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
}

.market-pulse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.market-pulse-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.market-pulse-status {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.market-pulse-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.market-pulse-block {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-subtle);
}

.market-pulse-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--bs-dark);
}

.market-pulse-list {
    display: grid;
    gap: 0.5rem;
}

.market-pulse-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.market-pulse-hmm {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Dashboard Section */
.dashboard-section {
    padding: 4rem 0;
    border-top: 1px solid var(--border-subtle);
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-badge {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--bs-dark);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Chart Cards */
.chart-card {
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 2rem;
    height: 100%;
}

@media (max-width: 600px) {
    .chart-card {
        padding: 1rem;
    }
}

@media (max-width: 420px) {
    .chart-card {
        padding: 0.75rem;
    }
}

/* Chart Card Header - See enhanced version below with share button support */

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 1.5rem;
}

#topic-timeline-chart {
    height: 460px;
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }

    #topic-timeline-chart {
        height: 400px;
    }
}

@media (max-width: 600px) {
    .chart-container {
        height: 250px;
    }

    #topic-timeline-chart {
        height: 360px;
    }
}

@media (max-width: 420px) {
    #topic-timeline-chart {
        height: 340px;
    }
}

.chart-narrative {
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.narrative-text {
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Live Feed Section */
.live-feed-section {
    padding: 4rem 0;
    background: white;
    border-top: 1px solid var(--border-subtle);
}

.live-feed-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.live-feed-badge {
    display: inline-block;
}    /* Live Feed Section */
    .live-feed-section {
    padding: 4rem 0;
    background: white;
    border-top: 1px solid var(--border-subtle);
    }

    .live-feed-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    }

    .live-feed-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--bs-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    background-color: #f0f4ff;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe
    UI Symbol', sans-serif;
    }

    .live-feed-header h2 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--bs-dark);
    }

    .live-feed-controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    }

    @media (max-width: 768px) {
    .live-feed-controls {
    grid-template-columns: 1fr;
    }
    }

    .live-feed-advanced-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
    }

    .live-feed-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    }

    .live-feed-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    }

    .live-feed-filter-input,
    .live-feed-filter-select {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    font-size: 0.85rem;
    background: #fff;
    }

    .search-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    }

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

    .filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    }

    .filter-btn,
    .live-feed-filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-weight: 500;
    }

    .filter-btn:hover, .filter-btn.active,
    .live-feed-filter-btn:hover, .live-feed-filter-btn.active {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
    }

    /* News Grid */
    .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    }

    .news-card {
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    }

    .news-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(76, 81, 255, 0.1);
    }

    .news-card-image {
    width: 100%;
    height: 200px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: var(--border-subtle);
    }
    /* MODIFIED: 2025-12-23 - Added aspect-ratio to prevent layout shift (Codex UX improvements) */

    .news-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    }

    .news-card-category {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #f0f4ff;
    color: var(--bs-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    width: fit-content;
    }

    .news-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    font-size: 1rem;
    font-weight: 700;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
    line-height: 1.5;
    }
    /* MODIFIED: 2025-12-23 - Added -webkit-line-clamp for mobile headlines (Codex UX improvements) */
    .tagtaly-headline {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    white-space: normal;
    }
    .summary-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    }

    .news-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    }

    .news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-muted);
    }

    .news-card-link {
    background-color: var(--bs-primary);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background-color 0.2s;
    }

    .news-card-link:hover {
    background-color: #3B42D4;
    text-decoration: none;
    }

    /* Sponsorship Ad Placeholders */
    .sponsorship-placeholder {
    display: block;
    min-height: 250px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    }

    .sponsorship-placeholder-text {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    }

    .sponsorship-placeholder-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 0.5rem;
    }

    @media (max-width: 768px) {
    .sponsorship-placeholder {
    min-height: 200px;
    }
    }

    @media (max-width: 480px) {
    .sponsorship-placeholder {
    min-height: 150px;
    }
    }

    /* Footer */
    .site-footer {
    background-color: #111827;
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 4px solid var(--tagtaly-blue);
    }

    .site-footer a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.2s;
    }

    .site-footer a:hover {
    color: #3B42D4;
    }

    .footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
    }

    @media (max-width: 768px) {
    .footer-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    }
    }

    .footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }

    .footer-meta {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    }

    .footer-links {
    display: flex;
    gap: 1.5rem;
    }

    .footer-links a {
    font-size: 1.25rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    }

    .footer-links a:hover {
    background-color: var(--bs-primary);
    color: white !important;
    transform: scale(1.15);
    }

    /* Responsive Typography */
    @media (max-width: 768px) {
    .hero-title {
    font-size: 2rem;
    }

    .hero-subtitle {
    font-size: 1rem;
    }

    .section-header h2 {
    font-size: 1.5rem;
    }

    .live-feed-header {
    flex-direction: column;
    align-items: flex-start;
    }
    }

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

    .sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
    }

    /* Loading Spinner */
    .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-subtle);
    border-radius: 50%;
    border-top-color: var(--bs-primary);
    animation: spin 0.6s linear infinite;
    }

    @keyframes spin {
    to { transform: rotate(360deg); }
    }

    /* Accordion Feed Styles (Bootstrap accordion with images) */
    [data-live-feed].accordion {
    border: none;
    }

    [data-live-feed] .accordion-item {
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    }

    [data-live-feed] .accordion-item:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(76, 81, 255, 0.1);
    }

    [data-live-feed] .accordion-button {
    padding: 1.25rem;
    border: none;
    background: white;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    transition: background-color 0.2s;
    }

    [data-live-feed] .accordion-button:not(.collapsed) {
    background-color: #f8fafc;
    box-shadow: none;
    }

    [data-live-feed] .accordion-button:focus {
    border-color: var(--bs-primary);
    box-shadow: none;
    }

    [data-live-feed] .accordion-header-content {
    flex: 1;
    text-align: left;
    min-width: 0;
    }

    [data-live-feed] .live-feed-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 700;
    color: var(--bs-dark);
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    word-break: break-word;
    }
    /* MODIFIED: 2025-12-23 - Added -webkit-line-clamp for 2-line headlines on mobile (Codex UX improvements) */

    [data-live-feed] .live-feed-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
    }

    [data-live-feed] .accordion-body {
    padding: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    }

    [data-live-feed] .live-feed-body-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    [data-live-feed] .live-feed-image-frame {
    position: relative;
    }

    [data-live-feed] .live-feed-image-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.58);
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.3;
    border-radius: 0 0 0.5rem 0.5rem;
    display: none;
    }

    [data-live-feed] .live-feed-image-frame.is-placeholder .live-feed-image-title {
    display: block;
    }

    [data-live-feed] .live-feed-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    }

    [data-live-feed] .live-feed-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    }

    [data-live-feed] .live-feed-source {
    font-size: 0.875rem;
    color: var(--text-muted);
    }

    [data-live-feed] .live-feed-read-more {
    background-color: var(--bs-primary);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.2s;
    }

    [data-live-feed] .live-feed-read-more:hover {
    background-color: #3B42D4;
    color: white;
    text-decoration: none;
    }

    /* Mobile responsive */
    @media (max-width: 576px) {
    [data-live-feed] .accordion-button {
    padding: 0.75rem;
    gap: 0.75rem;
    }

    [data-live-feed] .live-feed-thumbnail {
    width: 80px;
    height: 60px;
    }

    [data-live-feed] .live-feed-title {
    font-size: 0.95rem;
    }

    [data-live-feed] .accordion-body {
    padding: 1rem;
    }
    }

    /* Featured Article (in live feed section) */
    #live-feed-featured {
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    }

    .live-feed-featured-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    background-color: var(--border-subtle);
    }

    /* Featured Article Card */
    .live-feed-featured-card {
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 0.875rem;
    padding: clamp(1rem, 2vw, 2rem);
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    }

    .live-feed-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bs-primary);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    z-index: 2;
    }

    .live-feed-featured-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    max-height: 400px;
    border-radius: 0.75rem;
    margin-bottom: 0;
    background-color: var(--border-subtle);
    overflow: hidden;
    }

    .live-feed-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    }

    .live-feed-featured-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    }

    .live-feed-featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    }

    .live-feed-featured-headline {
    font-family: 'Newsreader', 'Georgia', serif;
    display: block;
    font-size: clamp(1.3rem, 2.2vw, 1.9rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--bs-dark);
    text-decoration: none;
    margin-bottom: 0.75rem;
    text-wrap: balance;
    }

    .live-feed-featured-headline:hover {
    color: var(--bs-primary);
    }

    .live-feed-featured-summary {
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    }

    .live-feed-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    }

    .live-feed-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bs-light);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    }

    .live-feed-tag--topic {
    background: var(--bs-primary);
    color: white;
    }

    .live-feed-tag--sentiment-positive {
    background: var(--bs-success);
    color: white;
    }

    .live-feed-tag--sentiment-negative {
    background: var(--bs-danger);
    color: white;
    }

    .live-feed-tag--sentiment-neutral {
    background: #e2e8f0;
    }

    .live-feed-tag--urgent {
    background: var(--bs-danger);
    color: white;
    }

    .live-feed-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    }

    @media (min-width: 992px) {
    .live-feed-featured-card {
    display: grid;
    grid-template-columns: minmax(320px, 44%) minmax(0, 1fr);
    column-gap: 1.25rem;
    row-gap: 0.75rem;
    align-items: start;
    }

    .live-feed-featured-image {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 0.25rem;
    min-height: 260px;
    max-height: 420px;
    }

    .live-feed-featured-content {
    grid-column: 2;
    grid-row: 1 / span 2;
    }
    }

    .live-feed-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bs-light);
    border: 1px solid var(--border-subtle);
    border-radius: 0.25rem;
    color: var(--bs-dark);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    }

    .live-feed-action-btn:hover {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
    }

    .live-feed-action-btn.active {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
    }

    /* Mobile responsive */
    @media (max-width: 768px) {
    [data-live-feed] li {
    grid-template-columns: 1fr;
    }

    [data-live-feed] .live-feed-image {
    width: 100%;
    height: 200px;
    }

    .live-feed-featured-card {
    padding: 1rem;
    gap: 0.75rem;
    }

    .live-feed-featured-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-bottom: 0.1rem;
    }

    .live-feed-featured-image {
    min-height: 190px;
    max-height: none;
    }

    .live-feed-featured-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
    }

    .live-feed-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
    }

    .live-feed-action-btn {
    flex: 1 1 auto;
    justify-content: center;
    }
    }

    /* Chart Share Button Styles */
    .chart-share-container {
    position: relative;
    }

    .chart-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-subtle);
    background: white;
    color: var(--text-muted);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    padding: 0;
    margin-left: 0.5rem;
    }

    .chart-share-btn:hover {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    background: rgba(76, 81, 255, 0.05);
    }

    .chart-share-btn.copied {
    color: #22c55e;
    border-color: #22c55e;
    }

    .chart-share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 160px;
    max-width: calc(100vw - 2rem);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 13px rgba(0, 0, 0, 0.05);
    display: none;
    z-index: 1000;
    }

    .chart-share-menu.active {
    display: block;
    }

    .share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    cursor: pointer;
    }

    .share-option:hover {
    background: var(--bs-light);
    color: var(--bs-primary);
    }

    .share-option i {
    width: 16px;
    text-align: center;
    }

    .chart-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    overflow: visible;
    position: relative;
    }

    .chart-card-header > div:first-child {
    flex: 1;
    }

    .chart-card-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--bs-dark);
    }

    .chart-card-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    }

    @media (max-width: 600px) {
    .chart-card-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    overflow: visible;
    }

    .chart-share-container {
    align-self: flex-end;
    position: relative;
    z-index: 1001;
    }

    .chart-share-menu {
    position: absolute;
    right: 0;
    left: auto;
    top: 100%;
    }

    .chart-card-header h3 {
    font-size: 1.1rem;
    }

    .chart-card-header p {
    font-size: 0.8rem;
    }
    }

    @media (max-width: 576px) {
    .chart-share-menu {
    z-index: 1001 !important;
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 130px !important;
    max-width: 130px !important;
    width: 130px !important;
    padding: 0.35rem 0 !important;
    }

    .chart-share-container {
    position: relative;
    align-self: stretch;
    display: flex;
    justify-content: flex-end;
    }

    .share-option {
    white-space: normal;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
    gap: 0.5rem !important;
    }

    .share-option svg {
    width: 12px !important;
    height: 12px !important;
    }

    .chart-share-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
    }
    }

    /* Lucide Icon Styles */
    .lucide-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.4rem;
    }

    .btn .lucide-icon {
    margin-right: 0.35rem;
    }

    /* Dashboard Crossword Grid Styles */
    #dashboard-crossword-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    grid-gap: 1px;
    background: #333;
    padding: 0;
    max-width: 520px;
    margin: 2rem auto;
    }

    #dashboard-crossword-grid .cell {
    aspect-ratio: 1;
    background: white;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    user-select: none;
    font-family: 'Courier New', monospace;
    transition: all 0.15s ease;
    }

    #dashboard-crossword-grid .cell:hover:not(.cell.black):not(.cell.disabled) {
    background: #f5f5f5;
    }

    #dashboard-crossword-grid .cell.black {
    background: #000;
    border-color: #000;
    cursor: default;
    }

    #dashboard-crossword-grid .cell.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    }

    #dashboard-crossword-grid .cell.selected {
    background: #FFD700;
    box-shadow: inset 0 0 0 2px #F59E0B;
    }

    #dashboard-crossword-grid .cell.highlight {
    background: #FEE2E2;
    }

    #dashboard-crossword-grid .cell.correct {
    background: #DCFCE7;
    color: #059669;
    }

    #dashboard-crossword-grid .cell.incorrect {
    background: #FECACA;
    color: #DC2626;
    }

    #dashboard-crossword-grid .cell.solved {
    background: #f0f0f0;
    cursor: default;
    }

    #dashboard-crossword-grid .cell-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.5rem;
    font-weight: 600;
    color: #666;
    font-family: 'Inter', sans-serif;
    }

    #dashboard-crossword-grid .cell-content {
    font-size: 0.9rem;
    font-weight: 700;
    }

    /* Solved Puzzle Grid Styling */
    #dashboard-crossword-solved-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    grid-gap: 1px;
    background: #333;
    padding: 0;
    max-width: 520px;
    margin: 2rem auto;
    }

    #dashboard-crossword-solved-grid .cell {
    aspect-ratio: 1;
    background: white;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: default;
    position: relative;
    user-select: none;
    font-family: 'Courier New', monospace;
    transition: all 0.15s ease;
    }

    #dashboard-crossword-solved-grid .cell.black {
    background: #000;
    border-color: #000;
    cursor: default;
    }

    #dashboard-crossword-solved-grid .cell.solved {
    background: #f0f0f0;
    cursor: default;
    }

    #dashboard-crossword-solved-grid .cell-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.5rem;
    font-weight: 600;
    color: #666;
    font-family: 'Inter', sans-serif;
    }

    #dashboard-crossword-solved-grid .cell-content {
    font-size: 0.9rem;
    font-weight: 700;
    }

    /* Crossword Carousel Styles */
    /* Bootstrap Crossword Carousel Styles */
    .crossword-carousel-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    }

    /* Crossword Puzzle Section */
    .crossword-puzzle-section {
    margin: 0 auto;
    max-width: 700px;
    width: 100%;
    }

    .crossword-puzzle-container {
    border-radius: 0.5rem;
    overflow: hidden;
    min-height: 600px;
    background: white;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    }

    #dashboard-crossword-grid,
    #dashboard-crossword-solved-grid {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    }

    #dashboard-crossword-grid .cell,
    #dashboard-crossword-solved-grid .cell {
    font-size: 14px;
    min-width: 30px;
    min-height: 30px;
    }

    /* Wordsearch Puzzle Section */
    .wordsearch-grid {
    --wordsearch-size: 15;
    display: grid;
    grid-template-columns: repeat(var(--wordsearch-size), 1fr);
    gap: 0.35rem;
    max-width: 520px;
    margin: 1rem auto 0;
    touch-action: none;
    }

    .wordsearch-cell {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--bs-dark);
    text-transform: uppercase;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
    user-select: none;
    }

    .wordsearch-cell.selected {
    background: #fef3c7;
    border-color: #f59e0b;
    }

    .wordsearch-cell.found {
    background: #d1fae5;
    border-color: #10b981;
    color: #0f766e;
    }

    .wordsearch-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem 1.5rem;
    }

    .wordsearch-word {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: var(--bs-light);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    }

    .wordsearch-word.found {
    background: #d1fae5;
    color: #0f766e;
    text-decoration: line-through;
    }

    @media (max-width: 768px) {
    .wordsearch-grid {
    max-width: 100%;
    gap: 0.2rem;
    padding: 0 0.5rem;
    }

    .wordsearch-cell {
    font-size: 0.7rem;
    border-radius: 0.3rem;
    }

    .wordsearch-words {
    padding: 0.75rem 1rem 1rem;
    justify-content: center;
    }

    .wordsearch-word {
    font-size: 0.75rem;
    }
    }

    @media (max-width: 480px) {
    .wordsearch-cell {
    font-size: 0.65rem;
    }
    }

    .wordsearch-status {
    margin: 1rem auto 0;
    max-width: 520px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    }

    .puzzle-indicators {
    position: static;
    margin-top: 2rem;
    padding: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    gap: 12px;
    }

    .puzzle-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #D1D5DB;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    }

    .puzzle-dot.active {
    background-color: var(--bs-primary);
    width: 24px;
    border-radius: 4px;
    }

    .puzzle-dot:hover {
    background-color: #9CA3AF;
    }

    /* Mobile optimized spacing for puzzle carousel */
    @media (max-width: 768px) {
    .crossword-puzzle-container {
    padding: 1.5rem 1rem;
    min-height: auto;
    }

    .puzzle-indicators {
    margin-top: 1rem;
    gap: 10px;
    }
    }

    @media (max-width: 480px) {
    .crossword-puzzle-container {
    padding: 1rem 0.75rem;
    min-height: auto;
    }

    .puzzle-indicators {
    margin-top: 0.75rem;
    gap: 8px;
    }

    .puzzle-dot {
    width: 10px;
    height: 10px;
    }

    .puzzle-dot.active {
    width: 20px;
    }
    }

    /* Carousel hint styling */
    .carousel-hint {
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 0.5rem;
    margin: 0 auto 2rem auto;
    max-width: 600px;
    font-size: 0.9rem;
    color: #78350F;
    border-left: 4px solid #F59E0B;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    }

    .carousel-hint svg {
    width: 20px;
    height: 20px;
    display: inline-block;
    animation: slideRight 0.8s ease-out infinite;
    }

    @keyframes slideRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
    }

    /* Dashboard Clues Styling */
    .clue-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    }

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

    .clue-item:hover {
    background: var(--bs-light);
    padding-left: 0.5rem;
    }

    .clue-item.active {
    background: #FEF3C7;
    color: var(--bs-dark);
    font-weight: 600;
    }

    /* Responsive crossword carousel for tablets */
    @media (max-width: 1024px) {
    #dashboard-crossword-grid,
    #dashboard-crossword-solved-grid {
    max-width: 500px;
    font-size: 14px;
    }

    #dashboard-crossword-grid .cell,
    #dashboard-crossword-solved-grid .cell {
    min-width: 28px;
    min-height: 28px;
    }

    #crosswordCarousel .carousel-item {
    height: 500px;
    padding: 1.5rem;
    }

    #crosswordCarousel .carousel-inner {
    min-height: 500px;
    }
    }

    /* Responsive crossword carousel for mobile */
    @media (max-width: 768px) {
    #dashboard-crossword-grid,
    #dashboard-crossword-solved-grid {
    max-width: 400px;
    font-size: 12px;
    }

    #dashboard-crossword-grid .cell,
    #dashboard-crossword-solved-grid .cell {
    min-width: 25px;
    min-height: 25px;
    }

    #dashboard-crossword-grid .cell-number,
    #dashboard-crossword-solved-grid .cell-number {
    font-size: 8px;
    }

    #crosswordCarousel .carousel-item {
    height: 450px;
    padding: 1rem;
    }

    #crosswordCarousel .carousel-inner {
    min-height: 450px;
    }

    #crosswordCarousel .carousel-control-prev,
    #crosswordCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    margin: 0 0.5rem;
    }
    }

    @media (max-width: 480px) {
    #dashboard-crossword-grid,
    #dashboard-crossword-solved-grid {
    max-width: 350px;
    font-size: 11px;
    }

    #dashboard-crossword-grid .cell,
    #dashboard-crossword-solved-grid .cell {
    min-width: 22px;
    min-height: 22px;
    }

    #dashboard-crossword-grid .cell:hover:not(.cell.black):not(.cell.disabled),
    #dashboard-crossword-solved-grid .cell:hover:not(.cell.black):not(.cell.disabled) {
    border-color: rgba(100, 116, 139, 0.3);
    }

    #crosswordCarousel .carousel-item {
    height: 400px;
    padding: 0.75rem;
    }

    #crosswordCarousel .carousel-inner {
    min-height: 400px;
    }

    .carousel-hint {
    font-size: 0.8rem;
    }
    }

    /* Mobile optimized puzzle controls */
    @media (max-width: 768px) {
    .crossword-puzzle-section > div[style*="display: flex"] {
    padding: 0 0.5rem;
    }

    .crossword-puzzle-section .btn {
    flex: 1;
    min-width: 90px;
    padding: 0.6rem 0.75rem !important;
    font-size: 0.9rem;
    }

    .crossword-puzzle-section .btn .lucide-icon {
    width: 14px;
    height: 14px;
    }
    }

    @media (max-width: 480px) {
    .crossword-puzzle-section > div[style*="display: flex"] {
    gap: 0.5rem;
    padding: 0 0.25rem;
    }

    .crossword-puzzle-section .btn {
    flex: 1;
    min-width: 70px;
    padding: 0.5rem 0.5rem !important;
    font-size: 0.8rem;
    }

    .crossword-puzzle-section .btn .lucide-icon {
    width: 12px;
    height: 12px;
    margin-right: 0.2rem;
    }
    }

    /* Dark mode support */
    @media (prefers-color-scheme: dark) {
    #dashboard-crossword-grid .cell {
    background: #3a3a3a;
    border-color: #666;
    color: #e0e0e0;
    }

    #dashboard-crossword-grid .cell:hover:not(.cell.black):not(.cell.disabled) {
    background: #454545;
    }

    .clue-item {
    border-color: #444;
    }

    .clue-item:hover {
    background: #2a2a2a;
    }
    }

    /* Animated Ellipsis for Loading States */
    .loading-text {
    display: inline-block;
    }

    .loading-text::after {
    content: '...';
    animation: ellipsis-dots 1.5s steps(4, end) infinite;
    }

    @keyframes ellipsis-dots {
    0%, 20% {
    content: '';
    }
    40% {
    content: '.';
    }
    60% {
    content: '..';
    }
    80%, 100% {
    content: '...';
    }
    }

    /* Fade out animation for loading states */
    .loading-state-hide {
    animation: fadeOut 0.3s ease-out forwards;
    }

    @keyframes fadeOut {
    from {
    opacity: 1;
    visibility: visible;
    }
    to {
    opacity: 0;
    visibility: hidden;
    }
    }

    /* Loading spinner with smooth animation */
    .spinner-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
    }
        /* Footer */
        .site-footer {
            background-color: #111827;
            color: white;
            padding: 3rem 0;
            margin-top: 4rem;
            border-top: 4px solid var(--tagtaly-blue);
        }

        .site-footer a {
            color: var(--bs-primary);
            text-decoration: none;
            transition: color 0.2s;
        }

        .site-footer a:hover {
            color: #3B42D4;
        }

        .footer-content {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 2rem;
            align-items: start;
        }

        @media (max-width: 768px) {
            .footer-content {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
        }

        .footer-title {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .footer-meta {
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 0.5rem;
        }

        .footer-links {
            display: flex;
            gap: 1.5rem;
        }

        .footer-links a {
            font-size: 1.25rem;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.1);
        }

        .footer-links a:hover {
            background-color: var(--bs-primary);
            color: white !important;
            transform: scale(1.15);
        }

    /* Read More/Read Less Functionality */
    .article-summary {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.5;
        max-height: 4.5em;
        transition: max-height 0.3s ease-in-out, -webkit-line-clamp 0.3s ease-in-out;
    }

    .article-summary.expanded,
    .line-clamp-3.expanded {
        display: block;
        -webkit-line-clamp: unset;
        max-height: none;
        overflow: visible;
    }

    .read-more-btn {
        color: var(--bs-primary);
        text-decoration: none;
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.875rem;
        margin-top: 0.5rem;
        transition: color 0.2s ease;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        font-family: inherit;
    }

    .read-more-btn:hover {
        color: var(--bs-secondary);
    }

    .read-more-btn:focus {
        outline: 2px solid var(--bs-primary);
        outline-offset: 2px;
        border-radius: 0.25rem;
    }

    .read-more-btn svg {
        width: 16px;
        height: 16px;
        transition: transform 0.2s ease;
    }

/* ============================================
   Lazy Loading Styles
   ============================================ */

/* Placeholder blur-up effect while loading */
img.lazy-loading {
  opacity: 0.5;
  filter: blur(8px);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Image loaded successfully */
img.lazy-loaded {
  opacity: 1;
  filter: blur(0);
}

/* Fallback to placeholder on error */
img.lazy-error {
  opacity: 1;
}

/* Show placeholder immediately on slow connections */
img.show-placeholder {
  display: none;
}

img.show-placeholder + .image-placeholder {
  display: block;
}

/* Hero image transitions */
.hero-image {
  transition: background-image 0.8s ease-in-out;
}

/* Live feed image frame styling */
.live-feed-image-frame {
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
}

.live-feed-image-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.live-feed-featured-image.live-feed-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Smooth fade-in for images */
.live-feed-image-frame.is-placeholder {
  background-color: #e8e8e8;
}

.live-feed-image-frame.is-placeholder img {
  opacity: 0.8;
}

.live-feed-image-title {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  font-size: 0.875rem;
  line-height: 1.3;
  font-weight: 500;
}

.live-feed-image-frame.is-placeholder .live-feed-image-title {
  display: block;
}

/* Reduce motion for users with preference */
@media (prefers-reduced-motion: reduce) {
  img.lazy-loading,
  img.lazy-loaded,
  .hero-image,
  .live-feed-image-frame img {
    transition: none;
  }
}
