﻿/** * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * mtDNA Haplogroup Report - Cinematic Styling
 * An intimate, narrative-driven design celebrating the unbroken maternal line.
 */

/* ========================================
   CSS VARIABLES - Maternal Color Palette
   ======================================== */
:root {
    /* Core Colors - Warm maternal tones */
    --mth-deep: #1A1614;
    --mth-warm-dark: #2A2220;
    --mth-warm-medium: #3D3533;
    --mth-rose: #8B3A62;
    --mth-rose-light: #A85478;
    --mth-rose-dark: #6B2A4A;
    --mth-gold: #C4A35A;
    --mth-gold-light: #D4B86E;
    --mth-ivory: #FAF8F5;
    --mth-ivory-dim: rgba(250, 248, 245, 0.7);
    --mth-ivory-soft: rgba(250, 248, 245, 0.5);

    /* Typography */
    --mth-font-display: 'Cormorant Garamond', Georgia, serif;
    --mth-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --mth-section-padding: 100px;
    --mth-section-padding-mobile: 60px;

    /* Transitions */
    --mth-transition-fast: 0.2s ease;
    --mth-transition-medium: 0.4s ease;
    --mth-transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --mth-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.15);
    --mth-shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.2);
    --mth-shadow-strong: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ========================================
   BODY OVERRIDES - Dark warm theme
   ======================================== */
body:has(.mth-main) {
    background-color: var(--mth-deep) !important;
    background-image: none !important;
}

.mth-main {
    background-color: var(--mth-deep);
    color: var(--mth-ivory);
    font-family: var(--mth-font-body);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    position: relative;
    z-index: 1;
}

body:has(.mth-main) #wrapper,
body:has(.mth-main) #content-wrapper,
body:has(.mth-main) #content-fluid,
body:has(.mth-main) > div {
    background: transparent !important;
}

body:has(.mth-main) footer {
    background-color: var(--mth-deep) !important;
}

/* Ensure wrapper structure allows footer to flow naturally */
body:has(.mth-main) #wrapper {
    flex-direction: column !important;
}

body:has(.mth-main) #content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    flex: 1 0 auto !important;
}

.mth-main p {
    color: var(--mth-ivory-dim);
}

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

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

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

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

/* ========================================
   ACCESSIBILITY - Skip Link
   ======================================== */
.mth-skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    background: var(--mth-rose);
    color: white;
    font-weight: 600;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 8px 8px;
    transition: top var(--mth-transition-fast);
}

.mth-skip-link:focus {
    top: 0;
    outline: 3px solid var(--mth-rose-light);
    outline-offset: 2px;
}

/* ========================================
   SCROLL PROGRESS INDICATOR
   ======================================== */
.mth-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--mth-rose), var(--mth-gold));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ========================================
   PAGE NAVIGATION DOTS
   ======================================== */
.mth-page-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
}

.mth-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(250, 248, 245, 0.3);
    border: 2px solid transparent;
    transition: all var(--mth-transition-fast);
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.mth-nav-dot:hover,
.mth-nav-dot.active {
    background: var(--mth-rose);
    transform: scale(1.2);
}

.mth-nav-dot::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--mth-transition-fast);
}

.mth-nav-dot:hover::before {
    opacity: 1;
}

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

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.mth-back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mth-rose);
    color: white;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--mth-transition-medium);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 58, 98, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mth-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mth-back-to-top:hover {
    background: var(--mth-rose-light);
    transform: translateY(-4px);
}

@media (max-width: 576px) {
    .mth-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */
.mth-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1250;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(139, 58, 98, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
}

.mth-bottom-nav-item {
    text-decoration: none;
    color: var(--mth-warm-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all var(--mth-transition-fast);
    opacity: 0.7;
}

.mth-bottom-nav-item i {
    font-size: 1.1rem;
    color: var(--mth-warm-medium);
    transition: all var(--mth-transition-fast);
}

.mth-bottom-nav-item:hover {
    color: var(--mth-rose);
    text-decoration: none;
    opacity: 1;
}

.mth-bottom-nav-item:hover i {
    color: var(--mth-rose);
    transform: scale(1.1);
}

.mth-bottom-nav-item.active {
    color: var(--mth-rose);
    text-decoration: none;
    opacity: 1;
    font-weight: 600;
}

.mth-bottom-nav-item.active i {
    color: var(--mth-gold);
    transform: scale(1.15);
}

/* Adjust main content padding for bottom nav on mobile */
@media (max-width: 767.98px) {
    .mth-main {
        padding-bottom: 80px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mth-back-to-top {
        bottom: 90px;
    }
}

/* ========================================
   SECTION BASE STYLES
   ======================================== */
.mth-section {
    padding: var(--mth-section-padding) 0;
    position: relative;
}

@media (max-width: 768px) {
    .mth-section {
        padding: var(--mth-section-padding-mobile) 0;
    }
}

.mth-chapter-header {
    text-align: center;
    margin-bottom: 60px;
}

.mth-chapter-number {
    display: inline-block;
    font-family: var(--mth-font-display);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--mth-rose);
    margin-bottom: 16px;
}

.mth-section-title {
    font-family: var(--mth-font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: white;
    margin: 0 0 16px;
    line-height: 1.2;
}

.mth-section-subtitle {
    font-size: 1.125rem;
    color: var(--mth-ivory-dim);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========================================
   HERO SECTION - HAPLOGROUP DISPLAY
   ======================================== */
.mth-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
    background: url('/img/reports/haplogroups/mtdna/mtdna-hero.webp') center/cover no-repeat,
                linear-gradient(135deg, #1A1614 0%, #2A2220 50%, #1A1614 100%);
}

.mth-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 22, 20, 0.8) 0%,
        rgba(42, 34, 32, 0.75) 50%,
        rgba(26, 22, 20, 0.8) 100%
    );
    pointer-events: none;
}

/* Animated line motif - representing maternal lineage */
.mth-hero-line-motif {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.mth-hero-line-motif::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(139, 58, 98, 0.3) 20%,
        rgba(139, 58, 98, 0.5) 50%,
        rgba(139, 58, 98, 0.3) 80%,
        transparent 100%
    );
    animation: mthLineGlow 4s ease-in-out infinite;
}

