﻿/** * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Y-DNA Haplogroup Report - Main Report Styles
 * Premium styling for paternal lineage report with data.
 */

/* Import shared base styles */
@import url('./YdnaReport.css');

/* ========================================
   HERO SHOWCASE STYLES
   ======================================== */
.ydr-haplogroup-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.ydr-haplogroup-letter {
    font-family: var(--ydr-font-display);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 700;
    color: var(--ydr-gold);
    line-height: 1;
    text-align: center;
}

.ydr-haplogroup-label {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--ydr-ivory-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.ydr-explore-link {
    text-align: center;
    margin-top: 12px;
    margin-bottom: 24px;
}

.ydr-explore-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ydr-ivory);
    opacity: 0.85;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.ydr-explore-link a:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: var(--ydr-ivory);
}

.ydr-confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
}

.ydr-confidence-badge.high {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #8BC34A;
}

.ydr-confidence-badge.low {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.4);
    color: #FFC107;
}

.ydr-haplogroup-origin {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 32px;
}

.ydr-haplogroup-origin p {
    color: var(--ydr-ivory-dim);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
}

.ydr-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .ydr-hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.ydr-stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-stat-value {
    display: block;
    font-family: var(--ydr-font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ydr-gold);
    margin-bottom: 8px;
}

.ydr-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   CARD PATTERN (matching mtDNA)
   ======================================== */
.ydr-card {
    background: rgba(45, 40, 36, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(107, 93, 77, 0.15);
    margin-bottom: 24px;
    transition: all var(--ydr-transition-medium);
}

.ydr-card:hover {
    border-color: rgba(107, 93, 77, 0.3);
    transform: translateY(-2px);
}

.ydr-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 0;
    margin-bottom: 20px;
}

.ydr-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(107, 93, 77, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--ydr-bronze);
    flex-shrink: 0;
}

.ydr-card-title {
    font-family: var(--ydr-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.ydr-card-body {
    padding: 0 24px 24px;
}

.ydr-card-body p {
    color: var(--ydr-ivory-dim);
    line-height: 1.8;
    margin-bottom: 16px;
}

.ydr-card-body p:last-child {
    margin-bottom: 0;
}

/* ========================================
   BLOCKQUOTES - Override base styles for dark theme
   ======================================== */
.ydr-main blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--ydr-gold);
    background-color: rgba(45, 40, 36, 0.6);
    border-radius: 0 8px 8px 0;
    color: var(--ydr-ivory);
}

.ydr-main blockquote p {
    color: var(--ydr-ivory);
    margin-bottom: 0.75rem;
}

.ydr-main blockquote p:last-child {
    margin-bottom: 0;
}

.ydr-main blockquote strong {
    color: var(--ydr-gold);
}

/* ========================================
   LINEAGE PATH STYLES
   ======================================== */
.ydr-lineage-path {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 32px 24px;
    background: linear-gradient(135deg, rgba(26, 24, 22, 0.6) 0%, rgba(45, 40, 36, 0.4) 100%);
    border: 1px solid rgba(201, 164, 48, 0.15);
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
}

.ydr-lineage-step {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform var(--ydr-transition-fast);
}

.ydr-lineage-step:hover {
    transform: translateY(-2px);
}

.ydr-lineage-marker {
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(45, 40, 36, 0.95) 0%, rgba(61, 53, 48, 0.9) 100%);
    border: 1px solid rgba(201, 164, 48, 0.4);
    border-radius: 10px;
    color: var(--ydr-gold);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(201, 164, 48, 0.15);
    transition: all var(--ydr-transition-fast);
    position: relative;
    white-space: nowrap;
}

.ydr-lineage-marker:hover {
    border-color: rgba(201, 164, 48, 0.6);
    box-shadow: 0 4px 12px rgba(201, 164, 48, 0.25), inset 0 1px 0 rgba(201, 164, 48, 0.2);
    transform: translateY(-1px);
}

.ydr-lineage-marker-current {
    background: linear-gradient(135deg, rgba(201, 164, 48, 0.2) 0%, rgba(184, 148, 32, 0.15) 100%);
    border: 2px solid rgba(201, 164, 48, 0.6);
    color: var(--ydr-gold-light);
    box-shadow: 0 4px 16px rgba(201, 164, 48, 0.3), inset 0 1px 0 rgba(201, 164, 48, 0.25), 0 0 20px rgba(201, 164, 48, 0.15);
    animation: ydr-lineage-pulse 2s ease-in-out infinite;
    font-weight: 700;
}

.ydr-lineage-marker-current:hover {
    border-color: rgba(201, 164, 48, 0.8);
    box-shadow: 0 6px 20px rgba(201, 164, 48, 0.4), inset 0 1px 0 rgba(201, 164, 48, 0.3), 0 0 30px rgba(201, 164, 48, 0.25);
}

@keyframes ydr-lineage-pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(201, 164, 48, 0.3), inset 0 1px 0 rgba(201, 164, 48, 0.25), 0 0 20px rgba(201, 164, 48, 0.15);
    }
    50% {
        box-shadow: 0 4px 16px rgba(201, 164, 48, 0.4), inset 0 1px 0 rgba(201, 164, 48, 0.3), 0 0 25px rgba(201, 164, 48, 0.25);
    }
}

