/** * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * 
 * Ancestry Publications Details - Cinematic View
 * Dark cinematic theme with gold accents for publication detail pages.
 */

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    --pub-bg-dark: #0a0a0a;
    --pub-bg-dark-alt: #1a1a1a;
    --pub-bg-light: #f8f5f0;
    --pub-bg-parchment: #f5efe6;
    --pub-accent: #d4a017;
    --pub-accent-light: #f5c85d;
    --pub-accent-dark: #b8860b;
    --pub-text-light: #ffffff;
    --pub-text-dark: #1a1a1a;
    --pub-text-muted: #6c757d;
    --pub-border-light: rgba(212, 160, 23, 0.2);
    --pub-border-dark: rgba(255, 255, 255, 0.1);
    --pub-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --pub-radius: 12px;
    --pub-font-display: 'Cormorant Garamond', serif;
    --pub-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   SKIP LINK (Accessibility)
   ======================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--pub-accent);
    color: var(--pub-text-dark);
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.3s;
    border-radius: 0 0 var(--pub-radius) 0;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--pub-accent-light);
}

/* ========================================
   PAGE NAVIGATION DOTS
   ======================================== */

.pub-page-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pub-page-nav a {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.pub-page-nav a::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--pub-bg-dark);
    color: var(--pub-text-light);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--pub-font-body);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.pub-page-nav a:hover::before {
    opacity: 1;
}

.pub-page-nav a:hover,
.pub-page-nav a.active {
    background: var(--pub-accent);
    border-color: var(--pub-accent-light);
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .pub-page-nav {
        display: none;
    }
}

/* ========================================
   MAIN PAGE CONTAINER
   ======================================== */

.pub-cinematic-page {
    background: var(--pub-bg-dark);
    min-height: 100vh;
}

/* ========================================
   HERO SECTION
   ======================================== */

.pub-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pub-bg-dark) 0%, var(--pub-bg-dark-alt) 100%);
    overflow: hidden;
}

.pub-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--pub-bg-dark) 70%);
    pointer-events: none;
}

.pub-hero-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

.pub-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.pub-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 160, 23, 0.15);
    border: 1px solid var(--pub-accent);
    color: var(--pub-accent);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-family: var(--pub-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
}

.pub-hero-title {
    font-family: var(--pub-font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--pub-text-light);
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.pub-hero-subtitle {
    font-family: var(--pub-font-body);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .pub-hero-subtitle {
        color: rgba(255, 255, 255, 0.85); /* Better contrast on mobile */
    }
}

/* Hero Stats */
.pub-hero-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.pub-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.pub-stat i {
    font-size: 1.25rem;
    color: var(--pub-accent);
    margin-bottom: 0.5rem;
}

.pub-stat-value {
    font-family: var(--pub-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pub-text-light);
}

.pub-stat-label {
    font-family: var(--pub-font-body);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Actions */
.pub-hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pub-btn-primary,
.pub-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 30px;
    font-family: var(--pub-font-body);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.pub-btn-primary {
    background: linear-gradient(135deg, var(--pub-accent) 0%, var(--pub-accent-dark) 100%);
    color: var(--pub-text-dark);
    box-shadow: 0 4px 20px rgba(212, 160, 23, 0.3);
}

.pub-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 160, 23, 0.4);
    color: var(--pub-text-dark);
    text-decoration: none;
}

.pub-btn-secondary {
    background: transparent;
    color: var(--pub-text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pub-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--pub-accent);
    color: var(--pub-accent);
    text-decoration: none;
}

/* Scroll Indicator */
.pub-scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--pub-font-body);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
}

.pub-scroll-indicator i {
    font-size: 1.25rem;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ========================================
   SECTION STYLES
   ======================================== */

.pub-section {
    padding: 6rem 0;
    position: relative;
}

.pub-section-light {
    background: var(--pub-bg-light);
    color: var(--pub-text-dark);
}

.pub-section-dark {
    background: linear-gradient(180deg, var(--pub-bg-dark) 0%, var(--pub-bg-dark-alt) 100%);
    color: var(--pub-text-light);
}

.pub-section-analysis {
    background: linear-gradient(180deg, #0d0d0d 0%, #141414 50%, #0d0d0d 100%);
    color: var(--pub-text-light);
}

/* Section Header */
.pub-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-chapter {
    display: inline-block;
    font-family: var(--pub-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--pub-accent);
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--pub-accent);
    border-radius: 4px;
}

.pub-section-title {
    font-family: var(--pub-font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.pub-section-light .pub-section-title {
    color: var(--pub-text-dark);
}

.pub-section-dark .pub-section-title,
.pub-section-analysis .pub-section-title {
    color: var(--pub-text-light);
}

.pub-section-lead {
    font-family: var(--pub-font-body);
    font-size: 1.1rem;
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .pub-section-dark .pub-section-lead,
    .pub-section-analysis .pub-section-lead {
        opacity: 0.85; /* Better contrast on mobile */
    }
    
    .pub-section-light .pub-section-lead {
        opacity: 0.75; /* Better contrast on mobile */
    }
}

/* ========================================
   DETAILS SECTION - METADATA STRIP
   ======================================== */

.pub-metadata-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: #fff;
    border-radius: var(--pub-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.pub-metadata-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--pub-bg-parchment);
    border-radius: 50px;
    border: 1px solid rgba(212, 160, 23, 0.15);
    transition: all 0.3s ease;
}

.pub-metadata-item:hover {
    border-color: var(--pub-accent);
    box-shadow: 0 2px 12px rgba(212, 160, 23, 0.15);
}

.pub-metadata-link:hover {
    transform: translateY(-2px);
}

.pub-metadata-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pub-accent) 0%, var(--pub-accent-dark) 100%);
    color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}