@keyframes mthLineGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.mth-hero-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(139, 58, 98, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(196, 163, 90, 0.06) 0%, transparent 50%);
    animation: mthParticleFloat 20s ease-in-out infinite;
}

@keyframes mthParticleFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); }
}

.mth-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Hero Badge */
.mth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(139, 58, 98, 0.15);
    border: 1px solid rgba(139, 58, 98, 0.3);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--mth-rose-light);
    margin-bottom: 32px;
}

/* Haplogroup Showcase */
.mth-haplogroup-showcase {
    margin-bottom: 40px;
}

.mth-haplogroup-letter {
    display: block;
    font-family: var(--mth-font-display);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--mth-gold) 0%, var(--mth-gold-light) 50%, var(--mth-rose-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    text-shadow: 0 0 60px rgba(196, 163, 90, 0.3);
}

.mth-haplogroup-label {
    display: block;
    font-family: var(--mth-font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--mth-ivory);
    margin-bottom: 12px;
}

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

.mth-explore-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mth-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;
}

.mth-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(--mth-ivory);
}

.mth-confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mth-confidence-badge.high {
    background: rgba(40, 167, 69, 0.2);
    color: #5fd97d;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.mth-confidence-badge.low {
    background: rgba(253, 126, 20, 0.2);
    color: #ffa94d;
    border: 1px solid rgba(253, 126, 20, 0.3);
}

/* Haplogroup Origin Info */
.mth-haplogroup-origin {
    margin-bottom: 40px;
}

.mth-haplogroup-origin p {
    font-size: 1.1rem;
    color: var(--mth-ivory-dim);
    margin: 0;
    line-height: 1.8;
}

.mth-haplogroup-origin strong {
    color: var(--mth-gold);
}

/* Hero Stats */
.mth-hero-stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    flex-wrap: wrap;
    background: rgba(42, 34, 32, 0.6);
    border: 1px solid rgba(139, 58, 98, 0.2);
    border-radius: 16px;
    padding: 24px 16px;
    backdrop-filter: blur(10px);
    max-width: 700px;
    margin: 0 auto;
}

.mth-stat-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 0 24px;
    position: relative;
}

.mth-stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: rgba(250, 248, 245, 0.15);
}

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

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

@media (max-width: 576px) {
    .mth-stat-item:not(:last-child)::after {
        display: none;
    }
    
    .mth-hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .mth-stat-item {
        padding: 16px 0;
        border-bottom: 1px solid rgba(250, 248, 245, 0.1);
    }
    
    .mth-stat-item:last-child {
        border-bottom: none;
    }
}

/* ========================================
   BREADCRUMB STYLING
   ======================================== */
.mth-breadcrumb-container {
    padding: 24px 0;
}

.mth-main .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.mth-main .breadcrumb-item,
.mth-main .breadcrumb-item a {
    color: var(--mth-ivory-dim);
    font-size: 0.9rem;
}

.mth-main .breadcrumb-item a:hover {
    color: var(--mth-rose-light);
}

.mth-main .breadcrumb-item.active {
    color: var(--mth-ivory);
}

.mth-main .breadcrumb-item + .breadcrumb-item::before {
    color: var(--mth-ivory-soft);
}

/* ========================================
   CONFIDENCE WARNING SECTION
   ======================================== */
.mth-confidence-warning {
    background: linear-gradient(135deg, rgba(253, 126, 20, 0.1) 0%, rgba(253, 126, 20, 0.05) 100%);
    border: 1px solid rgba(253, 126, 20, 0.3);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 60px;
}

.mth-confidence-warning h3 {
    color: #ffa94d;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.mth-confidence-warning p {
    color: var(--mth-ivory-dim);
    margin: 0;
}

/* ========================================
   CONTENT CARDS
   ======================================== */
.mth-card {
    background: var(--mth-warm-dark);
    border: 1px solid rgba(139, 58, 98, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--mth-transition-medium);
}

.mth-card:hover {
    border-color: rgba(139, 58, 98, 0.3);
    box-shadow: var(--mth-shadow-medium);
}