/* Arrow connector styling */
.ydr-lineage-step .dna-icon-arrow-right {
    color: rgba(201, 164, 48, 0.5);
    font-size: 1rem;
    transition: all var(--ydr-transition-fast);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.ydr-lineage-step:hover .dna-icon-arrow-right {
    color: rgba(201, 164, 48, 0.7);
    transform: translateX(2px);
}

.ydr-lineage-caption {
    text-align: center;
    color: var(--ydr-ivory-dim);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Expand/Collapse Button */
.ydr-lineage-expand-wrapper {
    text-align: center;
    margin: 16px 0;
}

.ydr-lineage-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(45, 40, 36, 0.8) 0%, rgba(61, 53, 48, 0.7) 100%);
    border: 1px solid rgba(201, 164, 48, 0.4);
    border-radius: 8px;
    color: var(--ydr-gold);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ydr-transition-fast);
    font-family: var(--ydr-font-body);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(201, 164, 48, 0.1);
}

.ydr-lineage-expand-btn:hover {
    background: linear-gradient(135deg, rgba(61, 53, 48, 0.9) 0%, rgba(45, 40, 36, 0.85) 100%);
    border-color: rgba(201, 164, 48, 0.6);
    color: var(--ydr-gold-light);
    box-shadow: 0 4px 12px rgba(201, 164, 48, 0.2), inset 0 1px 0 rgba(201, 164, 48, 0.15);
    transform: translateY(-1px);
}

.ydr-lineage-expand-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(201, 164, 48, 0.1);
}

.ydr-lineage-expand-icon {
    transition: transform var(--ydr-transition-fast);
}

.ydr-lineage-expand-btn[aria-expanded="true"] .ydr-lineage-expand-icon {
    transform: rotate(180deg);
}


/* Hide intermediate steps on mobile by default */
@media (max-width: 767px) {
    .ydr-lineage-intermediate {
        display: none;
    }
    
    .ydr-lineage-path.expanded .ydr-lineage-intermediate {
        display: flex;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ydr-lineage-path {
        padding: 24px 16px;
        gap: 12px;
    }
    
    .ydr-lineage-marker {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .ydr-lineage-step {
        gap: 8px;
    }
    
    .ydr-lineage-step .dna-icon-arrow-right {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .ydr-lineage-path {
        padding: 20px 12px;
        gap: 10px;
    }
    
    .ydr-lineage-marker {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .ydr-lineage-step {
        gap: 6px;
    }
    
    .ydr-lineage-expand-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ========================================
   JOURNEY CONTAINER STYLES
   ======================================== */
.ydr-journey-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .ydr-journey-container {
        grid-template-columns: 1fr;
    }
}

.ydr-timeline-side {
    position: relative;
    padding-left: 40px;
}

.ydr-timeline-side::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--ydr-bronze) 0%, var(--ydr-gold) 100%);
}

.ydr-timeline-marker {
    position: relative;
    padding: 0 0 32px 40px;
}

.ydr-timeline-marker:last-child {
    padding-bottom: 0;
}

.ydr-timeline-dot {
    position: absolute;
    left: -25px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ydr-bronze);
    border: 3px solid var(--ydr-deep);
    box-shadow: 0 0 0 3px rgba(107, 93, 77, 0.3);
}

.ydr-timeline-dot.current {
    background: var(--ydr-gold);
    box-shadow: 0 0 0 3px rgba(201, 164, 48, 0.3);
}