.pub-metadata-icon i {
    font-size: 0.85rem;
}

.pub-metadata-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.pub-metadata-label {
    font-family: var(--pub-font-body);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pub-text-muted);
}

.pub-metadata-value {
    font-family: var(--pub-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pub-text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pub-metadata-value i {
    font-size: 0.7rem;
    opacity: 0.6;
}

.pub-metadata-link .pub-metadata-value {
    color: var(--pub-accent-dark);
}

.pub-metadata-link .pub-metadata-value:hover {
    color: var(--pub-accent);
}

/* ========================================
   DETAILS SECTION - AUTHORS PANEL
   ======================================== */

.pub-authors-panel {
    background: #fff;
    border-radius: var(--pub-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--pub-accent);
    position: relative;
    overflow: hidden;
}

.pub-authors-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.pub-authors-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.pub-authors-header h3 {
    font-family: var(--pub-font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--pub-accent-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pub-authors-header h3 i {
    font-size: 0.9rem;
    color: var(--pub-accent);
}

.pub-authors-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--pub-bg-parchment);
    border: 1px solid rgba(212, 160, 23, 0.2);
    border-radius: 20px;
    font-family: var(--pub-font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pub-accent-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pub-authors-toggle:hover {
    background: var(--pub-accent);
    color: #fff;
    border-color: var(--pub-accent);
}

.pub-authors-toggle i {
    transition: transform 0.3s ease;
}

.pub-authors-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.pub-authors-toggle[aria-expanded="true"] .toggle-text::before {
    content: 'Show less';
}

.pub-authors-toggle[aria-expanded="true"] .toggle-text {
    font-size: 0;
}

.pub-authors-toggle[aria-expanded="true"] .toggle-text::before {
    font-size: 0.8rem;
}

.pub-authors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.pub-author-chip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    background: var(--pub-bg-parchment);
    border: 1px solid rgba(212, 160, 23, 0.12);
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: default;
}

.pub-author-chip:hover {
    background: #fff;
    border-color: var(--pub-accent);
    box-shadow: 0 2px 12px rgba(212, 160, 23, 0.15);
    transform: translateY(-2px);
}

.pub-author-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pub-accent) 0%, var(--pub-accent-dark) 100%);
    color: #fff;
    border-radius: 50%;
    font-family: var(--pub-font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.pub-author-avatar-more {
    background: var(--pub-bg-dark);
    font-size: 0.65rem;
}

.pub-author-name {
    font-family: var(--pub-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--pub-text-dark);
    white-space: nowrap;
}

.pub-author-more {
    cursor: pointer;
    background: transparent;
    border-color: var(--pub-accent);
}

.pub-author-more:hover {
    background: var(--pub-accent);
}

.pub-author-more:hover .pub-author-avatar-more {
    background: #fff;
    color: var(--pub-accent-dark);
}

.pub-author-more:hover .pub-author-name {
    color: #fff;
}

/* Expanded authors section */
.pub-authors-expanded {
    display: none;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(212, 160, 23, 0.2);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.4s ease;
}

.pub-authors-expanded.show {
    display: flex;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Legacy styles - kept for backwards compatibility */
.pub-link {
    color: var(--pub-accent-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pub-link:hover {
    color: var(--pub-accent);
    text-decoration: underline;
}

/* External Links */
.pub-external-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pub-external-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--pub-border-light);
    border-radius: 30px;
    font-family: var(--pub-font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pub-text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pub-external-btn:hover {
    background: var(--pub-accent);
    border-color: var(--pub-accent);
    color: var(--pub-text-dark);
    text-decoration: none;
}

.pub-external-btn i {
    color: var(--pub-accent);
    transition: color 0.3s ease;
}

.pub-external-btn:hover i {
    color: var(--pub-text-dark);
}

/* ========================================
   ABSTRACT SECTION
   ======================================== */

.pub-abstract-content {
    max-width: 1100px;
    margin: 0 auto;
}

.pub-abstract-quote {
    position: relative;
    padding: 2.5rem 2rem;
    margin: 0;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--pub-radius);
    border-left: 4px solid var(--pub-accent);
}

.pub-quote-icon {
    position: static;
    display: block;
    font-size: 2rem;
    color: var(--pub-accent);
    opacity: 0.5;
    margin-bottom: 0.75rem;
}

.pub-abstract-quote p {
    font-family: var(--pub-font-body);
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ========================================
   SAMPLES TABLE
   ======================================== */

.pub-samples-panel {
    background: #fff;
    border-radius: var(--pub-radius);
    overflow: hidden;
    box-shadow: var(--pub-shadow);
}

.pub-section-dark .pub-samples-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pub-samples-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pub-section-dark .pub-samples-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.pub-samples-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--pub-accent) 0%, var(--pub-accent-dark) 100%);
    color: var(--pub-text-dark);
    border-radius: 20px;
    font-family: var(--pub-font-body);
    font-size: 0.85rem;
    font-weight: 600;
}

.pub-table-wrapper {
    overflow-x: auto;
}

.pub-samples-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--pub-font-body);
}

.pub-samples-table thead th {
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    background: rgba(212, 160, 23, 0.1);
    border-bottom: 2px solid var(--pub-accent);
}