.mth-card-header {
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.15) 0%, rgba(139, 58, 98, 0.05) 100%);
    padding: 20px 28px;
    border-bottom: 1px solid rgba(139, 58, 98, 0.15);
    display: flex;
    align-items: center;
    gap: 16px;
}

.mth-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mth-rose) 0%, var(--mth-rose-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

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

.mth-card-body {
    padding: 28px;
}

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

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

/* Read More Button */
.mth-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mth-rose-light);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0;
    transition: all var(--mth-transition-fast);
    cursor: pointer;
    background: none;
    border: none;
}

.mth-read-more:hover {
    color: var(--mth-gold);
}

.mth-read-more i {
    transition: transform var(--mth-transition-fast);
}

.mth-read-more[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* ========================================
   ENHANCED LIST STYLING
   ======================================== */
.mth-enhanced-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mth-enhanced-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--mth-ivory-dim);
    line-height: 1.7;
}

.mth-enhanced-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--mth-rose);
    border-radius: 50%;
}

.mth-enhanced-list li strong {
    color: var(--mth-ivory);
}

/* ========================================
   LINEAGE PATH VISUALIZATION
   ======================================== */
.mth-lineage-path {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 32px 24px;
    background: rgba(26, 22, 20, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(139, 58, 98, 0.15);
}

.mth-lineage-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mth-lineage-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--mth-rose) 0%, var(--mth-rose-dark) 100%);
    border-radius: 30px;
    font-family: var(--mth-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 58, 98, 0.3);
}

.mth-lineage-step .arrow-right {
    color: var(--mth-gold);
    font-size: 1.25rem;
}

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

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

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

.mth-timeline-side {
    position: relative;
    padding-left: 30px;
}

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

.mth-timeline-marker {
    position: relative;
    margin-bottom: 40px;
}

.mth-timeline-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--mth-warm-dark);
    border: 3px solid var(--mth-rose);
    transition: all var(--mth-transition-fast);
}

.mth-timeline-dot.current {
    background: var(--mth-gold);
    border-color: var(--mth-gold);
    box-shadow: 0 0 20px rgba(196, 163, 90, 0.5);
}

.mth-timeline-label {
    font-family: var(--mth-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

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

.mth-content-side {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.mth-description-box {
    background: rgba(42, 34, 32, 0.5);
    border: 1px solid rgba(139, 58, 98, 0.15);
    border-radius: 16px;
    padding: 28px;
}

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

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

.mth-journey-image {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(139, 58, 98, 0.2);
}

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

.mth-journey-image figcaption {
    padding: 12px 16px;
    background: rgba(26, 22, 20, 0.8);
    color: var(--mth-ivory-dim);
    font-size: 0.85rem;
}

/* Current Stats */
.mth-current-stats {
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.15) 0%, rgba(196, 163, 90, 0.1) 100%);
    border: 1px solid rgba(139, 58, 98, 0.2);
    border-radius: 16px;
    padding: 32px;
}

.mth-current-stats .row {
    display: flex;
    flex-wrap: wrap;
}

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

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

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

.mth-population-card {
    background: var(--mth-warm-dark);
    border: 1px solid rgba(139, 58, 98, 0.15);
    border-radius: 16px;
    padding: 28px;
    transition: all var(--mth-transition-medium);
}

.mth-population-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 58, 98, 0.3);
    box-shadow: var(--mth-shadow-medium);
}

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

.mth-population-card h4 i {
    color: var(--mth-rose);
}

/* ========================================
   MUTATIONS SECTION
   ======================================== */

/* mtDNA Regions Grid */
.mth-regions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

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

.mth-region-card {
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.1) 0%, rgba(139, 58, 98, 0.05) 100%);
    border: 1px solid rgba(139, 58, 98, 0.2);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all var(--mth-transition-medium);
}

.mth-region-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 58, 98, 0.4);
    box-shadow: var(--mth-shadow-medium);
}