.ydr-timeline-label {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.ydr-timeline-date {
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
}

.ydr-content-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ydr-description-box h4 {
    font-family: var(--ydr-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.ydr-description-box p {
    color: var(--ydr-ivory-dim);
    line-height: 1.8;
}

.ydr-journey-image {
    margin: 0;
}

.ydr-journey-image img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-journey-image figcaption {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
    text-align: center;
}

.ydr-current-stats {
    padding: 20px;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-stats-value {
    font-family: var(--ydr-font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ydr-gold);
    margin-bottom: 8px;
}

.ydr-stats-label {
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
}

/* ========================================
   SNP ANALYSIS SECTION STYLES
   ======================================== */
.ydr-snp-regions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

@media (max-width: 992px) {
    .ydr-snp-regions-grid {
        grid-template-columns: 1fr;
    }
}

.ydr-snp-region-card {
    padding: 24px;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
    text-align: center;
}

.ydr-snp-region-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(201, 164, 48, 0.2);
    border: 1px solid rgba(201, 164, 48, 0.4);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ydr-gold);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ydr-snp-region-name {
    font-family: var(--ydr-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.ydr-snp-region-description {
    font-size: 0.9rem;
    color: var(--ydr-ivory-dim);
    line-height: 1.6;
}

.ydr-isogg-explanation h5 {
    font-family: var(--ydr-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ydr-gold);
    margin-bottom: 16px;
}

.ydr-isogg-example {
    padding: 20px;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 12px;
    border-left: 3px solid var(--ydr-gold);
}

.ydr-isogg-example h5 {
    color: white;
    margin-bottom: 12px;
}

.ydr-haplo-code {
    background: rgba(107, 93, 77, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: var(--ydr-gold);
    font-size: 0.9em;
}

.ydr-terminal-snp-display {
    text-align: center;
    padding: 24px;
    background: rgba(201, 164, 48, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(201, 164, 48, 0.3);
    margin: 20px 0;
}

.ydr-terminal-snp-code {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ydr-gold);
    margin-bottom: 8px;
}

.ydr-terminal-snp-label {
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ydr-snp-comparison-note {
    padding: 20px;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 12px;
    border-left: 3px solid var(--ydr-bronze);
}

.ydr-snp-comparison-note h5 {
    font-family: var(--ydr-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

/* ========================================
   SUMMARY SECTION STYLES
   ======================================== */
.ydr-takeaways-section h4 {
    font-family: var(--ydr-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ydr-haplogroup-summary-box {
    text-align: center;
    padding: 32px;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-summary-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ydr-ivory-dim);
    margin-bottom: 12px;
}

.ydr-summary-haplogroup {
    font-family: var(--ydr-font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--ydr-gold);
    margin-bottom: 8px;
}

.ydr-summary-type {
    font-size: 1rem;
    color: var(--ydr-ivory-dim);
    margin-bottom: 24px;
}

.ydr-summary-stat {
    padding-top: 24px;
    border-top: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-summary-stat-value {
    font-family: var(--ydr-font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--ydr-gold);
    margin-bottom: 4px;
}

.ydr-summary-stat-label {
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   POPULATION GRID UPDATE
   ======================================== */
.ydr-population-card {
    padding: 28px;
    background: rgba(45, 40, 36, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.15);
    transition: all var(--ydr-transition-medium);
}

.ydr-population-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 93, 77, 0.3);
}

.ydr-population-card h4 {
    font-family: var(--ydr-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ydr-population-card p {
    color: var(--ydr-ivory-dim);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ========================================
   EMPTY STATE STYLES
   ======================================== */
.ydr-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.ydr-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 50%;
    color: var(--ydr-bronze);
    font-size: 1.5rem;
}

.ydr-empty-state h4 {
    font-family: var(--ydr-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.ydr-empty-state p {
    color: var(--ydr-ivory-dim);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   STATS CARDS - Moved to About Section
   ======================================== */
.ydr-about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .ydr-about-stats {
        grid-template-columns: 1fr;
    }
}

.ydr-about-stat-card {
    padding: 24px;
    background: rgba(45, 40, 36, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
    text-align: center;
}

.ydr-about-stat-value {
    display: block;
    font-family: var(--ydr-font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ydr-amber);
    margin-bottom: 4px;
}

.ydr-about-stat-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ydr-ivory-dim);
}

/* ========================================
   ABOUT HAPLOGROUP SECTION
   ======================================== */
.ydr-about-section {
    background: linear-gradient(180deg, var(--ydr-deep) 0%, var(--ydr-slate-dark) 100%);
}

.ydr-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 992px) {
    .ydr-about-grid {
        grid-template-columns: 1fr;
    }
}

.ydr-description-content {
    font-size: 1.05rem;
    line-height: 1.85;
}

.ydr-description-content p {
    margin-bottom: 20px;
}

.ydr-read-more-btn,
.ydr-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(45, 40, 36, 0.8) 0%, rgba(61, 53, 48, 0.7) 100%);
    border: 1px solid rgba(201, 164, 48, 0.4);
    border-radius: 8px;
    color: var(--ydr-gold);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ydr-transition-fast);
    font-family: var(--ydr-font-body);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(201, 164, 48, 0.1);
    margin-top: 12px;
}

.ydr-read-more-btn:hover,
.ydr-read-more:hover {
    background: linear-gradient(135deg, rgba(61, 53, 48, 0.9) 0%, rgba(45, 40, 36, 0.85) 100%);
    border-color: rgba(201, 164, 48, 0.6);
    color: var(--ydr-gold-light);
    box-shadow: 0 4px 12px rgba(201, 164, 48, 0.2), inset 0 1px 0 rgba(201, 164, 48, 0.15);
    transform: translateY(-1px);
}

.ydr-read-more-btn:active,
.ydr-read-more:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(201, 164, 48, 0.1);
}

.ydr-read-more-btn i,
.ydr-read-more .dna-icon {
    transition: transform var(--ydr-transition-fast);
}

.ydr-read-more-btn.expanded i,
.ydr-read-more:not(.collapsed) .dna-icon {
    transform: rotate(180deg);
}

.ydr-collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--ydr-transition-slow);
}

.ydr-collapse-content.expanded {
    max-height: 2000px;
}

/* ========================================
   POPULATION DISTRIBUTION SECTION
   ======================================== */
.ydr-population-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.ydr-population-info-card {
    background: rgba(45, 40, 36, 0.6);
    border: 1px solid rgba(107, 93, 77, 0.15);
    border-radius: 16px;
    padding: 28px;
    transition: all var(--ydr-transition-medium);
}

.ydr-population-info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 93, 77, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.ydr-population-info-card h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ydr-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.ydr-population-info-card h4 i {
    color: var(--ydr-bronze);
}

.ydr-population-info-card p {
    color: var(--ydr-ivory-dim);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ydr-population-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   JOURNEY/MIGRATIONS SECTION
   ======================================== */
.ydr-journey-section {
    background: var(--ydr-slate-dark);
    position: relative;
    overflow: hidden;
}

/* Vertical line motif */
.ydr-journey-section::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(107, 93, 77, 0.2) 10%,
        rgba(107, 93, 77, 0.2) 90%,
        transparent 100%
    );
    pointer-events: none;
}

.ydr-journey-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .ydr-journey-layout {
        grid-template-columns: 1fr;
    }
    
    .ydr-journey-timeline-side {
        padding-left: 24px;
        margin-bottom: 32px;
    }
    
    .ydr-timeline-dot {
        left: -20px;
    }
}

/* Haplogroup Path - Integrated into content card */
.ydr-haplogroup-path {
    background: rgba(45, 40, 36, 0.6);
    border-radius: 0;
    border: none;
    padding: 24px 28px;
    margin: 0;
}

.ydr-path-title {
    font-family: var(--ydr-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.ydr-path-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.ydr-path-node {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ydr-path-marker {
    padding: 8px 16px;
    background: rgba(107, 93, 77, 0.2);
    border: 1px solid rgba(107, 93, 77, 0.4);
    border-radius: 8px;
    font-family: var(--ydr-font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ydr-bronze-light);
}

.ydr-path-marker.current {
    background: var(--ydr-bronze);
    border-color: var(--ydr-bronze);
    color: white;
}

.ydr-path-marker.root {
    background: rgba(201, 164, 48, 0.2);
    border-color: rgba(201, 164, 48, 0.4);
    color: var(--ydr-amber);
}

.ydr-path-label {
    font-size: 0.75rem;
    color: var(--ydr-ivory-dim);
    margin-top: 4px;
}

.ydr-path-connector {
    width: 2px;
    height: 24px;
    background: linear-gradient(180deg, var(--ydr-bronze), var(--ydr-bronze-light));
}

.ydr-path-more {
    padding: 8px 16px;
    color: var(--ydr-ivory-dim);
    font-size: 0.85rem;
}

/* ========================================
   HORIZONTAL PATH VISUALIZATION
   ======================================== */
.ydr-path-visual-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0;
}

.ydr-path-node-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ydr-path-marker-horizontal {
    padding: 10px 18px;
    background: rgba(107, 93, 77, 0.2);
    border: 1px solid rgba(107, 93, 77, 0.4);
    border-radius: 20px;
    font-family: var(--ydr-font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ydr-bronze-light);
    white-space: nowrap;
    transition: all var(--ydr-transition-fast);
}

.ydr-path-marker-horizontal.current {
    background: var(--ydr-bronze);
    border-color: var(--ydr-bronze);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 93, 77, 0.3);
}

.ydr-path-marker-horizontal.root {
    background: rgba(201, 164, 48, 0.2);
    border-color: rgba(201, 164, 48, 0.4);
    color: var(--ydr-amber);
}

.ydr-path-label-horizontal {
    font-size: 0.7rem;
    color: var(--ydr-ivory-dim);
    text-align: center;
    white-space: nowrap;
}

.ydr-path-connector-horizontal {
    display: flex;
    align-items: center;
    color: var(--ydr-bronze);
    font-size: 0.75rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.ydr-path-ellipsis {
    padding: 8px 12px;
    color: var(--ydr-ivory-dim);
    font-size: 0.8rem;
    font-style: italic;
    white-space: nowrap;
}

.ydr-path-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(107, 93, 77, 0.15);
}

.ydr-view-full-tree-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: rgba(107, 93, 77, 0.15);
    border: 1px solid rgba(107, 93, 77, 0.3);
    border-radius: 8px;
    color: var(--ydr-bronze-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--ydr-transition-fast);
}

.ydr-view-full-tree-btn:hover {
    background: rgba(107, 93, 77, 0.25);
    border-color: rgba(107, 93, 77, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 93, 77, 0.2);
    text-decoration: none;
}

.ydr-view-full-tree-btn i {
    transition: transform var(--ydr-transition-fast);
}

.ydr-view-full-tree-btn:hover i {
    transform: translateX(2px);
}

/* Responsive adjustments for horizontal path */
@media (max-width: 768px) {
    .ydr-path-visual-horizontal {
        gap: 6px;
        padding: 16px 0;
    }
    
    .ydr-path-marker-horizontal {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .ydr-path-connector-horizontal {
        font-size: 0.65rem;
    }
    
    .ydr-path-ellipsis {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .ydr-view-full-tree-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .ydr-path-visual-horizontal {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .ydr-path-visual-horizontal::-webkit-scrollbar {
        height: 4px;
    }
    
    .ydr-path-visual-horizontal::-webkit-scrollbar-track {
        background: rgba(107, 93, 77, 0.1);
        border-radius: 2px;
    }
    
    .ydr-path-visual-horizontal::-webkit-scrollbar-thumb {
        background: var(--ydr-bronze);
        border-radius: 2px;
    }
}

/* Journey Content */
.ydr-journey-content {
    position: relative;
}

.ydr-journey-intro {
    padding: 24px;
    background: rgba(45, 40, 36, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
    margin-bottom: 32px;
}

.ydr-journey-intro h4 {
    font-family: var(--ydr-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0 0 12px;
}

.ydr-journey-intro p {
    margin: 0;
    line-height: 1.7;
}

.ydr-migration-map {
    position: relative;
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-migration-map img {
    width: 100%;
    height: auto;
    display: block;
}

.ydr-migration-map-caption {
    padding: 12px 16px;
    background: rgba(26, 26, 31, 0.9);
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
}

.ydr-migration-map-caption i {
    color: var(--ydr-bronze);
    margin-right: 8px;
}

.ydr-journey-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ydr-journey-stat {
    padding: 24px;
    background: rgba(45, 40, 36, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
    text-align: center;
}

.ydr-journey-stat-value {
    font-family: var(--ydr-font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--ydr-amber);
    margin-bottom: 4px;
}

.ydr-journey-stat-label {
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
}

/* ========================================
   INTEGRATED JOURNEY LAYOUT
   ======================================== */
/* Journey Timeline Side */
.ydr-journey-timeline-side {
    position: relative;
    padding-left: 30px;
}

.ydr-journey-timeline-side::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--ydr-bronze), var(--ydr-amber));
    opacity: 0.5;
}

.ydr-timeline-marker {
    position: relative;
    padding-bottom: 32px;
}

.ydr-timeline-marker:last-child {
    padding-bottom: 0;
}

.ydr-timeline-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ydr-bronze);
    border: 3px solid var(--ydr-deep);
    box-shadow: 0 0 0 3px rgba(107, 93, 77, 0.3);
}

.ydr-timeline-dot.current {
    background: var(--ydr-amber);
    box-shadow: 0 0 0 3px rgba(201, 164, 48, 0.3);
}

.ydr-timeline-label {
    font-family: var(--ydr-font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--ydr-bronze-light);
    display: block;
    margin-bottom: 4px;
}

.ydr-timeline-date {
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
}

/* ========================================
   TIMELINE COLLAPSE INDICATOR
   ======================================== */
.ydr-timeline-collapse {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px 0;
    position: relative;
}

.ydr-timeline-collapse-line {
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, var(--ydr-bronze), transparent);
    opacity: 0.3;
}

.ydr-timeline-collapse-text {
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--ydr-ivory-dim);
    font-style: italic;
    white-space: nowrap;
    background: rgba(45, 40, 36, 0.8);
    border-radius: 12px;
    border: 1px dashed rgba(107, 93, 77, 0.3);
}

/* ========================================
   TIMELINE EXPAND/Collapse FUNCTIONALITY
   ======================================== */
.ydr-timeline-expand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px 0;
    position: relative;
}

.ydr-timeline-expand-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ydr-gold);
    background: rgba(45, 40, 36, 0.8);
    border: 1px solid rgba(201, 164, 48, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--ydr-font-display);
    position: relative;
}

.ydr-timeline-expand-btn:hover {
    background: rgba(45, 40, 36, 0.95);
    border-color: rgba(201, 164, 48, 0.5);
    color: var(--ydr-gold-light);
    transform: translateY(-1px);
}

.ydr-timeline-expand-btn:focus {
    outline: 2px solid var(--ydr-gold);
    outline-offset: 2px;
}

.ydr-timeline-expand-btn:active {
    transform: translateY(0);
}

.ydr-timeline-expand-text {
    white-space: nowrap;
}

.ydr-timeline-expand-icon {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.ydr-timeline-expand-btn[aria-expanded="true"] .ydr-timeline-expand-icon {
    transform: rotate(180deg);
}

.ydr-timeline-hidden-clades {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.ydr-timeline-hidden-clades.expanded {
    max-height: 5000px;
    opacity: 1;
}

/* Content Card Body (for structured cards with headers) */
.ydr-content-card-body {
    padding: 0;
}

/* Spacing adjustment when path is integrated */
.ydr-content-card .ydr-haplogroup-path + .ydr-content-card-body {
    padding-top: 0;
}

.ydr-content-card .ydr-content-card-body .ydr-journey-layout {
    padding: 28px;
}

/* Journey Content Side */
.ydr-journey-content-side {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Journey Description Box */
.ydr-journey-description {
    padding: 24px;
    background: rgba(45, 40, 36, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-journey-description h4 {
    font-family: var(--ydr-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0 0 16px;
}

.ydr-journey-description p {
    margin: 0;
    line-height: 1.7;
    color: var(--ydr-ivory-dim);
}

/* Journey Image */
.ydr-journey-image {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(107, 93, 77, 0.2);
    margin: 0;
}

.ydr-journey-image img {
    width: 100%;
    height: auto;
    display: block;
}

.ydr-journey-image figcaption {
    padding: 12px 16px;
    background: rgba(26, 26, 31, 0.9);
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
}

.ydr-journey-image figcaption i {
    color: var(--ydr-bronze);
    margin-right: 8px;
}

/* Journey Stats in Content */
.ydr-journey-current-stats {
    padding: 24px;
    background: rgba(45, 40, 36, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-journey-current-stats .row {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.ydr-current-stats-value {
    font-family: var(--ydr-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ydr-amber);
    display: block;
    margin-bottom: 8px;
}

.ydr-current-stats-label {
    font-size: 0.9rem;
    color: var(--ydr-ivory-dim);
    display: block;
}

/* ========================================
   SCIENCE/TECHNICAL SECTION
   ======================================== */
.ydr-science-section {
    background: linear-gradient(180deg, var(--ydr-slate-dark) 0%, var(--ydr-slate-medium) 100%);
}

.ydr-science-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .ydr-science-grid {
        grid-template-columns: 1fr;
    }
}

.ydr-science-card {
    padding: 28px;
    background: rgba(45, 40, 36, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(245, 243, 240, 0.08);
}

.ydr-science-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(201, 164, 48, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 1.2rem;
    color: var(--ydr-amber);
}

.ydr-science-card h3 {
    font-family: var(--ydr-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: white;
    margin: 0 0 12px;
}

.ydr-science-card p {
    color: var(--ydr-ivory-dim);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.ydr-methodology {
    padding: 32px;
    background: rgba(107, 93, 77, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-methodology-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ydr-font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: white;
    margin-bottom: 24px;
}

.ydr-methodology-title i {
    color: var(--ydr-bronze);
}

.ydr-methodology-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {
    .ydr-methodology-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ydr-methodology-steps {
        grid-template-columns: 1fr;
    }
}

.ydr-methodology-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(26, 26, 31, 0.5);
    border-radius: 10px;
}

.ydr-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ydr-bronze);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.ydr-methodology-step p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ydr-ivory-dim);
}

/* ========================================
   UNDERSTANDING RESULTS SECTION
   ======================================== */
.ydr-understanding-section {
    background: linear-gradient(180deg, var(--ydr-slate-medium) 0%, var(--ydr-deep) 100%);
}

.ydr-understanding-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 992px) {
    .ydr-understanding-layout {
        grid-template-columns: 1fr;
    }
}

.ydr-understanding-main h3 {
    font-family: var(--ydr-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0 0 20px;
}

.ydr-understanding-main p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.ydr-takeaways-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ydr-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ydr-bronze);
    margin-bottom: 16px;
}

.ydr-haplogroup-summary {
    padding: 28px;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(107, 93, 77, 0.2);
    text-align: center;
}

.ydr-summary-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ydr-bronze);
    margin-bottom: 16px;
}

.ydr-summary-haplogroup {
    font-family: var(--ydr-font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--ydr-bronze-light);
    margin-bottom: 8px;
}

.ydr-summary-type {
    font-size: 1rem;
    color: var(--ydr-ivory-dim);
    margin-bottom: 24px;
}

.ydr-summary-stat {
    padding-top: 20px;
    border-top: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-summary-stat-value {
    font-family: var(--ydr-font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--ydr-amber);
}

.ydr-summary-stat-label {
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
}

/* ========================================
   CONFIDENCE WARNING
   ======================================== */
.ydr-confidence-warning {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 152, 0, 0.3);
    margin-bottom: 32px;
}

.ydr-confidence-warning-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 152, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #FFC107;
    flex-shrink: 0;
}

.ydr-confidence-warning h5 {
    font-family: var(--ydr-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFC107;
    margin: 0 0 8px;
}

.ydr-confidence-warning p {
    margin: 0;
    color: var(--ydr-ivory-dim);
    line-height: 1.6;
}

/* ========================================
   COMPATIBILITY NOTICE - Subtle info box
   ======================================== */
.ydr-compatibility-notice {
    padding: 60px 0;
}

.ydr-compatibility-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: rgba(61, 53, 48, 0.4);
    border: 1px solid rgba(201, 164, 48, 0.2);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 0 auto;
    max-width: 900px;
    backdrop-filter: blur(8px);
    transition: all var(--ydr-transition-medium);
}

.ydr-compatibility-box:hover {
    border-color: rgba(201, 164, 48, 0.3);
    background: rgba(61, 53, 48, 0.5);
}

.ydr-compatibility-icon {
    flex-shrink: 0;
    color: var(--ydr-gold);
    font-size: 1.25rem;
    margin-top: 2px;
}

.ydr-compatibility-content {
    flex: 1;
}

.ydr-compatibility-title {
    font-family: var(--ydr-font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ydr-ivory);
    margin: 0 0 12px 0;
    letter-spacing: 0.02em;
}

.ydr-compatibility-text {
    font-family: var(--ydr-font-body);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--ydr-ivory-dim);
    margin: 0;
}

.ydr-compatibility-text strong {
    color: var(--ydr-ivory);
    font-weight: 600;
}

@media (max-width: 768px) {
    .ydr-compatibility-notice {
        padding: 40px 0;
    }

    .ydr-compatibility-box {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .ydr-compatibility-icon {
        align-self: flex-start;
    }
}

/* ========================================
   FOOTER NOTE
   ======================================== */
.ydr-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(107, 93, 77, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(107, 93, 77, 0.2);
    margin-top: 40px;
}

.ydr-footer-note i {
    color: var(--ydr-bronze);
    margin-top: 3px;
    flex-shrink: 0;
}

.ydr-footer-note span {
    font-size: 0.9rem;
    color: var(--ydr-ivory-dim);
    line-height: 1.6;
}

.ydr-footer-note strong {
    color: white;
}

/* ========================================
   ANCIENT DNA MATCHES SECTION
   ======================================== */
.ydr-ancient-section {
    background: var(--ydr-slate-dark);
}

.ydr-ancient-table-wrapper {
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--ydr-bronze) transparent;
}

.ydr-ancient-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.ydr-ancient-table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.ydr-ancient-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--ydr-bronze);
    border-radius: 3px;
}

.ydr-ancient-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 800px;
}