.pub-section-light .pub-samples-table thead th {
    color: var(--pub-text-dark);
}

.pub-section-dark .pub-samples-table thead th {
    color: var(--pub-text-light);
    background: rgba(212, 160, 23, 0.15);
}

.pub-samples-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease;
}

.pub-section-dark .pub-samples-table tbody tr {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.pub-samples-table tbody tr:hover {
    background: rgba(212, 160, 23, 0.05);
}

.pub-samples-table tbody td {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    vertical-align: middle;
}

.pub-section-light .pub-samples-table tbody td {
    color: var(--pub-text-dark);
}

.pub-section-dark .pub-samples-table tbody td {
    color: var(--pub-text-light);
}

.pub-sample-link {
    color: var(--pub-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pub-sample-link:hover {
    color: var(--pub-accent-dark);
    text-decoration: underline;
}

.pub-date-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(212, 160, 23, 0.1);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--pub-accent);
}

.pub-sex-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

.pub-sex-badge.male {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.pub-sex-badge.female {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.pub-sex-badge.unknown {
    background: rgba(149, 165, 166, 0.15);
    color: #95a5a6;
}

.pub-haplogroup {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    padding: 0.15rem 0.4rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.pub-section-dark .pub-haplogroup {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pub-accent-light);
}

/* DataTables Override */
.pub-samples-panel .dataTables_wrapper {
    padding: 1rem;
}

.pub-samples-panel .dataTables_filter input {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(212, 160, 23, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pub-samples-panel .dataTables_filter input:focus {
    outline: none;
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
}

.pub-samples-panel .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 2px !important;
}

.pub-samples-panel .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--pub-accent) 0%, var(--pub-accent-dark) 100%) !important;
    border-color: transparent !important;
    color: var(--pub-text-dark) !important;
}

/* ========================================
   ANALYSIS SECTION
   ======================================== */

.pub-analysis-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.3);
    border-radius: var(--pub-radius);
    margin-bottom: 3rem;
}

.pub-analysis-disclaimer i {
    font-size: 1.25rem;
    color: var(--pub-accent);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.pub-analysis-disclaimer p {
    font-family: var(--pub-font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
}

/* Skeleton Loading */
.pub-analysis-skeleton {
    display: grid;
    gap: 1.5rem;
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--pub-radius);
    padding: 1.5rem;
}

.skeleton-header {
    width: 40%;
    height: 24px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-line {
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.05) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pending State */
.pub-analysis-pending {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(212, 160, 23, 0.3);
    border-radius: var(--pub-radius);
}

.pub-pending-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 160, 23, 0.1);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.pub-pending-icon i {
    font-size: 2rem;
    color: var(--pub-accent);
}

.pub-analysis-pending h3 {
    font-family: var(--pub-font-display);
    font-size: 1.75rem;
    color: var(--pub-text-light);
    margin-bottom: 1rem;
}

.pub-analysis-pending p {
    font-family: var(--pub-font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Analysis Content */
.pub-analysis-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.pub-analysis-category {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pub-radius);
    overflow: hidden;
}

.pub-analysis-category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(212, 160, 23, 0.1);
    border-bottom: 1px solid rgba(212, 160, 23, 0.2);
}

.pub-analysis-category-header i {
    font-size: 1.25rem;
    color: var(--pub-accent);
}

.pub-analysis-category-header h3 {
    font-family: var(--pub-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pub-text-light);
    margin: 0;
}

.pub-analysis-cards {
    padding: 1.5rem;
    display: grid;
    gap: 1.25rem;
}

/* Analysis Card */
.pub-insight-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 3px solid var(--pub-accent);
}

.pub-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.pub-insight-topic {
    font-family: var(--pub-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pub-accent);
    margin: 0;
}

/* Ensure paragraphs inside insight topics have proper contrast */
.pub-insight-topic p {
    color: rgba(255, 255, 255, 0.95);
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
    line-height: 1.4;
}

/* Ensure strong/bold text inside insight topics maintains visibility */
.pub-insight-topic strong,
.pub-insight-topic b {
    color: rgba(255, 255, 255, 1);
    font-weight: 700;
}