.mth-region-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.mth-region-hvr1 .mth-region-badge {
    background: linear-gradient(135deg, #C4566A 0%, #9B3A4C 100%);
    color: white;
}

.mth-region-hvr2 .mth-region-badge {
    background: linear-gradient(135deg, #D4A35A 0%, #B8893A 100%);
    color: white;
}

.mth-region-coding .mth-region-badge {
    background: linear-gradient(135deg, #5A6B7A 0%, #3D4D5C 100%);
    color: white;
}

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

.mth-region-positions {
    font-size: 0.9rem;
    color: var(--mth-ivory-dim);
}

/* Reference Sequences Grid */
.mth-reference-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 991px) {
    .mth-reference-grid {
        grid-template-columns: 1fr;
    }
}

.mth-reference-card {
    background: linear-gradient(135deg, rgba(42, 34, 32, 0.6) 0%, rgba(26, 22, 20, 0.8) 100%);
    border: 1px solid rgba(139, 58, 98, 0.15);
    border-radius: 16px;
    padding: 28px;
}

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

.mth-reference-title i {
    color: var(--mth-rose);
    font-size: 1.2rem;
}

.mth-mutation-example {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.mth-mutation-example h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mth-gold);
    margin-bottom: 8px;
}

.mth-mutation-example .small {
    color: var(--mth-ivory-dim);
    margin-bottom: 16px;
}

/* Mutation Notation Display */
.mth-mutation-notation {
    display: flex;
    justify-content: center;
    align-items: baseline;
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 20px 0 12px;
}

.mth-notation-ancestral {
    color: #C4566A;
}

.mth-notation-position {
    color: var(--mth-ivory);
}

.mth-notation-mutation {
    color: #5FD97D;
}

.mth-notation-rcrs .mth-notation-position {
    color: var(--mth-ivory);
}

.mth-notation-labels {
    display: flex;
    justify-content: center;
    gap: 32px;
    font-size: 0.75rem;
    color: var(--mth-ivory-dim);
    text-align: center;
}

.mth-notation-labels span {
    min-width: 60px;
}

.mth-notation-labels-rcrs {
    gap: 48px;
}

.mth-reference-note {
    background: rgba(139, 58, 98, 0.1);
    border: 1px solid rgba(139, 58, 98, 0.2);
    border-radius: 12px;
    padding: 24px;
}

.mth-reference-note h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mth-gold);
    margin-bottom: 16px;
}

.mth-reference-note p {
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Your Mutations Display */
.mth-mutations-display {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.mth-mutation-tag {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.3) 0%, rgba(139, 58, 98, 0.15) 100%);
    border: 1px solid rgba(139, 58, 98, 0.4);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mth-ivory);
    transition: all var(--mth-transition-fast);
}

.mth-mutation-tag:hover {
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.5) 0%, rgba(139, 58, 98, 0.3) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 58, 98, 0.3);
}

/* Extra vs Missing Mutations */
.mth-mutations-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .mth-mutations-types-grid {
        grid-template-columns: 1fr;
    }
}

.mth-mutation-type {
    display: flex;
    gap: 20px;
    padding: 24px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.mth-mutation-extra {
    border-left: 4px solid #5FD97D;
}

.mth-mutation-missing {
    border-left: 4px solid #C4566A;
}

.mth-mutation-type-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.mth-mutation-extra .mth-mutation-type-icon {
    background: rgba(95, 217, 125, 0.15);
    color: #5FD97D;
}

.mth-mutation-missing .mth-mutation-type-icon {
    background: rgba(196, 86, 106, 0.15);
    color: #C4566A;
}

.mth-mutation-type-content h5 {
    font-family: var(--mth-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.mth-mutation-type-content p {
    font-size: 0.9rem;
    color: var(--mth-ivory-dim);
    line-height: 1.7;
    margin: 0;
}

/* Genealogy Comparison Table */
.mth-genealogy-table-wrapper {
    overflow-x: auto;
    margin-top: 24px;
    border-radius: 12px;
    border: 1px solid rgba(139, 58, 98, 0.2);
}

.mth-genealogy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mth-genealogy-table thead {
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.3) 0%, rgba(139, 58, 98, 0.15) 100%);
}

.mth-genealogy-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--mth-ivory);
    border-bottom: 1px solid rgba(139, 58, 98, 0.3);
}

.mth-genealogy-table td {
    padding: 14px 20px;
    color: var(--mth-ivory-dim);
    border-bottom: 1px solid rgba(139, 58, 98, 0.1);
    vertical-align: top;
}

.mth-genealogy-table tbody tr:hover {
    background: rgba(139, 58, 98, 0.1);
}

.mth-genealogy-table tbody tr:last-child td {
    border-bottom: none;
}

.mth-haplogroup-cell {
    font-weight: 600;
    color: var(--mth-rose-light) !important;
    white-space: nowrap;
}

.mth-highlight-row {
    background: rgba(196, 163, 90, 0.25) !important;
    border: 2px solid var(--mth-gold) !important;
}

.mth-highlight-row td {
    color: var(--mth-ivory) !important;
}

.mth-highlight-row:hover {
    background: rgba(196, 163, 90, 0.3) !important;
}

.mth-mutation-diff {
    color: var(--mth-gold);
    font-weight: 600;
}

/* Mutation Summary Section */
.mth-mutation-summary {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(139, 58, 98, 0.2);
}