.ydr-ancient-table thead {
    background: rgba(107, 93, 77, 0.2);
    position: sticky;
    top: 0;
    z-index: 1;
}

.ydr-ancient-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--ydr-ivory);
    font-family: var(--ydr-font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(107, 93, 77, 0.3);
}

.ydr-ancient-table tbody tr {
    border-bottom: 1px solid rgba(107, 93, 77, 0.15);
    transition: background 0.2s ease;
}

.ydr-ancient-table tbody tr:hover {
    background: rgba(107, 93, 77, 0.1);
}

/* Clickable row styles for drawer interaction */
.ydr-clickable-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.ydr-clickable-row:hover {
    background: rgba(107, 93, 77, 0.2) !important;
    transform: translateX(4px);
}

.ydr-clickable-row:hover td {
    color: var(--ydr-ivory);
}

.ydr-clickable-row:active {
    background: rgba(107, 93, 77, 0.3) !important;
    transform: translateX(2px);
}

/* Click hint indicator */
.ydr-clickable-row td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--ydr-gold);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s ease;
}

.ydr-clickable-row:hover td:first-child::before {
    height: 60%;
}

.ydr-clickable-row td:first-child {
    position: relative;
}

.ydr-ancient-table td {
    padding: 12px;
    color: var(--ydr-ivory-dim);
    vertical-align: middle;
}