/* Ensure italic text inside insight topics maintains visibility */
.pub-insight-topic em,
.pub-insight-topic i {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.pub-confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-family: var(--pub-font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pub-confidence-badge.high {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.pub-confidence-badge.medium {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.pub-confidence-badge.low {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.pub-insight-description {
    font-family: var(--pub-font-body);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8) !important;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Heading styles for Analysis Section - ensure proper contrast */
.pub-analysis-content h1,
.pub-analysis-content h2,
.pub-analysis-content h3,
.pub-analysis-content h4,
.pub-analysis-content h5,
.pub-analysis-content h6,
.pub-insight-description h1,
.pub-insight-description h2,
.pub-insight-description h3,
.pub-insight-description h4,
.pub-insight-description h5,
.pub-insight-description h6,
.pub-insight-detail h1,
.pub-insight-detail h2,
.pub-insight-detail h3,
.pub-insight-detail h4,
.pub-insight-detail h5,
.pub-insight-detail h6,
.pub-summary-text h1,
.pub-summary-text h2,
.pub-summary-text h3,
.pub-summary-text h4,
.pub-summary-text h5,
.pub-summary-text h6 {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--pub-font-body);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.pub-analysis-content h1,
.pub-insight-description h1,
.pub-insight-detail h1 {
    font-size: 1.5rem;
    color: var(--pub-accent);
}

.pub-analysis-content h2,
.pub-insight-description h2,
.pub-insight-detail h2,
.pub-summary-text h2 {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(212, 160, 23, 0.3);
    padding-bottom: 0.5rem;
}

.pub-analysis-content h3,
.pub-insight-description h3,
.pub-insight-detail h3,
.pub-summary-text h3 {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.pub-analysis-content h4,
.pub-insight-description h4,
.pub-insight-detail h4 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.pub-analysis-content h5,
.pub-insight-description h5,
.pub-insight-detail h5 {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.pub-analysis-content h6,
.pub-insight-description h6,
.pub-insight-detail h6 {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.pub-analysis-content h1:first-child,
.pub-analysis-content h2:first-child,
.pub-analysis-content h3:first-child,
.pub-insight-description h1:first-child,
.pub-insight-description h2:first-child,
.pub-insight-description h3:first-child,
.pub-insight-detail h1:first-child,
.pub-insight-detail h2:first-child,
.pub-insight-detail h3:first-child,
.pub-summary-text h1:first-child,
.pub-summary-text h2:first-child,
.pub-summary-text h3:first-child {
    margin-top: 0;
}

.pub-insight-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.pub-insight-detail {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.pub-insight-detail h5 {
    font-family: var(--pub-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pub-accent);
    margin-bottom: 0.5rem;
}

.pub-insight-detail p {
    font-family: var(--pub-font-body);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0;
    line-height: 1.6;
}

/* Blockquote styling for Analysis Section - dark background with readable text */
.pub-analysis-content blockquote,
.pub-insight-description blockquote,
.pub-insight-detail blockquote,
.pub-summary-text blockquote {
    margin: 1rem 0;
    padding: 1rem 1.5rem;
    border-left: 3px solid var(--pub-accent);
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0 8px 8px 0;
    font-family: var(--pub-font-body);
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.9);
}

.pub-analysis-content blockquote p,
.pub-insight-description blockquote p,
.pub-insight-detail blockquote p,
.pub-summary-text blockquote p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.pub-analysis-content blockquote p:last-child,
.pub-insight-description blockquote p:last-child,
.pub-insight-detail blockquote p:last-child,
.pub-summary-text blockquote p:last-child {
    margin-bottom: 0;
}

/* Scientific Assessment */
.pub-scientific-assessment {
    padding: 1.5rem;
}

.pub-rating-display {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.pub-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-family: var(--pub-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pub-rating-badge.excellent {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2) 0%, rgba(39, 174, 96, 0.1) 100%);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.pub-rating-badge.good {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(46, 204, 113, 0.1) 100%);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.pub-rating-badge.fair {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.2) 0%, rgba(241, 196, 15, 0.1) 100%);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.pub-rating-badge.poor {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(231, 76, 60, 0.1) 100%);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.pub-rating-label {
    font-family: var(--pub-font-body);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pub-assessment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.pub-assessment-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
}

.pub-assessment-panel h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--pub-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pub-assessment-panel.strengths h4 {
    color: #27ae60;
}

.pub-assessment-panel.concerns h4 {
    color: #f39c12;
}

.pub-assessment-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pub-assessment-panel > ul > li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: var(--pub-font-body);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7) !important;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    min-width: 0;
}

/* ========================================
   TEXT COLOR OVERRIDES FOR PUBLIC LAYOUT
   Force light text colors in dark-themed sections
   to override public layout's dark text styles
   ======================================== */

/* Override paragraph colors in dark sections */
.pub-section-dark p,
.pub-section-analysis p {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Assessment panel text elements */
.pub-assessment-panel p,
.pub-assessment-panel li,
.pub-assessment-panel strong,
.pub-assessment-panel b,
.pub-assessment-panel em,
.pub-assessment-panel i,
.pub-assessment-panel span {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Ensure nested paragraphs in assessment panels are light */
.pub-assessment-panel li p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Recommendations section */
.pub-recommendations p,
.pub-recommendations li,
.pub-recommendations strong,
.pub-recommendations b {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Findings list text */
.pub-findings-list p,
.pub-findings-list li,
.pub-findings-list strong,
.pub-findings-list b {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Summary text section */
.pub-summary-text p,
.pub-summary-text li,
.pub-summary-text strong,
.pub-summary-text b {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Analysis content sections */
.pub-analysis-content p,
.pub-insight-description p,
.pub-insight-detail p {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure all text in analysis sections is light */
.pub-section-analysis p,
.pub-section-analysis li,
.pub-section-analysis span,
.pub-section-analysis strong,
.pub-section-analysis b,
.pub-section-analysis em,
.pub-section-analysis i {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Icons only for direct children - less prominent */
.pub-assessment-panel.strengths > ul > li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #27ae60;
    opacity: 0.7; /* Reduced opacity for less noise */
    flex-shrink: 0;
    font-size: 0.8rem; /* Slightly smaller */
    line-height: 1.5; /* Match text line-height */
    margin-top: 0.1rem; /* Fine-tune vertical alignment with first line */
}

.pub-assessment-panel.concerns > ul > li::before {
    content: '\f071';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #f39c12;
    opacity: 0.7; /* Reduced opacity for less noise */
    flex-shrink: 0;
    font-size: 0.8rem; /* Slightly smaller */
    line-height: 1.5; /* Match text line-height */
    margin-top: 0.1rem; /* Fine-tune vertical alignment with first line */
}

/* Nested lists - remove icon and fix layout */
.pub-assessment-panel li > ul {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 0 0;
}

/* Nested list items - no icon, standard block layout */
.pub-assessment-panel li > ul > li {
    display: block; /* Reset flex layout */
    margin-bottom: 0.5rem;
    padding-left: 0;
    position: relative;
}

/* Remove icon from nested list items */
.pub-assessment-panel li > ul > li::before {
    content: none;
}

/* Further nested lists */
.pub-assessment-panel li ul li ul {
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

.pub-assessment-panel li ul li ul li {
    margin-bottom: 0.25rem;
}

.pub-recommendations {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(212, 160, 23, 0.1);
    border-radius: 10px;
    border-left: 3px solid var(--pub-accent);
}

.pub-recommendations h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--pub-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pub-accent);
    margin-bottom: 0.75rem;
}

.pub-recommendations p {
    font-family: var(--pub-font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8) !important;
    margin: 0;
    line-height: 1.6;
}

/* Summary & Key Findings */
.pub-analysis-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pub-radius);
    padding: 1.5rem;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.pub-summary-section,
.pub-findings-section {
    min-width: 0; /* Allow grid items to shrink below content size */
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pub-summary-section h4,
.pub-findings-section h4 {
    display: flex;
    align-items: center;
    font-family: var(--pub-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--pub-accent);
    margin-bottom: 1rem;
}

.pub-summary-text {
    font-family: var(--pub-font-body);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure code elements wrap properly and have good contrast */
.pub-summary-text code,
.pub-findings-list code,
.pub-analysis-content code,
.pub-insight-description code,
.pub-insight-detail code {
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    display: inline-block;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
    padding: 0.25rem 0.6rem;
    background: rgba(212, 160, 23, 0.2);
    color: rgba(255, 255, 255, 1);
    border-radius: 4px;
    border: 1px solid rgba(212, 160, 23, 0.4);
    font-weight: 600;
    line-height: 1.4;
}

/* Override base code styles for analysis section */
.pub-section-analysis code,
.pub-analysis-content code,
.pub-insight-description code,
.pub-insight-detail code,
.pub-summary-text code,
.pub-findings-list code {
    background-color: rgba(212, 160, 23, 0.2) !important;
    color: rgba(255, 255, 255, 1) !important;
    border-color: rgba(212, 160, 23, 0.4) !important;
}

/* Ensure paragraphs wrap properly and have good contrast */
.pub-summary-text p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9) !important; /* Better contrast for readability */
    line-height: 1.7;
}

.pub-summary-text p:last-child {
    margin-bottom: 0;
}

/* Ensure lists wrap properly */
.pub-summary-text ul,
.pub-summary-text ol {
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.pub-summary-text li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9) !important; /* Better contrast for list items */
    line-height: 1.7;
}

.pub-summary-text li:last-child {
    margin-bottom: 0;
}

.pub-findings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pub-findings-list > li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-family: var(--pub-font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    min-width: 0; /* Allow flex item to shrink below content size */
}

/* Icon only for direct children - less prominent */
.pub-findings-list > li::before {
    content: '\f0eb';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--pub-accent);
    opacity: 0.6; /* Reduced opacity for less noise */
    flex-shrink: 0;
    margin-top: 0.2rem;
    font-size: 0.85rem; /* Slightly smaller */
}

/* Nested lists - remove icon and fix layout */
.pub-findings-list li > ul,
.pub-findings-list li > ol {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 0 0;
}

/* Nested list items - no icon, standard block layout */
.pub-findings-list li > ul > li,
.pub-findings-list li > ol > li {
    display: block; /* Reset flex layout */
    margin-bottom: 0.5rem;
    padding-left: 0;
    position: relative;
}

/* Remove icon from nested list items */
.pub-findings-list li > ul > li::before,
.pub-findings-list li > ol > li::before {
    content: none;
}

/* Further nested lists */
.pub-findings-list li ul li ul,
.pub-findings-list li ol li ol {
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

.pub-findings-list li ul li ul li,
.pub-findings-list li ol li ol li {
    margin-bottom: 0.25rem;
}

/* ========================================
   RELATED PUBLICATIONS
   ======================================== */

.pub-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.pub-related-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--pub-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.pub-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.pub-related-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    background: rgba(212, 160, 23, 0.1);
    color: var(--pub-accent-dark);
    border-radius: 20px;
    font-family: var(--pub-font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.pub-related-title {
    font-family: var(--pub-font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.pub-related-title a {
    color: var(--pub-text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pub-related-title a:hover {
    color: var(--pub-accent-dark);
}

.pub-related-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--pub-font-body);
    font-size: 0.85rem;
    color: var(--pub-text-muted);
    margin-bottom: 0.5rem;
}

.pub-related-meta i {
    color: var(--pub-accent);
    width: 14px;
}

.pub-related-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
}

.pub-related-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--pub-font-body);
    font-size: 0.8rem;
    color: var(--pub-text-muted);
}

.pub-related-date i {
    color: var(--pub-accent);
}

.pub-related-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--pub-border-light);
    border-radius: 20px;
    font-family: var(--pub-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pub-text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pub-related-btn:hover {
    background: var(--pub-accent);
    border-color: var(--pub-accent);
    color: var(--pub-text-dark);
    text-decoration: none;
}

/* ========================================
   FOOTER CTA
   ======================================== */

.pub-footer-cta {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--pub-bg-dark) 0%, #0a0808 100%);
}

.pub-footer-cta h3 {
    font-family: var(--pub-font-display);
    font-size: 2rem;
    color: var(--pub-text-light);
    margin-bottom: 0.75rem;
}

.pub-footer-cta p {
    font-family: var(--pub-font-body);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
}

.pub-footer-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */

.pub-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(212, 160, 23, 0.2);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}

.pub-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: var(--pub-font-body);
    font-size: 0.65rem;
    transition: all 0.2s ease;
    min-height: 44px; /* Ensure touch target is at least 44px */
    justify-content: center;
}

.pub-bottom-nav-item i {
    font-size: 1.1rem;
}

.pub-bottom-nav-item.active,
.pub-bottom-nav-item:hover {
    color: var(--pub-accent);
}

.pub-bottom-nav-item.active {
    transform: translateY(-2px);
}

/* ========================================
   ANIMATIONS
   ======================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 992px) {
    .pub-section {
        padding: 4rem 0;
    }
    
    .pub-section-header {
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    .pub-hero {
        min-height: auto;
        padding: 4rem 1rem 5rem;
    }
    
    .pub-hero-content {
        padding: 1rem;
    }
    
    .pub-hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1.25rem;
    }
    
    .pub-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .pub-hero-stats {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .pub-stat {
        min-width: 80px;
    }
    
    .pub-stat-value {
        font-size: 1.3rem;
    }
    
    .pub-stat-label {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.65); /* Better contrast on mobile */
    }
    
    .pub-scroll-indicator {
        bottom: 2rem;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7); /* Better contrast on mobile */
    }
    
    .pub-section {
        padding: 3rem 0;
    }
    
    .pub-section-header {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .section-chapter {
        font-size: 0.7rem;
        padding: 0.4rem 0.875rem;
    }
    
    .pub-section-title {
        font-size: 1.75rem;
    }
    
    .pub-section-lead {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    /* Container padding for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Metadata Strip - Mobile */
    .pub-metadata-strip {
        flex-direction: column;
        padding: 1.25rem;
        gap: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .pub-metadata-item {
        padding: 0.75rem 1rem;
        width: 100%;
        justify-content: flex-start;
    }
    
    .pub-metadata-icon {
        width: 32px;
        height: 32px;
    }
    
    .pub-metadata-icon i {
        font-size: 0.75rem;
    }
    
    .pub-metadata-label {
        font-size: 0.6rem;
    }
    
    .pub-metadata-value {
        font-size: 0.8rem;
    }
    
    /* Authors Panel - Mobile */
    .pub-authors-panel {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .pub-authors-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .pub-authors-header h3 {
        font-size: 0.7rem;
    }
    
    .pub-authors-toggle {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
    }
    
    .pub-authors-grid {
        gap: 0.5rem;
    }
    
    .pub-author-chip {
        padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    }
    
    .pub-author-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.6rem;
    }
    
    .pub-author-name {
        font-size: 0.75rem;
    }
    
    .pub-authors-expanded {
        gap: 0.5rem;
    }
    
    .pub-external-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .pub-external-btn {
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .pub-abstract-quote {
        padding: 1.5rem 1.25rem;
        margin: 0;
    }
    
    .pub-abstract-quote p {
        padding-left: 0;
        font-size: 1rem;
        line-height: 1.8; /* Better readability on mobile */
    }
    
    .pub-quote-icon {
        display: none;
    }
    
    /* Analysis Section - Mobile Contrast Improvements */
    .pub-analysis-pending p {
        color: rgba(255, 255, 255, 0.8); /* Better contrast on mobile */
    }
    
    .pub-analysis-disclaimer p {
        color: rgba(255, 255, 255, 0.85); /* Better contrast on mobile */
    }
    
    /* Bottom Navigation - Mobile Contrast */
    .pub-bottom-nav-item {
        color: rgba(255, 255, 255, 0.7); /* Better contrast on mobile */
    }
    
    /* Footer CTA - Mobile Contrast */
    .pub-footer-cta p {
        color: rgba(255, 255, 255, 0.8); /* Better contrast on mobile */
    }
    
    /* Samples Table - Mobile */
    .pub-samples-panel {
        margin: 0 1rem;
    }
    
    .pub-samples-header {
        padding: 1.25rem;
    }
    
    .pub-samples-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.875rem;
    }
    
    .pub-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pub-samples-table {
        font-size: 0.85rem;
    }
    
    .pub-samples-table thead th {
        padding: 0.875rem 1rem;
        font-size: 0.7rem;
    }
    
    .pub-samples-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Analysis Section - Mobile */
    .pub-analysis-disclaimer {
        padding: 1rem 1.25rem;
        margin-bottom: 2rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .pub-analysis-disclaimer i {
        font-size: 1.1rem;
    }
    
    .pub-analysis-disclaimer p {
        font-size: 0.85rem;
    }
    
    .pub-analysis-category {
        margin-bottom: 2rem;
    }
    
    .pub-analysis-category-header {
        padding: 1rem 1.25rem;
    }
    
    .pub-analysis-category-header h3 {
        font-size: 1.1rem;
    }
    
    .pub-analysis-cards {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .pub-insight-card {
        padding: 1.25rem;
    }
    
    .pub-insight-topic {
        font-size: 1rem;
    }
    
    .pub-insight-description {
        font-size: 0.9rem;
    }
    
    /* Headings - Mobile */
    .pub-analysis-content h1,
    .pub-insight-description h1,
    .pub-insight-detail h1,
    .pub-summary-text h1 {
        font-size: 1.35rem;
    }
    
    .pub-analysis-content h2,
    .pub-insight-description h2,
    .pub-insight-detail h2,
    .pub-summary-text h2 {
        font-size: 1.15rem;
        color: rgba(255, 255, 255, 0.95); /* Ensure high contrast on mobile */
    }
    
    .pub-analysis-content h3,
    .pub-insight-description h3,
    .pub-insight-detail h3,
    .pub-summary-text h3 {
        font-size: 1.05rem;
    }
    
    /* Blockquote - Mobile */
    .pub-analysis-content blockquote,
    .pub-insight-description blockquote,
    .pub-insight-detail blockquote {
        padding: 0.875rem 1.25rem;
        margin: 0.875rem 0;
    }
    
    .pub-analysis-content blockquote p,
    .pub-insight-description blockquote p,
    .pub-insight-detail blockquote p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .pub-related-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .pub-related-card {
        padding: 1.25rem;
    }
    
    .pub-related-title {
        font-size: 1rem;
    }
    
    .pub-analysis-summary {
        grid-template-columns: 1fr;
        padding: 1.25rem;
        gap: 1.25rem;
    }
    
    .pub-summary-section h4,
    .pub-findings-section h4 {
        font-size: 1.05rem;
    }
    
    .pub-summary-text {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .pub-summary-text code,
    .pub-findings-list code,
    .pub-analysis-content code,
    .pub-insight-description code,
    .pub-insight-detail code {
        font-size: 0.85rem;
        word-break: break-all;
        background: rgba(212, 160, 23, 0.25) !important;
        color: rgba(255, 255, 255, 1) !important;
        border-color: rgba(212, 160, 23, 0.5) !important;
    }
    
    .pub-findings-list li {
        font-size: 0.85rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    /* Footer CTA - Mobile */
    .pub-footer-cta {
        padding: 3rem 1rem;
    }
    
    .pub-footer-cta h3 {
        font-size: 1.5rem;
    }
    
    .pub-footer-cta p {
        font-size: 1rem;
    }
    
    /* Add padding for bottom nav */
    .pub-cinematic-page {
        padding-bottom: 100px; /* Increased for better clearance */
    }
}

@media (max-width: 576px) {
    .pub-hero {
        padding: 3.5rem 0.75rem 4.5rem;
    }
    
    .pub-hero-content {
        padding: 0.75rem;
    }
    
    .pub-hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 0.875rem;
    }
    
    .pub-hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }
    
    .pub-hero-stats {
        gap: 0.75rem;
        margin-bottom: 1.75rem;
    }
    
    .pub-stat {
        min-width: 70px;
    }
    
    .pub-stat i {
        font-size: 1.1rem;
        margin-bottom: 0.375rem;
    }
    
    .pub-stat-value {
        font-size: 1.2rem;
    }
    
    .pub-stat-label {
        font-size: 0.65rem;
        color: rgba(255, 255, 255, 0.65); /* Better contrast on small mobile */
    }
    
    .pub-hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .pub-btn-primary,
    .pub-btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px; /* Ensure touch target is at least 44px */
    }
    
    .pub-scroll-indicator {
        bottom: 1.5rem;
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.7); /* Better contrast on small mobile */
    }
    
    .pub-scroll-indicator i {
        font-size: 1.1rem;
    }
    
    .pub-section {
        padding: 2.5rem 0;
    }
    
    .pub-section-header {
        margin-bottom: 1.75rem;
        padding: 0 0.75rem;
    }
    
    .section-chapter {
        font-size: 0.65rem;
        padding: 0.35rem 0.75rem;
        margin-bottom: 0.875rem;
    }
    
    .pub-section-title {
        font-size: 1.6rem;
        margin-bottom: 0.875rem;
    }
    
    .pub-section-lead {
        font-size: 0.95rem;
        padding: 0 0.75rem;
    }
    
    /* Container padding for small mobile */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Metadata Strip - Small Mobile */
    .pub-metadata-strip {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .pub-metadata-item {
        padding: 0.625rem 0.875rem;
    }
    
    .pub-metadata-icon {
        width: 30px;
        height: 30px;
    }
    
    .pub-metadata-icon i {
        font-size: 0.7rem;
    }
    
    .pub-metadata-label {
        font-size: 0.575rem;
    }
    
    .pub-metadata-value {
        font-size: 0.75rem;
    }
    
    /* Authors Panel - Small Mobile */
    .pub-authors-panel {
        padding: 1rem;
    }
    
    .pub-authors-header h3 {
        font-size: 0.65rem;
    }
    
    .pub-authors-toggle {
        padding: 0.5rem 0.875rem;
        font-size: 0.7rem;
        min-height: 44px;
    }
    
    .pub-author-chip {
        padding: 0.3rem 0.625rem 0.3rem 0.3rem;
    }
    
    .pub-author-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.55rem;
    }
    
    .pub-author-name {
        font-size: 0.7rem;
    }
    
    .pub-external-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
        min-height: 44px;
    }
    
    .pub-abstract-quote {
        padding: 1.5rem 1rem; /* Increased padding for better readability */
        margin: 0;
    }
    
    .pub-abstract-quote p {
        font-size: 0.95rem;
        line-height: 1.8; /* Better line-height for readability */
    }
    
    /* Samples Table - Small Mobile */
    .pub-samples-panel {
        margin: 0 0.75rem;
    }
    
    .pub-samples-header {
        padding: 1rem;
    }
    
    .pub-samples-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }
    
    .pub-samples-table {
        font-size: 0.8rem;
    }
    
    .pub-samples-table thead th {
        padding: 0.75rem 0.875rem;
        font-size: 0.65rem;
    }
    
    .pub-samples-table tbody td {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
    }
    
    .pub-sample-link {
        font-size: 0.75rem;
    }
    
    .pub-date-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .pub-sex-badge {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    
    .pub-haplogroup {
        font-size: 0.7rem;
        padding: 0.1rem 0.3rem;
    }
    
    /* Analysis Section - Small Mobile */
    .pub-analysis-disclaimer {
        padding: 0.875rem 1rem;
        margin-bottom: 1.75rem;
    }
    
    .pub-analysis-disclaimer i {
        font-size: 1rem;
    }
    
    .pub-analysis-disclaimer p {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.85); /* Better contrast on small mobile */
    }
    
    /* Analysis Pending - Small Mobile Contrast */
    .pub-analysis-pending p {
        color: rgba(255, 255, 255, 0.8); /* Better contrast on small mobile */
    }
    
    .pub-analysis-category-header {
        padding: 0.875rem 1rem;
    }
    
    .pub-analysis-category-header h3 {
        font-size: 1rem;
    }
    
    .pub-analysis-cards {
        padding: 1rem;
        gap: 0.875rem;
    }
    
    .pub-insight-card {
        padding: 1rem;
    }
    
    .pub-insight-topic {
        font-size: 0.95rem;
    }
    
    .pub-insight-description {
        font-size: 0.85rem;
    }
    
    /* Headings - Small Mobile */
    .pub-analysis-content h1,
    .pub-insight-description h1,
    .pub-insight-detail h1,
    .pub-summary-text h1 {
        font-size: 1.25rem;
    }
    
    .pub-analysis-content h2,
    .pub-insight-description h2,
    .pub-insight-detail h2,
    .pub-summary-text h2 {
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.95); /* Ensure high contrast on small mobile */
    }
    
    .pub-analysis-content h3,
    .pub-insight-description h3,
    .pub-insight-detail h3,
    .pub-summary-text h3 {
        font-size: 1rem;
    }
    
    /* Blockquote - Small Mobile */
    .pub-analysis-content blockquote,
    .pub-insight-description blockquote,
    .pub-insight-detail blockquote {
        padding: 0.75rem 1rem;
        margin: 0.75rem 0;
    }
    
    .pub-analysis-content blockquote p,
    .pub-insight-description blockquote p,
    .pub-insight-detail blockquote p {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .pub-insight-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .pub-insight-detail {
        padding: 0.875rem;
    }
    
    .pub-insight-detail h5 {
        font-size: 0.7rem;
    }
    
    .pub-insight-detail p {
        font-size: 0.8rem;
    }
    
    .pub-related-grid {
        gap: 1rem;
    }
    
    .pub-related-card {
        padding: 1rem;
    }
    
    .pub-related-title {
        font-size: 0.95rem;
    }
    
    .pub-related-meta {
        font-size: 0.8rem;
    }
    
    .pub-related-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
        min-height: 44px;
    }
    
    .pub-analysis-summary {
        padding: 1rem;
        gap: 1rem;
    }
    
    .pub-summary-section h4,
    .pub-findings-section h4 {
        font-size: 1rem;
    }
    
    .pub-summary-text {
        font-size: 0.85rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .pub-summary-text code,
    .pub-findings-list code,
    .pub-analysis-content code,
    .pub-insight-description code,
    .pub-insight-detail code {
        font-size: 0.8rem;
        word-break: break-all;
        background: rgba(212, 160, 23, 0.25) !important;
        color: rgba(255, 255, 255, 1) !important;
        border-color: rgba(212, 160, 23, 0.5) !important;
    }
    
    .pub-findings-list li {
        font-size: 0.8rem;
        margin-bottom: 0.875rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    /* Footer CTA - Small Mobile */
    .pub-footer-cta {
        padding: 2.5rem 0.75rem;
    }
    
    .pub-footer-cta h3 {
        font-size: 1.35rem;
        margin-bottom: 0.625rem;
    }
    
    .pub-footer-cta p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        color: rgba(255, 255, 255, 0.8); /* Better contrast on small mobile */
    }
    
    .pub-footer-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .pub-footer-actions .pub-btn-primary {
        min-height: 44px;
    }
    
    /* Bottom Navigation - Small Mobile Contrast */
    .pub-bottom-nav-item {
        color: rgba(255, 255, 255, 0.7); /* Better contrast on small mobile */
    }
    
    /* Increase bottom padding for safe area on iPhone */
    .pub-cinematic-page {
        padding-bottom: calc(100px + env(safe-area-inset-bottom)); /* Increased for better clearance */
    }
    
    .pub-bottom-nav {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .pub-page-nav,
    .pub-bottom-nav,
    .pub-scroll-indicator,
    .pub-hero-actions,
    .pub-external-links,
    .pub-footer-cta,
    .pub-related-btn,
    .skip-link {
        display: none !important;
    }
    
    .pub-hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .pub-section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
    
    .pub-cinematic-page {
        background: #fff;
        color: #000;
    }
    
    .pub-section-dark,
    .pub-section-analysis {
        background: #f5f5f5;
        color: #000;
    }
    
    .pub-hero-title,
    .pub-section-title {
        color: #000;
    }
}