.mth-mutation-summary h5 {
    font-family: var(--mth-font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
}

.mth-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

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

.mth-summary-stat-item {
    text-align: center;
    padding: 16px;
    background: rgba(139, 58, 98, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(139, 58, 98, 0.3);
}

.mth-summary-stat-value {
    display: block;
    font-family: var(--mth-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--mth-gold);
    line-height: 1.2;
    margin-bottom: 8px;
}

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

.mth-mutation-section {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid rgba(139, 58, 98, 0.5);
    margin-bottom: 24px;
}

.mth-mutation-section h5 {
    font-family: var(--mth-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.mth-mutation-section .mth-mutation-tag.mth-mutation-extra {
    background: linear-gradient(135deg, rgba(95, 217, 125, 0.3) 0%, rgba(95, 217, 125, 0.15) 100%);
    border-color: rgba(95, 217, 125, 0.4);
    color: #5FD97D;
}

.mth-mutation-section .mth-mutation-tag.mth-mutation-missing {
    background: linear-gradient(135deg, rgba(196, 86, 106, 0.3) 0%, rgba(196, 86, 106, 0.15) 100%);
    border-color: rgba(196, 86, 106, 0.4);
    color: #C4566A;
}

.mth-detailed-mutations {
    border-top: 1px solid rgba(139, 58, 98, 0.2);
    padding-top: 24px;
}

.mth-detailed-mutations-content {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(139, 58, 98, 0.2);
}

.mth-detailed-mutations-content h6 {
    font-family: var(--mth-font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--mth-gold);
    margin-bottom: 12px;
}

.mth-detailed-mutations-content .mth-mutations-display {
    margin-top: 12px;
}

/* ========================================
   AI ASSISTANT SECTION
   ======================================== */
.mth-ai-section {
    background: linear-gradient(135deg, rgba(42, 34, 32, 0.8) 0%, rgba(26, 22, 20, 0.9) 100%);
    border: 1px solid rgba(139, 58, 98, 0.2);
    border-radius: 20px;
    padding: 40px;
}

.mth-ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.mth-ai-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mth-ai-title i {
    font-size: 1.5rem;
    color: var(--mth-rose);
}

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

.mth-ai-title small {
    font-size: 0.75rem;
    color: var(--mth-ivory-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mth-ai-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.mth-ai-badge.badge-success {
    background: rgba(40, 167, 69, 0.2);
    color: #5fd97d;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.mth-ai-badge.badge-warning {
    background: rgba(253, 126, 20, 0.2);
    color: #ffa94d;
    border: 1px solid rgba(253, 126, 20, 0.3);
}

.mth-ai-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(250, 248, 245, 0.05);
    border-radius: 12px;
    margin-bottom: 24px;
}

.mth-ai-info i {
    color: var(--mth-gold);
    margin-top: 3px;
}

.mth-ai-info p {
    margin: 0;
    color: var(--mth-ivory-dim);
    font-size: 0.95rem;
}

.mth-suggested-prompts {
    margin-bottom: 24px;
}

.mth-suggested-prompts > p {
    font-size: 0.85rem;
    color: var(--mth-ivory-dim);
    margin-bottom: 12px;
}

.mth-prompt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(139, 58, 98, 0.15);
    border: 1px solid rgba(139, 58, 98, 0.3);
    border-radius: 30px;
    color: var(--mth-ivory);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--mth-transition-fast);
    margin-right: 10px;
    margin-bottom: 10px;
}

.mth-prompt-btn:hover {
    background: rgba(139, 58, 98, 0.3);
    border-color: var(--mth-rose);
    transform: translateY(-2px);
}

.mth-prompt-btn i {
    color: var(--mth-rose-light);
}

.mth-ai-main-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--mth-rose) 0%, var(--mth-rose-dark) 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--mth-transition-medium);
    box-shadow: 0 4px 20px rgba(139, 58, 98, 0.3);
}

.mth-ai-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 58, 98, 0.4);
}

.mth-ai-main-btn img {
    width: 24px;
    height: 24px;
}

.mth-ai-results {
    margin-top: 24px;
    padding: 24px;
    background: rgba(250, 248, 245, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(139, 58, 98, 0.15);
}

.mth-ai-results:empty {
    display: none;
}

.mth-ai-results .ai-result-content {
    color: var(--mth-ivory-dim);
    line-height: 1.8;
}

/* Sample output for unlicensed */
.mth-sample-output {
    margin-top: 24px;
}

.mth-sample-output h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mth-sample-output h6 i {
    color: var(--mth-gold);
}

.mth-sample-content {
    padding: 20px;
    background: rgba(250, 248, 245, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(139, 58, 98, 0.15);
}

.mth-sample-content p {
    margin: 0;
}

.mth-unlock-cta {
    text-align: center;
    margin-top: 24px;
}

.mth-unlock-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--mth-transition-medium);
}

.mth-unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

/* ========================================
   FAQ SECTION
   ======================================== */
.mth-faq-section {
    background: rgba(42, 34, 32, 0.5);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(139, 58, 98, 0.15);
}

.mth-faq-title {
    font-family: var(--mth-font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.mth-faq-title i {
    color: var(--mth-rose);
}

.mth-faq-subtitle {
    text-align: center;
    color: var(--mth-ivory-dim);
    margin-bottom: 40px;
}

.mth-faq-item {
    border-bottom: 1px solid rgba(139, 58, 98, 0.15);
}

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

.mth-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--mth-transition-fast);
}

.mth-faq-question:hover {
    color: var(--mth-rose-light);
}

.mth-faq-question span {
    flex: 1;
}

.mth-faq-question i {
    color: var(--mth-rose);
    transition: transform var(--mth-transition-fast);
}

.mth-faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.mth-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--mth-transition-medium), padding var(--mth-transition-medium);
}

.mth-faq-answer.active {
    max-height: 500px;
    padding-bottom: 20px;
}

.mth-faq-answer p {
    color: var(--mth-ivory-dim);
    line-height: 1.8;
    margin: 0;
}

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