/* Sample Portrait */
.ydr-sample-portrait {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(107, 93, 77, 0.2);
}

.ydr-sample-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ydr-rank-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: linear-gradient(135deg, var(--ydr-gold), var(--ydr-copper));
    color: var(--ydr-deep);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    border: 2px solid var(--ydr-slate-dark);
}

/* Sample Name */
.ydr-sample-name strong {
    color: var(--ydr-ivory);
    font-size: 0.95rem;
}

.ydr-sample-name small {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Era Tag */
.ydr-era-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(107, 93, 77, 0.2);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--ydr-bronze-light);
}

/* Haplogroup Code */
.ydr-haplo-code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    background: rgba(107, 93, 77, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--ydr-gold);
}

/* Match Badge */
.ydr-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ydr-match-exact {
    background: rgba(76, 175, 80, 0.2);
    color: #81C784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.ydr-match-base {
    background: rgba(33, 150, 243, 0.2);
    color: #64B5F6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.ydr-match-subclade {
    background: rgba(156, 39, 176, 0.2);
    color: #BA68C8;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.ydr-match-parent {
    background: rgba(255, 152, 0, 0.2);
    color: #FFB74D;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.ydr-match-close {
    background: rgba(0, 188, 212, 0.2);
    color: #4DD0E1;
    border: 1px solid rgba(0, 188, 212, 0.3);
}