.mth-resource-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    background: var(--mth-warm-dark);
    border: 1px solid rgba(139, 58, 98, 0.15);
    border-radius: 16px;
    text-decoration: none;
    color: var(--mth-ivory);
    transition: all var(--mth-transition-medium);
}

.mth-resource-card:hover {
    transform: translateY(-6px);
    border-color: var(--mth-rose);
    box-shadow: var(--mth-shadow-medium);
    text-decoration: none;
    color: var(--mth-ivory);
}

.mth-resource-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.3) 0%, rgba(139, 58, 98, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.mth-resource-icon i {
    font-size: 1.25rem;
    color: var(--mth-rose);
}

.mth-resource-title {
    font-family: var(--mth-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.mth-resource-description {
    color: var(--mth-ivory-dim);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ========================================
   ENHANCED PUBLICATION CARDS (using ydr- classes from view)
   ======================================== */
.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(139, 58, 98, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

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

.ydr-resource-card-enhanced {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: rgba(42, 34, 32, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(139, 58, 98, 0.15);
    transition: all var(--mth-transition-medium);
}

.ydr-resource-card-enhanced:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 58, 98, 0.3);
    background: rgba(42, 34, 32, 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(--mth-rose-light);
    margin-top: 4px;
}

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

.ydr-resource-samples {
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid rgba(139, 58, 98, 0.15);
}

.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(196, 163, 90, 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-era {
    font-size: 0.7rem;
    color: var(--mth-ivory-dim);
}

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

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

.ydr-resource-link:hover {
    background: rgba(139, 58, 98, 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;
    }
}

/* ========================================
   KEY TAKEAWAYS SECTION
   ======================================== */
.mth-summary-card {
    background: linear-gradient(135deg, rgba(42, 34, 32, 0.9) 0%, rgba(26, 22, 20, 0.95) 100%);
    border: 1px solid rgba(139, 58, 98, 0.2);
    border-radius: 20px;
    overflow: hidden;
}

.mth-summary-header {
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.2) 0%, rgba(139, 58, 98, 0.1) 100%);
    padding: 24px 32px;
    border-bottom: 1px solid rgba(139, 58, 98, 0.15);
    display: flex;
    align-items: center;
    gap: 16px;
}

.mth-summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mth-rose) 0%, var(--mth-rose-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.mth-summary-header h2 {
    font-family: var(--mth-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.mth-summary-body {
    padding: 32px;
}

.mth-summary-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

@media (max-width: 991px) {
    .mth-summary-content {
        grid-template-columns: 1fr;
    }
}

.mth-summary-text p {
    color: var(--mth-ivory-dim);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.mth-summary-text h3 {
    font-family: var(--mth-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mth-gold);
    margin-bottom: 16px;
}

.mth-haplogroup-summary {
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.15) 0%, rgba(196, 163, 90, 0.1) 100%);
    border: 1px solid rgba(139, 58, 98, 0.2);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.mth-summary-haplogroup {
    font-family: var(--mth-font-display);
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--mth-gold) 0%, var(--mth-rose-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.mth-summary-label {
    color: var(--mth-ivory-dim);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

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

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

/* ========================================
   FOOTER NOTE
   ======================================== */
.mth-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(253, 126, 20, 0.1);
    border: 1px solid rgba(253, 126, 20, 0.2);
    border-radius: 12px;
    margin: 40px 0;
}

.mth-footer-note i {
    color: #ffa94d;
    margin-top: 3px;
}

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

.mth-footer-note strong {
    color: #ffa94d;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.mth-animate-fade-in {
    animation: mthFadeIn 0.8s ease forwards;
}

.mth-animate-fade-in-up {
    animation: mthFadeInUp 0.8s ease forwards;
}

.mth-delay-1 { animation-delay: 0.2s; }
.mth-delay-2 { animation-delay: 0.4s; }
.mth-delay-3 { animation-delay: 0.6s; }
.mth-delay-4 { animation-delay: 0.8s; }

@keyframes mthFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .mth-scroll-progress,
    .mth-page-nav,
    .mth-back-to-top,
    .mth-bottom-nav,
    .mth-hero-line-motif,
    .mth-hero-particles,
    .mth-ai-section,
    .mth-prompt-btn,
    .mth-ai-main-btn {
        display: none !important;
    }
    
    .mth-main {
        background: white !important;
        color: #333 !important;
    }
    
    .mth-hero {
        min-height: auto;
        padding: 40px 0;
        background: #f5f5f5 !important;
    }
    
    .mth-haplogroup-letter {
        color: #333 !important;
        -webkit-text-fill-color: #333 !important;
    }
    
    .mth-card,
    .mth-faq-section,
    .mth-summary-card {
        background: white !important;
        border: 1px solid #ddd !important;
    }
    
    .mth-section-title,
    .mth-card-title,
    .mth-faq-title {
        color: #333 !important;
    }
    
    .mth-main p,
    .mth-enhanced-list li {
        color: #555 !important;
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .mth-hero {
        padding: 100px 16px 60px;
        min-height: auto;
    }
    
    .mth-hero-badge {
        font-size: 0.75rem;
        padding: 8px 16px;
    }
    
    .mth-haplogroup-letter {
        font-size: 4rem;
    }
    
    .mth-haplogroup-label {
        font-size: 1.25rem;
    }
    
    .mth-card-header {
        padding: 16px 20px;
    }
    
    .mth-card-body {
        padding: 20px;
    }
    
    .mth-ai-section,
    .mth-faq-section {
        padding: 24px;
    }
    
    .mth-lineage-path {
        flex-direction: column;
        gap: 16px;
    }
    
    .mth-lineage-step {
        flex-direction: column;
        gap: 8px;
    }
    
    .mth-lineage-step .arrow-right {
        transform: rotate(90deg);
    }
}

@media (max-width: 576px) {
    .mth-chapter-header {
        margin-bottom: 40px;
    }
    
    .mth-section-title {
        font-size: 1.75rem;
    }
    
    .mth-section-subtitle {
        font-size: 1rem;
    }
    
    .mth-summary-content {
        gap: 24px;
    }
    
    .mth-summary-body {
        padding: 20px;
    }
}

/* ========================================
   ANCIENT SAMPLES TABLE STYLES
   ======================================== */

.mth-ancient-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: var(--mth-shadow-soft);
}

.mth-ancient-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--mth-warm-dark);
    font-size: 0.9rem;
}

.mth-ancient-table thead {
    background: linear-gradient(135deg, var(--mth-rose-dark) 0%, var(--mth-rose) 100%);
}

.mth-ancient-table thead th {
    padding: 14px 12px;
    text-align: left;
    color: var(--mth-ivory);
    font-weight: 600;
    font-family: var(--mth-font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.mth-ancient-table tbody tr {
    border-bottom: 1px solid rgba(250, 248, 245, 0.1);
    transition: background-color var(--mth-transition-fast);
}

.mth-ancient-table tbody tr:hover {
    background: rgba(139, 58, 98, 0.15);
}

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

/* Sample Portrait */
.mth-sample-portrait {
    position: relative;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 50%;
}

.mth-sample-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid var(--mth-warm-medium);
    transition: border-color var(--mth-transition-fast);
}

.mth-ancient-table tbody tr:hover .mth-sample-portrait img {
    border-color: var(--mth-rose);
}

/* Clickable row styles for drawer interaction */
.mth-clickable-row {
    cursor: pointer;
    transition: all var(--mth-transition-fast);
}

.mth-clickable-row:hover {
    background: rgba(139, 58, 98, 0.2) !important;
    transform: translateX(4px);
}

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

.mth-clickable-row:active {
    background: rgba(139, 58, 98, 0.3) !important;
    transform: translateX(2px);
}

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

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

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

.mth-rank-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--mth-gold) 0%, var(--mth-gold-light) 100%);
    color: var(--mth-deep);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Sample Name */
.mth-sample-name strong {
    color: var(--mth-ivory);
    font-weight: 600;
}

.mth-sample-name small {
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Era Tag */
.mth-era-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(139, 58, 98, 0.3);
    color: var(--mth-rose-light);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Haplogroup Code */
.mth-haplo-code {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(196, 163, 90, 0.2);
    color: var(--mth-gold-light);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    border: 1px solid rgba(196, 163, 90, 0.3);
}

/* Match Badge */
.mth-match-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.mth-match-exact {
    background: linear-gradient(135deg, #2d7a4f 0%, #38a169 100%);
    color: #ffffff;
}

.mth-match-base {
    background: linear-gradient(135deg, #2b6cb0 0%, #4299e1 100%);
    color: #ffffff;
}

.mth-match-subclade {
    background: linear-gradient(135deg, #6b46c1 0%, #805ad5 100%);
    color: #ffffff;
}

.mth-match-parent {
    background: linear-gradient(135deg, #d69e2e 0%, #ecc94b 100%);
    color: #1a1a1a;
}

.mth-match-close {
    background: linear-gradient(135deg, #c53030 0%, #e53e3e 100%);
    color: #ffffff;
}

.mth-match-related {
    background: rgba(250, 248, 245, 0.2);
    color: var(--mth-ivory-dim);
    border: 1px solid rgba(250, 248, 245, 0.3);
}

/* Legend */
.mth-ancient-legend {
    background: rgba(250, 248, 245, 0.05);
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid rgba(250, 248, 245, 0.1);
}

.mth-ancient-legend h5 {
    color: var(--mth-ivory);
    font-family: var(--mth-font-display);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.mth-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.mth-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mth-legend-item span:last-child {
    color: var(--mth-ivory-dim);
    font-size: 0.85rem;
}

/* Empty State */
.mth-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.mth-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(139, 58, 98, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mth-empty-icon i {
    font-size: 2rem;
    color: var(--mth-rose-light);
}

.mth-empty-state h4 {
    color: var(--mth-ivory);
    font-family: var(--mth-font-display);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

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

/* Responsive Ancient Table */
@media (max-width: 992px) {
    .mth-ancient-table thead th,
    .mth-ancient-table tbody td {
        padding: 10px 8px;
    }
    
    .mth-sample-portrait,
    .mth-sample-portrait img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .mth-ancient-table {
        font-size: 0.8rem;
    }
    
    /* Hide some columns on mobile */
    .mth-ancient-table thead th:nth-child(5),
    .mth-ancient-table tbody td:nth-child(5),
    .mth-ancient-table thead th:nth-child(6),
    .mth-ancient-table tbody td:nth-child(6) {
        display: none;
    }
    
    .mth-legend-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .mth-ancient-table thead th:nth-child(3),
    .mth-ancient-table tbody td:nth-child(3) {
        display: none;
    }
    
    .mth-sample-portrait,
    .mth-sample-portrait img {
        width: 36px;
        height: 36px;
    }
}

/* ========================================
   CULTURES LINKED SECTION
   ======================================== */
.mth-cultures-tier {
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(42, 34, 32, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(139, 58, 98, 0.15);
}

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

.mth-cultures-primary {
    border-color: rgba(196, 163, 90, 0.3);
    background: linear-gradient(135deg, rgba(196, 163, 90, 0.08) 0%, rgba(42, 34, 32, 0.4) 100%);
}

.mth-cultures-secondary {
    border-color: rgba(139, 58, 98, 0.2);
    background: linear-gradient(135deg, rgba(139, 58, 98, 0.08) 0%, rgba(42, 34, 32, 0.4) 100%);
}

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

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

.mth-cultures-secondary .mth-cultures-tier-title i {
    color: var(--mth-rose-light);
}

.mth-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(--mth-gold) 0%, var(--mth-gold-light) 100%);
    color: var(--mth-deep);
}

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

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

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

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

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

.mth-culture-primary:hover {
    background: linear-gradient(135deg, rgba(196, 163, 90, 0.35) 0%, rgba(196, 163, 90, 0.25) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(196, 163, 90, 0.25);
}

.mth-culture-secondary {
    background: rgba(139, 58, 98, 0.15);
    border: 1px solid rgba(139, 58, 98, 0.35);
    color: var(--mth-rose-light);
}

.mth-culture-secondary:hover {
    background: rgba(139, 58, 98, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 58, 98, 0.2);
}

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

.mth-culture-portrait {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(196, 163, 90, 0.6);
    object-fit: cover;
    margin-left: -8px;
    background: rgba(139, 58, 98, 0.3);
    flex-shrink: 0;
}

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

.mth-culture-secondary .mth-culture-portrait {
    border-color: rgba(139, 58, 98, 0.6);
}

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

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

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

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

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

/* ========================================
   CULTURE DRAWER THEME STYLES (mtDNA Rose/Pink Theme)
   ======================================== */

/* Override drawer panel background for mtDNA theme */
.mth-main #cultureDrawer .haplo-drawer-panel,
.mth-main #haplogroupDrawer .haplo-drawer-panel {
    background: linear-gradient(180deg, var(--mth-warm-dark) 0%, var(--mth-deep) 100%);
    border-left-color: rgba(139, 58, 98, 0.3);
}

@media (max-width: 768px) {
    .mth-main #cultureDrawer .haplo-drawer-panel,
    .mth-main #haplogroupDrawer .haplo-drawer-panel {
        border-top-color: rgba(139, 58, 98, 0.3);
    }
}

/* Culture Drawer Header */
.culture-drawer-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(139, 58, 98, 0.3);
    margin-bottom: 24px;
}

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

.culture-drawer-sample-count {
    font-size: 0.9rem;
    color: var(--mth-ivory-dim);
    margin-top: 8px;
}

/* Culture Drawer Sample Grid */
.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(42, 34, 32, 0.5);
    border: 1px solid rgba(139, 58, 98, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all var(--mth-transition-fast);
}

.culture-drawer-sample-card:hover {
    background: rgba(42, 34, 32, 0.7);
    border-color: rgba(139, 58, 98, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 58, 98, 0.2);
}

.culture-drawer-sample-portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(139, 58, 98, 0.4);
    background: rgba(139, 58, 98, 0.1);
}

.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: var(--mth-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mth-ivory);
    margin-bottom: 4px;
}

.culture-drawer-sample-name {
    font-size: 0.85rem;
    color: var(--mth-ivory-dim);
    margin-bottom: 8px;
}

.culture-drawer-sample-date,
.culture-drawer-sample-location {
    font-size: 0.8rem;
    color: var(--mth-ivory-soft);
    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;
    color: var(--mth-rose-light);
}

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

.culture-drawer-sample-haplo code {
    font-size: 0.85rem;
    padding: 4px 8px;
    background: rgba(139, 58, 98, 0.2);
    border: 1px solid rgba(139, 58, 98, 0.3);
    color: var(--mth-rose-light);
}

/* 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;
    }
}

/* ========================================
   ALERT OVERRIDES - Fix text color for light alerts
   ======================================== */
.mth-main .alert-light {
    color: var(--mth-deep) !important;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.mth-main .alert-light p {
    color: var(--mth-deep) !important;
}

.mth-main .alert-light strong {
    color: var(--mth-deep) !important;
}

.mth-main .alert-light .dna-icon {
    color: var(--mth-rose) !important;
}