.ydr-match-related {
    background: rgba(158, 158, 158, 0.2);
    color: #BDBDBD;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

/* Ancient Legend */
.ydr-ancient-legend {
    background: rgba(107, 93, 77, 0.1);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-ancient-legend h5 {
    font-family: var(--ydr-font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ydr-ivory);
    margin: 0 0 16px;
}

.ydr-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.ydr-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
}

.ydr-legend-item .ydr-match-badge {
    flex-shrink: 0;
    min-width: 90px;
    justify-content: center;
}

/* Empty State */
.ydr-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(45, 40, 36, 0.5);
    border-radius: 16px;
    border: 1px dashed rgba(107, 93, 77, 0.3);
}

.ydr-empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(107, 93, 77, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--ydr-bronze);
}

.ydr-empty-state h4 {
    font-family: var(--ydr-font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ydr-ivory);
    margin: 0 0 12px;
}

.ydr-empty-state p {
    color: var(--ydr-ivory-dim);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE - ANCIENT MATCHES
   ======================================== */
@media (max-width: 768px) {
    .ydr-ancient-table {
        font-size: 0.85rem;
    }
    
    .ydr-ancient-table th,
    .ydr-ancient-table td {
        padding: 10px 8px;
    }
    
    .ydr-sample-portrait {
        width: 40px;
        height: 40px;
    }
    
    .ydr-legend-grid {
        grid-template-columns: 1fr;
    }
    
    .ydr-ancient-legend {
        padding: 16px;
    }
}

/* ========================================
   CULTURES LINKED SECTION
   ======================================== */
.ydr-cultures-tier {
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(45, 40, 36, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(107, 93, 77, 0.2);
}

.ydr-cultures-tier:last-of-type {
    margin-bottom: 0;
}

.ydr-cultures-primary {
    border-color: rgba(201, 164, 48, 0.35);
    background: linear-gradient(135deg, rgba(201, 164, 48, 0.1) 0%, rgba(45, 40, 36, 0.4) 100%);
}

.ydr-cultures-secondary {
    border-color: rgba(107, 93, 77, 0.3);
    background: linear-gradient(135deg, rgba(107, 93, 77, 0.1) 0%, rgba(45, 40, 36, 0.4) 100%);
}

.ydr-cultures-tier-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--ydr-font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 0 0 12px;
}

.ydr-cultures-tier-title i {
    color: var(--ydr-amber);
    font-size: 1.1rem;
}

.ydr-cultures-secondary .ydr-cultures-tier-title i {
    color: var(--ydr-bronze);
}

.ydr-cultures-tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--ydr-amber) 0%, #d4a96a 100%);
    color: var(--ydr-deep);
}

.ydr-cultures-tier-badge.secondary {
    background: linear-gradient(135deg, var(--ydr-bronze) 0%, var(--ydr-bronze-light) 100%);
    color: white;
}

.ydr-cultures-tier-description {
    font-size: 0.9rem;
    color: var(--ydr-ivory-dim);
    margin: 0 0 20px;
    line-height: 1.6;
}

.ydr-cultures-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ydr-culture-tag {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--ydr-transition-fast);
    cursor: default;
}

.ydr-culture-primary {
    background: linear-gradient(135deg, rgba(201, 164, 48, 0.25) 0%, rgba(201, 164, 48, 0.15) 100%);
    border: 1px solid rgba(201, 164, 48, 0.5);
    color: var(--ydr-gold-light);
    box-shadow: 0 2px 8px rgba(201, 164, 48, 0.15);
}

.ydr-culture-primary:hover {
    background: linear-gradient(135deg, rgba(201, 164, 48, 0.35) 0%, rgba(201, 164, 48, 0.25) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(201, 164, 48, 0.25);
}

.ydr-culture-secondary {
    background: rgba(107, 93, 77, 0.2);
    border: 1px solid rgba(107, 93, 77, 0.4);
    color: var(--ydr-bronze-light);
}

.ydr-culture-secondary:hover {
    background: rgba(107, 93, 77, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 93, 77, 0.25);
}

/* Culture Tag with Portraits */
.ydr-culture-portraits {
    display: flex;
    margin-right: 10px;
    align-items: center;
}

.ydr-culture-portrait-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: -8px;
    flex-shrink: 0;
}

.ydr-culture-portrait-wrapper:first-child {
    margin-left: 0;
}

.ydr-culture-portrait {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(201, 164, 48, 0.6);
    object-fit: cover;
    background: rgba(107, 93, 77, 0.3);
    flex-shrink: 0;
}

.ydr-culture-secondary .ydr-culture-portrait {
    border-color: rgba(107, 93, 77, 0.6);
}

.ydr-culture-portrait-info {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: rgba(15, 20, 25, 0.95);
    padding: 6px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    font-size: 0.7rem;
    border: 1px solid rgba(201, 164, 48, 0.3);
}

.ydr-culture-portrait-wrapper:hover .ydr-culture-portrait-info {
    opacity: 1;
}

.ydr-culture-portrait-masterid {
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.ydr-culture-portrait-country {
    color: var(--ydr-ivory-dim);
    margin-bottom: 2px;
}

.ydr-culture-portrait-era {
    color: var(--ydr-bronze);
    font-size: 0.65rem;
}

.ydr-culture-name {
    white-space: nowrap;
}

.ydr-cultures-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(245, 243, 240, 0.05);
    border-radius: 10px;
    border-left: 3px solid var(--ydr-amber);
    font-size: 0.85rem;
    color: var(--ydr-ivory-dim);
    line-height: 1.6;
}

.ydr-cultures-note i {
    color: var(--ydr-amber);
    margin-top: 2px;
    flex-shrink: 0;
}

/* Responsive Cultures Section */
@media (max-width: 768px) {
    .ydr-cultures-tier {
        padding: 20px;
    }
    
    .ydr-cultures-tier-title {
        font-size: 1.1rem;
    }
    
    .ydr-culture-tag {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .ydr-culture-portrait-wrapper {
        margin-left: -6px;
    }
    
    .ydr-culture-portrait-wrapper:first-child {
        margin-left: 0;
    }
    
    .ydr-culture-portrait {
        width: 24px;
        height: 24px;
    }
    
    .ydr-culture-portraits {
        margin-right: 8px;
    }
    
    .ydr-cultures-tags {
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .ydr-cultures-tier-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ydr-culture-tag {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .ydr-culture-portrait-wrapper {
        margin-left: -5px;
    }
    
    .ydr-culture-portrait-wrapper:first-child {
        margin-left: 0;
    }
    
    .ydr-culture-portrait {
        width: 22px;
        height: 22px;
        border-width: 1.5px;
    }
    
    .ydr-culture-portraits {
        margin-right: 6px;
    }
}

/* ========================================
   CULTURE DRAWER STYLES
   ======================================== */

.culture-drawer-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.culture-drawer-title {
    font-family: var(--ydr-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.culture-drawer-sample-count {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

.culture-drawer-sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.culture-drawer-sample-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all 0.2s ease;
}

.culture-drawer-sample-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.culture-drawer-sample-portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.culture-drawer-sample-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.culture-drawer-sample-info {
    flex: 1;
    min-width: 0;
}

.culture-drawer-sample-id {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.culture-drawer-sample-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.culture-drawer-sample-date,
.culture-drawer-sample-location {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.culture-drawer-sample-date i,
.culture-drawer-sample-location i {
    font-size: 0.75rem;
    opacity: 0.7;
}

.culture-drawer-sample-haplo {
    margin-top: 8px;
    margin-bottom: 8px;
}

.culture-drawer-sample-haplo code {
    font-size: 0.85rem;
    padding: 4px 8px;
}

/* Responsive Culture Drawer */
@media (max-width: 768px) {
    .culture-drawer-sample-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .culture-drawer-sample-card {
        padding: 12px;
    }

    .culture-drawer-sample-portrait {
        width: 50px;
        height: 50px;
    }

    .culture-drawer-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .culture-drawer-sample-grid {
        gap: 10px;
    }

    .culture-drawer-sample-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .culture-drawer-sample-portrait {
        width: 80px;
        height: 80px;
    }
}

/* ========================================
   RESOURCES SECTION
   ======================================== */
.ydr-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.ydr-resource-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(107, 93, 77, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ydr-resource-icon .dna-icon {
    font-size: 1.25rem;
    color: var(--ydr-bronze-light);
}

.ydr-resource-title {
    font-family: var(--ydr-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* ========================================
   ENHANCED PUBLICATION CARDS
   ======================================== */
.ydr-resource-card-enhanced {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: rgba(45, 40, 36, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(245, 243, 240, 0.08);
    transition: all var(--ydr-transition-medium);
}

.ydr-resource-card-enhanced:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 93, 77, 0.3);
    background: rgba(45, 40, 36, 0.7);
}

.ydr-resource-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.ydr-resource-meta {
    flex: 1;
}

.ydr-resource-authors {
    font-size: 0.9rem;
    color: var(--ydr-bronze-light);
    margin-top: 4px;
}

.ydr-resource-year {
    font-size: 0.85rem;
    color: var(--ydr-amber);
    margin-top: 4px;
    font-weight: 600;
}

.ydr-resource-samples {
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid rgba(245, 243, 240, 0.08);
}

.ydr-resource-samples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.ydr-resource-sample-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ydr-resource-sample-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(201, 164, 48, 0.3);
}

.ydr-resource-sample-info {
    text-align: center;
}

.ydr-resource-sample-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.ydr-resource-sample-country {
    font-size: 0.7rem;
    color: var(--ydr-ivory-dim);
    margin-bottom: 2px;
}

.ydr-resource-sample-era {
    font-size: 0.7rem;
    color: var(--ydr-ivory-dim);
}

.ydr-resource-samples-more {
    text-align: center;
    font-size: 0.8rem;
    color: var(--ydr-bronze);
    font-style: italic;
}

.ydr-resource-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 10px 16px;
    background: rgba(107, 93, 77, 0.2);
    border-radius: 8px;
    color: var(--ydr-bronze-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all var(--ydr-transition-fast);
}

.ydr-resource-link:hover {
    background: rgba(107, 93, 77, 0.3);
    color: white;
    text-decoration: none;
}

@media (max-width: 768px) {
    .ydr-resources-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ydr-resource-samples-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ydr-resource-sample-image {
        width: 50px;
        height: 50px;
    }
}


