/** * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * 
 * Jewish Ancestry Report V2 - Premium Narrative Experience
 * A reverent, editorial-driven report honoring continuity, memory, and genetic heritage.
 */

/* ========================================
   CSS Variables - Warm Parchment Palette
   ======================================== */
:root {
    /* Primary - Warm Stone */
    --jar-stone-50: #FEFDFB;
    --jar-stone-100: #F5F1EB;
    --jar-stone-200: #E8E0D4;
    --jar-stone-300: #D4C9B8;
    --jar-stone-400: #B5A690;
    --jar-stone-500: #8F7E67;
    --jar-stone-600: #6B5E4F;
    --jar-stone-700: #4D4439;
    --jar-stone-800: #352F26;
    --jar-stone-900: #2C2519;
    
    /* Accent - Aged Gold (subdued, timeless) */
    --jar-gold: #9E7E42;
    --jar-gold-light: #C4A86B;
    --jar-gold-dark: #7A6234;
    --jar-gold-muted: rgba(158, 126, 66, 0.15);
    
    /* Jewish Blue - Deep, Regal */
    --jar-blue: #1E3A5F;
    --jar-blue-light: #2C5282;
    --jar-blue-dark: #152A45;
    
    /* Background - Parchment */
    --jar-parchment: #FAF6EF;
    --jar-parchment-dark: #F0E8DB;
    --jar-parchment-warm: #F7F0E3;
    
    /* Text */
    --jar-text-primary: #2C2519;
    --jar-text-secondary: #5D5244;
    --jar-text-muted: #7A6F5E;
    --jar-text-light: #A69C8A;
    
    /* Functional */
    --jar-success: #5E8B5A;
    --jar-success-light: #7BA377;
    --jar-info: #4A90A4;
    --jar-warning: #C9A227;
    --jar-border: rgba(107, 94, 79, 0.15);
    --jar-shadow-color: rgba(44, 37, 25, 0.08);
    --jar-shadow-color-md: rgba(44, 37, 25, 0.12);
    --jar-shadow-color-lg: rgba(44, 37, 25, 0.18);
    
    /* Typography */
    --jar-font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --jar-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --jar-section-padding: 5rem;
    --jar-section-padding-mobile: 3rem;
    
    /* Transitions */
    --jar-transition-base: 0.3s ease;
    --jar-transition-slow: 0.5s ease;
}

/* ========================================
   Base & Typography
   ======================================== */
.jar-main {
    font-family: var(--jar-font-sans);
    color: var(--jar-text-primary);
    background-color: var(--jar-parchment);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Skip Link (Accessibility)
   ======================================== */
.jar-skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--jar-gold);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 10000;
    font-weight: 500;
    transition: top 0.3s ease;
}

.jar-skip-link:focus {
    top: 0;
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
.jar-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--jar-gold) 0%, var(--jar-gold-light) 100%);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ========================================
   Page Navigation Dots
   ======================================== */
.jar-page-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.jar-nav-dot {
    width: 10px;
    height: 10px;
    background: transparent;
    border: 2px solid var(--jar-stone-400);
    border-radius: 50%;
    transition: all var(--jar-transition-base);
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.jar-nav-dot:hover,
.jar-nav-dot.active {
    background: var(--jar-gold);
    border-color: var(--jar-gold);
    transform: scale(1.2);
}

.jar-nav-dot::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--jar-stone-900);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--jar-transition-base);
    font-size: 0.8rem;
    font-family: var(--jar-font-sans);
}

.jar-nav-dot:hover::after {
    opacity: 1;
}

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

/* ========================================
   Back to Top Button
   ======================================== */
.jar-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--jar-stone-800);
    color: var(--jar-stone-100);
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--jar-transition-base);
    z-index: 999;
    box-shadow: 0 4px 12px var(--jar-shadow-color-md);
}

.jar-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.jar-back-to-top:hover {
    background: var(--jar-gold);
    transform: translateY(-3px);
}

.jar-back-to-top:focus {
    outline: 3px solid var(--jar-gold-light);
    outline-offset: 2px;
}

/* ========================================
   Mobile Bottom Navigation
   ======================================== */
.jar-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1250;
    background: rgba(44, 37, 25, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
}

.jar-bottom-nav-item {
    text-decoration: none;
    color: var(--jar-stone-300);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all var(--jar-transition-base);
}

.jar-bottom-nav-item i {
    font-size: 1rem;
}

.jar-bottom-nav-item:hover,
.jar-bottom-nav-item.active {
    color: var(--jar-gold);
    text-decoration: none;
}

/* Adjust main content padding for bottom nav on mobile */
@media (max-width: 767.98px) {
    .jar-main {
        padding-bottom: 80px;
    }
    
    .jar-back-to-top {
        bottom: 90px;
    }
}

/* ========================================
   HERO SECTION - Report Results Display
   ======================================== */
.jar-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        180deg, 
        rgba(44, 37, 25, 0.75) 0%, 
        rgba(44, 37, 25, 0.85) 100%
    ), url('/img/reports/ancestry/jewish/jewish-hero.webp') center/cover no-repeat;
    background-attachment: fixed;
}

.jar-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(44, 37, 25, 0.3) 100%
    );
    pointer-events: none;
}

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

.jar-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(158, 126, 66, 0.2);
    border: 1px solid var(--jar-gold);
    color: var(--jar-gold-light);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.jar-hero-badge i {
    margin-right: 0.5rem;
}

.jar-hero-sample {
    font-family: var(--jar-font-sans);
    font-size: 0.875rem;
    color: rgba(250, 246, 239, 0.7);
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jar-hero-result {
    margin-bottom: 1.5rem;
}

.jar-hero-percentage {
    font-family: var(--jar-font-serif);
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 600;
    color: var(--jar-gold-light);
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.jar-hero-percentage-label {
    font-family: var(--jar-font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--jar-parchment);
    margin-top: 0.5rem;
}

.jar-hero-epigraph {
    font-family: var(--jar-font-serif);
    font-size: 1.125rem;
    font-style: italic;
    color: rgba(250, 246, 239, 0.75);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.jar-hero-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: rgba(250, 246, 239, 0.7);
}

.jar-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Scroll indicator */
.jar-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(250, 246, 239, 0.5);
    text-decoration: none;
    transition: color var(--jar-transition-base);
}

.jar-scroll-indicator:hover {
    color: rgba(250, 246, 239, 0.8);
}

.jar-scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.jar-scroll-indicator i {
    animation: jar-bounce 2s infinite;
}

@keyframes jar-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(6px); }
    60% { transform: translateY(3px); }
}

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

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

.jar-section-parchment {
    background-color: var(--jar-parchment);
}

.jar-section-warm {
    background-color: var(--jar-parchment-warm);
}

.jar-section-stone {
    background-color: var(--jar-stone-100);
}

.jar-section-dark {
    background-color: var(--jar-stone-800);
    color: var(--jar-stone-100);
}

/* Chapter header */
.jar-chapter-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.jar-chapter-marker {
    font-family: var(--jar-font-serif);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--jar-gold);
    margin-bottom: 0.75rem;
    display: block;
}

.jar-section-title {
    font-family: var(--jar-font-serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 500;
    color: var(--jar-text-primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.jar-section-dark .jar-section-title {
    color: var(--jar-parchment);
}

.jar-section-subtitle {
    font-family: var(--jar-font-sans);
    font-size: 1.0625rem;
    font-weight: 400;
    color: var(--jar-text-secondary);
    line-height: 1.7;
}

.jar-section-dark .jar-section-subtitle {
    color: var(--jar-stone-300);
}

/* ========================================
   NARRATIVE TEXT BLOCKS
   ======================================== */
.jar-narrative {
    max-width: 720px;
    margin: 0 auto;
}

.jar-narrative p {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--jar-text-secondary);
    margin-bottom: 1.5rem;
}

.jar-narrative p:last-child {
    margin-bottom: 0;
}

.jar-narrative-lead {
    font-family: var(--jar-font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--jar-text-primary);
    line-height: 1.7;
}

.jar-blockquote {
    font-family: var(--jar-font-serif);
    font-size: 1.375rem;
    font-weight: 400;
    font-style: italic;
    color: var(--jar-text-primary);
    text-align: center;
    padding: 2rem 0;
    margin: 2.5rem 0;
    border-top: 1px solid var(--jar-border);
    border-bottom: 1px solid var(--jar-border);
    line-height: 1.6;
}

/* ========================================
   RESULT HIGHLIGHT CARDS
   ======================================== */
.jar-result-highlight {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 30px var(--jar-shadow-color-md);
    border: 1px solid var(--jar-border);
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.jar-result-percentage {
    font-family: var(--jar-font-serif);
    font-size: 4rem;
    font-weight: 600;
    color: var(--jar-gold);
    line-height: 1;
}

.jar-result-label {
    font-size: 1rem;
    color: var(--jar-text-secondary);
    margin-top: 0.5rem;
}

/* Stats Grid */
.jar-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 600px;
    margin: 2rem auto;
}

.jar-stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--jar-border);
    box-shadow: 0 2px 12px var(--jar-shadow-color);
    transition: all var(--jar-transition-base);
}

.jar-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--jar-shadow-color-md);
}

.jar-stat-value {
    font-family: var(--jar-font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--jar-gold);
    line-height: 1;
}

.jar-stat-label {
    font-size: 0.875rem;
    color: var(--jar-text-muted);
    margin-top: 0.5rem;
}

@media (max-width: 576px) {
    .jar-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   CHROMOSOME BROWSER WRAPPER
   ======================================== */
.jar-chromosome-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 40px var(--jar-shadow-color-md);
    border: 1px solid var(--jar-border);
    overflow: hidden;
    margin: 2rem auto;
    max-width: 1000px;
}

.jar-chromosome-header {
    background: linear-gradient(135deg, var(--jar-stone-800) 0%, var(--jar-stone-700) 100%);
    color: #FEFDFB !important;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.jar-chromosome-header i {
    color: var(--jar-gold-light) !important;
}

.jar-chromosome-header h4 {
    margin: 0;
    font-family: var(--jar-font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: #FEFDFB !important;
}

.jar-chromosome-body {
    padding: 2rem;
}

.jar-chromosome-intro {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--jar-border);
}

.jar-chromosome-intro p {
    font-size: 0.95rem;
    color: var(--jar-text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   IBD SEGMENTS TABLE (Premium Styling)
   ======================================== */
.jar-ibd-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 30px var(--jar-shadow-color-md);
    border: 1px solid var(--jar-border);
    overflow: hidden;
    margin: 2rem auto;
    max-width: 900px;
}

.jar-ibd-header {
    background: linear-gradient(135deg, var(--jar-stone-800) 0%, var(--jar-stone-700) 100%);
    color: var(--jar-stone-50) !important;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.jar-ibd-header i {
    color: var(--jar-gold-light) !important;
}

.jar-ibd-header h4 {
    margin: 0;
    font-family: var(--jar-font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--jar-stone-50) !important;
}

.jar-ibd-body {
    padding: 0;
}

.jar-ibd-table {
    width: 100%;
    border-collapse: collapse;
}

.jar-ibd-table th,
.jar-ibd-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--jar-border);
    font-size: 0.9rem;
}

.jar-ibd-table th {
    font-weight: 600;
    color: var(--jar-text-muted);
    background: var(--jar-stone-50);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.jar-ibd-table td {
    color: var(--jar-text-secondary);
}

.jar-ibd-table tbody tr:hover {
    background: var(--jar-parchment);
}

.jar-ibd-table tbody tr:last-child td {
    border-bottom: none;
}

.jar-ibd-badge {
    display: inline-block;
    background: var(--jar-gold-muted);
    color: var(--jar-gold-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.jar-ibd-match {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jar-ibd-match i {
    color: var(--jar-gold);
}

/* ========================================
   SHOW MORE BUTTON
   ======================================== */
.jar-show-more-wrapper {
    padding: 1.5rem 0;
    border-top: 1px solid var(--jar-border);
}

.jar-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--jar-border);
    color: var(--jar-text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--jar-transition-base);
    font-family: var(--jar-font-sans);
}

.jar-show-more-btn:hover {
    background: var(--jar-gold-muted);
    border-color: var(--jar-gold);
    color: var(--jar-gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(158, 126, 66, 0.2);
}

.jar-show-more-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(158, 126, 66, 0.2);
}

.jar-show-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.jar-show-more-btn:disabled:hover {
    background: white;
    border-color: var(--jar-border);
    color: var(--jar-text-secondary);
    box-shadow: none;
}

.jar-show-more-btn i {
    transition: transform var(--jar-transition-base);
}

.jar-show-more-btn:hover i {
    transform: translateY(2px);
}

/* ========================================
   HISTORICAL TIMELINE
   ======================================== */
.jar-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.jar-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--jar-gold-muted);
}

@media (max-width: 768px) {
    .jar-timeline::before {
        left: 20px;
    }
}

.jar-timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 2.5rem;
}

.jar-timeline-item:last-child {
    padding-bottom: 0;
}

.jar-timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid var(--jar-gold);
    border-radius: 50%;
}

.jar-timeline-date {
    font-family: var(--jar-font-serif);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--jar-gold);
    margin-bottom: 0.5rem;
}

.jar-timeline-title {
    font-family: var(--jar-font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--jar-text-primary);
    margin-bottom: 0.5rem;
}

.jar-timeline-location {
    font-size: 0.875rem;
    color: var(--jar-text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jar-timeline-desc {
    font-size: 0.95rem;
    color: var(--jar-text-secondary);
    line-height: 1.7;
}

.jar-timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.jar-timeline-tag {
    font-size: 0.75rem;
    background: var(--jar-parchment-dark);
    color: var(--jar-text-muted);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

/* ========================================
   MIGRATION ROUTE ELEMENTS (within timeline)
   ======================================== */
.jar-migration-route {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--jar-text-muted);
}

.jar-migration-route-icon {
    color: var(--jar-text-muted);
    flex-shrink: 0;
}

.jar-migration-route strong {
    color: var(--jar-text-primary);
    font-weight: 600;
}

.jar-migration-destinations {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.jar-migration-dest {
    font-size: 0.8rem;
    background: var(--jar-blue);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */
.jar-faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.jar-faq-item {
    border: 1px solid var(--jar-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: white;
    transition: box-shadow var(--jar-transition-base);
}

.jar-faq-item:hover {
    box-shadow: 0 4px 16px var(--jar-shadow-color);
}

.jar-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--jar-font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--jar-text-primary);
    transition: background var(--jar-transition-base);
}

.jar-faq-question:hover {
    background: var(--jar-stone-50);
}

.jar-faq-question:focus {
    outline: 3px solid var(--jar-gold);
    outline-offset: -3px;
}

.jar-faq-question i {
    transition: transform var(--jar-transition-base);
    color: var(--jar-text-muted);
    flex-shrink: 0;
    margin-left: 1rem;
}

.jar-faq-item.active .jar-faq-question i {
    transform: rotate(180deg);
}

.jar-faq-answer {
    display: none;
    padding: 0 1.5rem 1.5rem;
}

.jar-faq-item.active .jar-faq-answer {
    display: block;
}

.jar-faq-answer p {
    font-size: 0.95rem;
    color: var(--jar-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.jar-faq-answer p:last-child {
    margin-bottom: 0;
}

.jar-faq-answer ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.jar-faq-answer li {
    font-size: 0.95rem;
    color: var(--jar-text-secondary);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

/* ========================================
   AI ASSISTANT SECTION
   ======================================== */
.jar-ai-section {
    background: linear-gradient(135deg, var(--jar-stone-100) 0%, var(--jar-parchment-warm) 100%);
    border-radius: 16px;
    padding: 3rem;
    margin-top: 2rem;
    border: 1px solid var(--jar-border);
}

.jar-ai-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.jar-ai-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--jar-gold) 0%, var(--jar-gold-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.jar-ai-title h4 {
    font-family: var(--jar-font-serif);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--jar-text-primary);
    margin: 0;
}

.jar-ai-title h4 small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--jar-text-muted);
    display: block;
    margin-top: 0.25rem;
    font-family: var(--jar-font-sans);
}

.jar-ai-badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

.jar-ai-badge.badge-success {
    background: var(--jar-success);
    color: white;
}

.jar-ai-badge.badge-warning {
    background: var(--jar-warning);
    color: var(--jar-text-primary);
}

.jar-ai-info {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid var(--jar-border);
}

.jar-ai-info i {
    color: var(--jar-info);
    margin-top: 0.2rem;
}

.jar-ai-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--jar-text-secondary);
    line-height: 1.6;
}

.jar-ai-prompts {
    margin-bottom: 1.5rem;
}

.jar-ai-prompts-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--jar-text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jar-ai-prompts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.jar-ai-prompt-btn {
    background: white;
    border: 1px solid var(--jar-border);
    color: var(--jar-text-primary);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--jar-transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jar-ai-prompt-btn:hover {
    background: var(--jar-gold-muted);
    border-color: var(--jar-gold);
    color: var(--jar-gold-dark);
}

.jar-ai-prompt-btn i {
    color: var(--jar-gold);
}

.jar-ai-main-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--jar-stone-800);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--jar-transition-base);
}

.jar-ai-main-btn:hover {
    background: var(--jar-gold);
    transform: translateY(-2px);
}

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

.jar-ai-results {
    margin-top: 1.5rem;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--jar-border);
    min-height: 100px;
}

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

.jar-ai-sample {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--jar-border);
    margin-bottom: 1.5rem;
}

.jar-ai-sample h6 {
    font-family: var(--jar-font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--jar-text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jar-ai-sample h6 i {
    color: var(--jar-warning);
}

.jar-ai-sample-content {
    background: var(--jar-parchment);
    border-radius: 6px;
    padding: 1rem;
}

.jar-ai-sample-content p {
    font-size: 0.9rem;
    color: var(--jar-text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.jar-ai-sample-content p:last-child {
    margin-bottom: 0;
}

.jar-ai-unlock-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--jar-success);
    color: white;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--jar-transition-base);
}

.jar-ai-unlock-btn:hover {
    background: var(--jar-success-light);
    color: white;
    text-decoration: none;
}

/* ========================================
   ACTION BUTTONS / EXPORT
   ======================================== */
.jar-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.jar-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--jar-transition-base);
    text-decoration: none;
    cursor: pointer;
}

.jar-action-btn-outline {
    background: transparent;
    border: 1px solid var(--jar-border);
    color: var(--jar-text-secondary);
}

.jar-action-btn-outline:hover {
    background: var(--jar-stone-100);
    border-color: var(--jar-stone-300);
    color: var(--jar-text-primary);
}

/* ========================================
   FOOTER NOTE
   ======================================== */
.jar-footer-note {
    background: var(--jar-parchment-dark);
    border: 1px solid var(--jar-border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 3rem 0 0;
}

.jar-footer-note i {
    color: var(--jar-info);
    margin-top: 0.2rem;
}

.jar-footer-note p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--jar-text-secondary);
    line-height: 1.6;
}

/* ========================================
   EXPLORE CARDS - Premium Heritage Design
   ======================================== */
.jar-explore-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 1200px) {
    .jar-explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
}

@media (max-width: 640px) {
    .jar-explore-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Card Container */
.jar-explore-card {
    position: relative;
    background: linear-gradient(
        165deg,
        var(--jar-stone-50) 0%,
        var(--jar-parchment) 50%,
        var(--jar-parchment-warm) 100%
    );
    border-radius: 12px;
    border: 1px solid var(--jar-stone-200);
    box-shadow: 
        0 4px 20px var(--jar-shadow-color),
        0 1px 3px rgba(44, 37, 25, 0.06);
    transition: 
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease,
        border-color 0.3s ease;
    overflow: hidden;
}

.jar-explore-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 50px var(--jar-shadow-color-lg),
        0 8px 25px var(--jar-shadow-color-md);
    border-color: var(--jar-gold);
}

/* Card Inner Content */
.jar-explore-card-inner {
    position: relative;
    padding: 2.25rem 1.75rem 2rem;
    text-align: center;
    z-index: 2;
}

/* Gold Accent Line (revealed on hover) */
.jar-explore-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(
        180deg,
        var(--jar-gold-light) 0%,
        var(--jar-gold) 50%,
        var(--jar-gold-dark) 100%
    );
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: 
        opacity 0.3s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jar-explore-card:hover .jar-explore-accent {
    opacity: 1;
    transform: scaleY(1);
}

/* Decorative Corner Elements */
.jar-explore-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.jar-explore-card:hover .jar-explore-corner {
    opacity: 0.7;
}

.jar-explore-corner-tl {
    top: 12px;
    left: 12px;
    border-top: 2px solid var(--jar-gold);
    border-left: 2px solid var(--jar-gold);
}

.jar-explore-corner-br {
    bottom: 12px;
    right: 12px;
    border-bottom: 2px solid var(--jar-gold);
    border-right: 2px solid var(--jar-gold);
}

/* Icon Wrapper - Premium Circular Container */
.jar-explore-icon-wrapper {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(
        145deg,
        var(--jar-stone-100) 0%,
        var(--jar-stone-200) 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 15px var(--jar-shadow-color),
        inset 0 2px 4px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(44, 37, 25, 0.05);
    border: 1px solid var(--jar-stone-200);
    transition: 
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        background 0.3s ease;
}

.jar-explore-card:hover .jar-explore-icon-wrapper {
    transform: scale(1.08);
    background: linear-gradient(
        145deg,
        rgba(158, 126, 66, 0.15) 0%,
        rgba(158, 126, 66, 0.08) 100%
    );
    box-shadow: 
        0 8px 25px rgba(158, 126, 66, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(158, 126, 66, 0.15);
    border-color: var(--jar-gold);
}

.jar-explore-icon-wrapper i {
    font-size: 1.75rem;
    color: var(--jar-gold);
    transition: 
        color 0.3s ease,
        transform 0.3s ease;
}

.jar-explore-card:hover .jar-explore-icon-wrapper i {
    color: var(--jar-gold-dark);
    transform: scale(1.05);
}

/* Title - Editorial Serif Typography */
.jar-explore-title {
    font-family: var(--jar-font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--jar-text-primary);
    margin-bottom: 0.875rem;
    letter-spacing: 0.01em;
    line-height: 1.35;
    transition: color 0.3s ease;
}

.jar-explore-card:hover .jar-explore-title {
    color: var(--jar-stone-800);
}

/* Description - Refined Body Text */
.jar-explore-desc {
    font-family: var(--jar-font-sans);
    font-size: 0.9375rem;
    color: var(--jar-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    min-height: 4.5em;
}

/* Elegant Link - Animated Underline Style */
.jar-explore-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--jar-font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--jar-gold);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease, gap 0.3s ease;
}

.jar-explore-link span {
    position: relative;
}

.jar-explore-link span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--jar-gold) 0%, var(--jar-gold-light) 100%);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jar-explore-link:hover span::after,
.jar-explore-card:hover .jar-explore-link span::after {
    width: 100%;
}

.jar-explore-link i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.jar-explore-link:hover,
.jar-explore-card:hover .jar-explore-link {
    color: var(--jar-gold-dark);
    gap: 0.75rem;
}

.jar-explore-link:hover i,
.jar-explore-card:hover .jar-explore-link i {
    transform: translateX(4px);
}

/* Focus States for Accessibility */
.jar-explore-link:focus {
    outline: none;
}

.jar-explore-link:focus-visible {
    outline: 2px solid var(--jar-gold);
    outline-offset: 4px;
    border-radius: 2px;
}

.jar-explore-card:focus-within {
    border-color: var(--jar-gold);
    box-shadow: 
        0 20px 50px var(--jar-shadow-color-lg),
        0 0 0 3px rgba(158, 126, 66, 0.2);
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
    .jar-explore-card-inner {
        padding: 2rem 1.5rem 1.75rem;
    }
    
    .jar-explore-icon-wrapper {
        width: 64px;
        height: 64px;
    }
    
    .jar-explore-icon-wrapper i {
        font-size: 1.5rem;
    }
    
    .jar-explore-title {
        font-size: 1.125rem;
    }
    
    .jar-explore-desc {
        font-size: 0.875rem;
        min-height: auto;
        margin-bottom: 1.25rem;
    }
    
    .jar-explore-corner {
        width: 20px;
        height: 20px;
    }
    
    .jar-explore-corner-tl {
        top: 10px;
        left: 10px;
    }
    
    .jar-explore-corner-br {
        bottom: 10px;
        right: 10px;
    }
}

/* Print Styles */
@media print {
    .jar-explore-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .jar-explore-accent,
    .jar-explore-corner {
        display: none;
    }
    
    .jar-explore-link {
        color: #333;
    }
    
    .jar-explore-link::after {
        content: ' â†’';
    }
}

/* ========================================
   NO DETECTION HERO VARIANT
   ======================================== */
.jar-hero-nd {
    background: linear-gradient(
        180deg, 
        rgba(44, 37, 25, 0.75) 0%, 
        rgba(44, 37, 25, 0.85) 100%
    ), url('/img/reports/ancestry/jewish/jewish-hero.webp') center/cover no-repeat;
    background-attachment: fixed;
}

.jar-nd-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.jar-nd-icon i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.jar-nd-message {
    font-family: var(--jar-font-serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 500;
    color: white;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.jar-nd-subtext {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========================================
   EXPLANATION CARDS (Reasons grid)
   ======================================== */
.jar-reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

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

.jar-reason-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--jar-border);
    box-shadow: 0 2px 12px var(--jar-shadow-color);
}

.jar-reason-card h5 {
    font-family: var(--jar-font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--jar-text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jar-reason-card h5 i {
    color: var(--jar-gold);
}

.jar-reason-card p {
    font-size: 0.9rem;
    color: var(--jar-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   CALLOUTS
   ======================================== */
.jar-callout {
    background: white;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid;
    margin: 2rem 0;
}

.jar-callout-info {
    border-left-color: var(--jar-info);
    background: rgba(74, 144, 164, 0.05);
}

.jar-callout-info i {
    color: var(--jar-info);
}

.jar-callout-warning {
    border-left-color: var(--jar-warning);
    background: rgba(201, 162, 39, 0.05);
}

.jar-callout-warning i {
    color: var(--jar-warning);
}

.jar-callout i {
    margin-top: 0.2rem;
    font-size: 1.125rem;
}

.jar-callout-content h6 {
    font-weight: 600;
    color: var(--jar-text-primary);
    margin-bottom: 0.5rem;
}

.jar-callout-content p {
    font-size: 0.9rem;
    color: var(--jar-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   METHODOLOGY SECTION
   ======================================== */
.jar-methodology-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

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

.jar-methodology-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--jar-border);
}

.jar-methodology-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--jar-stone-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jar-stone-600);
    font-size: 1.125rem;
}

.jar-methodology-content h4 {
    font-family: var(--jar-font-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--jar-text-primary);
    margin-bottom: 0.375rem;
}

.jar-methodology-content p {
    font-size: 0.9rem;
    color: var(--jar-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.jar-fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.jar-fade-in.visible {
    opacity: 1;
}

.jar-fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.jar-fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .jar-fade-in,
    .jar-fade-in-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .jar-scroll-indicator i {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .jar-hero {
        min-height: 100vh;
        background-attachment: scroll;
    }
    
    .jar-hero-content {
        padding: 1.5rem;
    }
    
    .jar-hero-percentage {
        font-size: 4rem;
    }
    
    .jar-hero-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .jar-ai-section {
        padding: 2rem 1.5rem;
    }
    
    .jar-ai-header {
        flex-wrap: wrap;
    }
    
    .jar-ai-badge {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .jar-back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 576px) {
    .jar-hero-percentage {
        font-size: 3rem;
    }
    
    .jar-section {
        padding: 2.5rem 0;
    }
    
    .jar-chapter-header {
        margin-bottom: 2rem;
    }
    
    .jar-chromosome-body,
    .jar-ibd-body {
        padding: 1rem;
    }
    
    .jar-ai-prompts-grid {
        flex-direction: column;
    }
    
    .jar-ai-prompt-btn {
        justify-content: center;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .jar-page-nav,
    .jar-back-to-top,
    .jar-bottom-nav,
    .jar-scroll-progress,
    .jar-scroll-indicator,
    .jar-ai-section,
    .jar-actions {
        display: none !important;
    }
    
    .jar-hero {
        min-height: auto;
        padding: 2rem 0;
        background: none !important;
        color: black;
    }
    
    .jar-hero-badge,
    .jar-hero-sample,
    .jar-hero-percentage,
    .jar-hero-percentage-label,
    .jar-hero-epigraph {
        color: black !important;
    }
    
    .jar-section {
        padding: 1.5rem 0;
        page-break-inside: avoid;
    }
    
    .jar-chromosome-wrapper,
    .jar-ibd-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .jar-chromosome-header,
    .jar-ibd-header {
        background: #f5f5f5 !important;
        color: black !important;
    }
    
    .jar-fade-in,
    .jar-fade-in-up {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ========================================
   CHROMOSOME BROWSER - PARCHMENT THEME OVERRIDES
   Overrides dark theme styles to match Jewish Ancestry parchment aesthetic
   ======================================== */

/* Main Container Override */
.jar-main .dar-chromo-container {
    background: var(--jar-stone-50);
    border: 1px solid var(--jar-border);
    border-radius: 12px;
}

/* Tab Navigation Override */
.jar-main .dar-chromo-tabs {
    background: var(--jar-stone-200);
    border: 1px solid var(--jar-border);
    box-shadow: inset 0 1px 3px rgba(44, 37, 25, 0.1);
}

.jar-main .dar-chromo-tabs .nav-link,
.jar-main .dar-chromo-tab {
    color: var(--jar-text-secondary);
    background: transparent;
}

.jar-main .dar-chromo-tabs .nav-link:hover,
.jar-main .dar-chromo-tab:hover {
    color: var(--jar-text-primary);
    background: rgba(158, 126, 66, 0.1);
}

.jar-main .dar-chromo-tabs .nav-link.active,
.jar-main .dar-chromo-tab.active {
    color: white;
    background: var(--jar-gold);
    box-shadow: 0 2px 8px rgba(158, 126, 66, 0.35);
}

.jar-main .dar-chromo-tabs .nav-link i,
.jar-main .dar-chromo-tab i {
    opacity: 0.8;
}

.jar-main .dar-chromo-tabs .nav-link.active i,
.jar-main .dar-chromo-tab.active i {
    opacity: 1;
}

/* Section Headers Override */
.jar-main .dar-chromo-section-header h3,
.jar-main .dar-chromo-section-header h4 {
    color: var(--jar-text-primary);
}

.jar-main .dar-chromo-section-header h4 i {
    color: var(--jar-gold);
}

.jar-main .dar-chromo-section-header p,
.jar-main .dar-chromo-section-header h6 {
    color: var(--jar-text-secondary);
}

/* Population Filter Override */
.jar-main .dar-population-filter {
    background: linear-gradient(180deg, var(--jar-stone-100) 0%, rgba(245, 241, 235, 0.9) 100%);
    border: 1px solid var(--jar-border);
}

.jar-main .dar-population-filter h4 {
    color: var(--jar-text-primary);
    border-bottom-color: var(--jar-border);
}

.jar-main .dar-population-filter h4 i {
    color: var(--jar-gold);
}

.jar-main .dar-population-item {
    color: var(--jar-text-secondary);
}

.jar-main .dar-population-item:hover {
    background: rgba(158, 126, 66, 0.08);
    border-color: var(--jar-border);
}

.jar-main .dar-population-item.selected {
    background: rgba(158, 126, 66, 0.15);
    border-color: var(--jar-gold);
}

/* Chromosome Visualization Override */
.jar-main .dar-chromo-visualization {
    background: var(--jar-stone-100);
    border: 1px solid var(--jar-border);
}

/* Chromosome Label Override */
.jar-main .dar-chromo-label {
    background: linear-gradient(145deg, var(--jar-stone-200) 0%, var(--jar-stone-100) 100%);
    border: 1px solid var(--jar-border);
    color: var(--jar-text-primary);
    box-shadow: 0 2px 4px rgba(44, 37, 25, 0.1);
}

/* Progress Bar (Chromosome) Override */
.jar-main .dar-chromo-container .progress {
    background: var(--jar-stone-200);
    box-shadow: none;
    border: 1px solid var(--jar-border);
}

.jar-main .dar-chromo-container .progress::before {
    display: none;
}

.jar-main .dar-chromo-container .progress-bar:not(.dar-chromo-empty)::after {
    display: none;
}

/* Empty Chromosome Segments */
.jar-main .dar-chromo-empty {
    background: var(--jar-stone-200) !important;
}

/* Centromere Gap - Proper Rounding Override */
/* Fix squared corners where segments meet the centromere gap */
.jar-main .dar-chromo-container .d-flex > .progress:first-child {
    border-radius: var(--dar-dna-radius) var(--dar-dna-radius) var(--dar-dna-radius) var(--dar-dna-radius);
}

.jar-main .dar-chromo-container .d-flex > .progress:first-child .progress-bar:last-child {
    border-radius: 0 var(--dar-dna-radius) var(--dar-dna-radius) 0;
}

.jar-main .dar-chromo-container .d-flex > .progress:last-child {
    border-radius: var(--dar-dna-radius) var(--dar-dna-radius) var(--dar-dna-radius) var(--dar-dna-radius);
}

.jar-main .dar-chromo-container .d-flex > .progress:last-child .progress-bar:first-child {
    border-radius: var(--dar-dna-radius) 0 0 var(--dar-dna-radius);
}

/* Ensure all progress bars have rounded edges when they're at boundaries */
.jar-main .dar-chromo-container .progress .progress-bar:first-child {
    border-radius: var(--dar-dna-radius) 0 0 var(--dar-dna-radius);
}

.jar-main .dar-chromo-container .progress .progress-bar:last-child {
    border-radius: 0 var(--dar-dna-radius) var(--dar-dna-radius) 0;
}

.jar-main .dar-chromo-container .progress .progress-bar:only-child {
    border-radius: var(--dar-dna-radius);
}

/* Critical: clip progress bars to the rounded chromosome arms (fixes squared ends) */
.jar-main .dar-chromo-container .progress,
.jar-main .dar-chromo-container .d-flex > .progress {
    overflow: hidden !important;
    border-radius: var(--dar-dna-radius) !important;
}

.jar-main .dar-chromo-container .progress::before {
    border-radius: inherit;
}

/* Chromosome Pills Override */
.jar-main .dar-chromo-pills .nav-link,
.jar-main .dar-chromo-pill {
    color: var(--jar-text-secondary);
    background: linear-gradient(145deg, var(--jar-stone-100) 0%, rgba(245, 241, 235, 0.9) 100%);
    border: 1px solid var(--jar-border);
    box-shadow: 0 2px 4px rgba(44, 37, 25, 0.08);
}

.jar-main .dar-chromo-pills .nav-link:hover,
.jar-main .dar-chromo-pill:hover {
    color: var(--jar-text-primary);
    background: var(--jar-stone-200);
    border-color: var(--jar-gold);
}

.jar-main .dar-chromo-pills .nav-link.active,
.jar-main .dar-chromo-pill.active {
    color: white;
    background: var(--jar-gold);
    border-color: var(--jar-gold);
    box-shadow: 0 2px 8px rgba(158, 126, 66, 0.4);
}

/* Data Tables Override */
.jar-main .dar-data-table {
    background: white;
    border: 1px solid var(--jar-border);
}

.jar-main .dar-data-table thead {
    background: linear-gradient(135deg, var(--jar-stone-700) 0%, var(--jar-stone-600) 100%);
}

.jar-main .dar-data-table thead th {
    color: var(--jar-stone-100);
    border-bottom-color: var(--jar-border);
}

.jar-main .dar-data-table tbody tr {
    border-bottom-color: var(--jar-border);
}

.jar-main .dar-data-table tbody tr:hover {
    background: rgba(158, 126, 66, 0.06);
}

.jar-main .dar-data-table tbody tr:nth-child(even) {
    background: var(--jar-parchment);
}

.jar-main .dar-data-table tbody tr:nth-child(even):hover {
    background: rgba(158, 126, 66, 0.08);
}

.jar-main .dar-data-table tbody td {
    color: var(--jar-text-secondary);
    border-bottom-color: var(--jar-border);
}

.jar-main .dar-table-responsive {
    border-radius: 10px;
}

/* Vertical Progress Bars Override */
.jar-main .dar-progress-vertical {
    background: var(--jar-stone-200);
    box-shadow: inset 0 1px 3px rgba(44, 37, 25, 0.1);
}

/* Chord Chart Container Override */
.jar-main .dar-chord-container {
    background: var(--jar-stone-100);
    border: 1px solid var(--jar-border);
}

.jar-main .dar-chord-chart-container {
    background: var(--jar-parchment);
    border: 1px solid var(--jar-border);
}

/* Chord Stats Override */
.jar-main .dar-chord-stats {
    background: linear-gradient(145deg, var(--jar-stone-100) 0%, rgba(245, 241, 235, 0.9) 100%);
    border: 1px solid var(--jar-border);
}

.jar-main .dar-chord-stats-header {
    color: var(--jar-text-secondary);
    border-bottom-color: var(--jar-border);
}

.jar-main .dar-chord-stats-header i {
    color: var(--jar-gold);
}

.jar-main .dar-chord-stat-item {
    background: rgba(44, 37, 25, 0.05);
}

.jar-main .dar-chord-stat-value {
    color: var(--jar-text-primary);
}

.jar-main .dar-chord-stat-label {
    color: var(--jar-text-muted);
}

.jar-main .dar-chord-stat-highlight {
    background: rgba(158, 126, 66, 0.15);
    border: 1px solid rgba(158, 126, 66, 0.3);
}

.jar-main .dar-chord-stat-highlight .dar-chord-stat-value {
    color: var(--jar-gold);
}

/* Chord Legend Override */
.jar-main .dar-chord-legend {
    background: linear-gradient(145deg, var(--jar-stone-100) 0%, rgba(245, 241, 235, 0.9) 100%);
    border: 1px solid var(--jar-border);
}

.jar-main .dar-chord-legend-header {
    color: var(--jar-text-secondary);
}

.jar-main .dar-chord-legend-header:hover {
    background: rgba(158, 126, 66, 0.05);
}

.jar-main .dar-chord-legend-header i:first-child {
    color: var(--jar-gold);
}

.jar-main .dar-chord-legend-list {
    scrollbar-color: var(--jar-gold) var(--jar-stone-100);
}

.jar-main .dar-chord-legend-list::-webkit-scrollbar-track {
    background: var(--jar-stone-100);
}

.jar-main .dar-chord-legend-list::-webkit-scrollbar-thumb {
    background: var(--jar-gold);
}

.jar-main .dar-chord-legend-item:hover {
    background: rgba(158, 126, 66, 0.08);
}

.jar-main .dar-chord-legend-item.selected {
    background: rgba(158, 126, 66, 0.2);
    border-color: var(--jar-gold);
}

.jar-main .dar-chord-legend-name {
    color: var(--jar-text-secondary);
}

.jar-main .dar-chord-legend-count {
    color: var(--jar-text-muted);
    background: rgba(44, 37, 25, 0.1);
}

.jar-main .dar-chord-legend-more {
    color: var(--jar-text-muted);
}

/* Chord Help Button Override */
.jar-main .dar-chord-help-btn {
    background: var(--jar-stone-200);
    border: 1px solid var(--jar-border);
    color: var(--jar-text-muted);
}

.jar-main .dar-chord-help-btn:hover,
.jar-main .dar-chord-help-btn:focus {
    background: var(--jar-gold);
    color: white;
    border-color: var(--jar-gold);
}

/* Chord Reset Button Override */
.jar-main .dar-chord-reset-btn {
    background: var(--jar-gold);
    color: white;
    box-shadow: 0 4px 12px rgba(158, 126, 66, 0.4);
}

.jar-main .dar-chord-reset-btn:hover {
    box-shadow: 0 6px 16px rgba(158, 126, 66, 0.5);
}

/* Tooltips Override */
.jar-main .dar-chromo-container .tooltip-inner {
    background: linear-gradient(145deg, var(--jar-stone-100) 0%, var(--jar-parchment-warm) 100%);
    color: var(--jar-text-primary);
    border: 1px solid var(--jar-gold);
    box-shadow: 0 8px 32px rgba(44, 37, 25, 0.2), 
                0 0 0 1px rgba(158, 126, 66, 0.2) inset;
}

.jar-main .dar-chromo-container .tooltip-inner strong {
    color: var(--jar-gold);
}

.jar-main .dar-chromo-container .tooltip.bs-tooltip-top .arrow::before {
    border-top-color: var(--jar-stone-100);
}

.jar-main .dar-chromo-container .tooltip.bs-tooltip-bottom .arrow::before {
    border-bottom-color: var(--jar-stone-100);
}

.jar-main .dar-chromo-container .tooltip.bs-tooltip-left .arrow::before {
    border-left-color: var(--jar-stone-100);
}

.jar-main .dar-chromo-container .tooltip.bs-tooltip-right .arrow::before {
    border-right-color: var(--jar-stone-100);
}

/* Popover Override */
.jar-main .popover {
    background: var(--jar-stone-100);
    border: 1px solid var(--jar-border);
    box-shadow: 0 8px 24px rgba(44, 37, 25, 0.15);
}

.jar-main .popover-header {
    background: var(--jar-stone-200);
    border-bottom: 1px solid var(--jar-border);
    color: var(--jar-text-primary);
}

.jar-main .popover-body {
    color: var(--jar-text-secondary);
}

/* Bootstrap Overrides for Parchment Theme */
.jar-main .dar-chromo-container .bg-light-darker {
    background: var(--jar-stone-200) !important;
}

.jar-main .dar-chromo-container .text-dark {
    color: var(--jar-text-secondary) !important;
}

.jar-main .dar-chromo-container .font-weight-bold {
    color: var(--jar-text-primary);
}

.jar-main .dar-chromo-container .thead-dark th,
.jar-main .dar-chromo-container .table-dark th {
    background: linear-gradient(135deg, var(--jar-stone-700) 0%, var(--jar-stone-600) 100%);
    border-color: var(--jar-border);
    color: var(--jar-stone-100);
}

.jar-main .dar-chromo-container .table-striped tbody tr:nth-of-type(odd) {
    background: transparent;
}

.jar-main .dar-chromo-container .table-striped tbody tr:nth-of-type(even) {
    background: var(--jar-parchment);
}

.jar-main .dar-chromo-container .table tbody td {
    color: var(--jar-text-secondary);
    border-color: var(--jar-border);
}

.jar-main .dar-chromo-container .table tbody tr:hover {
    background: rgba(158, 126, 66, 0.08);
}

.jar-main .dar-chromo-container .bg-content {
    background: var(--jar-stone-100) !important;
    border: 1px solid var(--jar-border);
    color: var(--jar-text-primary) !important;
}

.jar-main .dar-chromo-container .hideItem {
    background-color: var(--jar-stone-200) !important;
    opacity: 0.25;
}

/* Sample Drawer Override for Parchment Theme */
.jar-main .dar-sample-drawer-panel {
    background: var(--jar-parchment);
    box-shadow: -8px 0 32px rgba(44, 37, 25, 0.15);
}

.jar-main .dar-sample-drawer-header {
    background: linear-gradient(135deg, var(--jar-stone-700) 0%, var(--jar-stone-600) 100%);
}

.jar-main .dar-sample-drawer-title {
    color: var(--jar-stone-100);
}

.jar-main .dar-sample-drawer-title i {
    color: var(--jar-gold-light);
}

.jar-main .dar-sample-drawer-close {
    background: rgba(0, 0, 0, 0.15);
    color: var(--jar-stone-100);
}

.jar-main .dar-sample-drawer-close:hover {
    background: rgba(0, 0, 0, 0.25);
}

.jar-main .dar-sample-drawer-body {
    scrollbar-color: var(--jar-gold) var(--jar-stone-100);
}

.jar-main .dar-sample-drawer-body::-webkit-scrollbar-track {
    background: var(--jar-stone-100);
}

.jar-main .dar-sample-drawer-body::-webkit-scrollbar-thumb {
    background: var(--jar-gold);
}

.jar-main .dar-sample-drawer-section {
    border-bottom-color: var(--jar-border);
}

.jar-main .dar-sample-drawer-section-title {
    color: var(--jar-gold);
}

.jar-main .dar-sample-drawer-metadata-item {
    background: var(--jar-stone-100);
    border: 1px solid var(--jar-border);
}

.jar-main .dar-sample-drawer-metadata-label {
    color: var(--jar-text-muted);
}

.jar-main .dar-sample-drawer-metadata-value {
    color: var(--jar-text-primary);
}

.jar-main .dar-sample-drawer-actions {
    background: var(--jar-stone-200);
    border-top-color: var(--jar-border);
}

.jar-main .dar-btn-drawer-primary {
    color: white;
    background: var(--jar-gold);
}

.jar-main .dar-btn-drawer-primary:hover,
.jar-main .dar-btn-drawer-primary:focus {
    background: var(--jar-gold-light);
    color: white;
    box-shadow: 0 4px 12px rgba(158, 126, 66, 0.4);
}

.jar-main .dar-btn-drawer-secondary {
    color: var(--jar-text-secondary);
    background: white;
    border: 1px solid var(--jar-border);
}

.jar-main .dar-btn-drawer-secondary:hover,
.jar-main .dar-btn-drawer-secondary:focus {
    color: var(--jar-text-primary);
    background: var(--jar-stone-100);
    border-color: var(--jar-gold);
}

/* Sample Link Override */
.jar-main .dar-sample-link {
    color: var(--jar-text-primary);
}

.jar-main .dar-sample-link:hover {
    color: var(--jar-gold);
}

.jar-main .dar-sample-link i {
    color: var(--jar-gold);
}

/* Action Buttons Override */
.jar-main .dar-btn-action {
    color: var(--jar-text-secondary);
    background: white;
    border: 1px solid var(--jar-border);
}

.jar-main .dar-btn-action:hover,
.jar-main .dar-btn-action:focus {
    color: var(--jar-text-primary);
    border-color: var(--jar-gold);
    background: rgba(158, 126, 66, 0.1);
}

.jar-main .dar-btn-info-drawer:hover {
    color: white;
    background: var(--jar-gold);
    border-color: var(--jar-gold);
}

/* Empty State Override */
.jar-main .dar-chromo-empty-state {
    color: var(--jar-text-muted);
}

.jar-main .dar-chromo-empty-state h5 {
    color: var(--jar-text-primary);
}

/* Loading State Override */
.jar-main .dar-sample-drawer-loading {
    color: var(--jar-text-muted);
}

.jar-main .dar-sample-drawer-loading .spinner-border {
    color: var(--jar-gold);
}

/* Print Styles for Chromosome Browser Override */
@media print {
    .jar-main .dar-chromo-container {
        background: #fff;
        border-color: #ddd;
    }
    
    .jar-main .dar-chromo-tabs .nav-link,
    .jar-main .dar-chromo-tab {
        color: #333;
        background: #f5f5f5;
        border: 1px solid #ddd;
    }
    
    .jar-main .dar-chromo-tabs .nav-link.active,
    .jar-main .dar-chromo-tab.active {
        color: #fff;
        background: var(--jar-gold);
    }
    
    .jar-main .dar-population-filter {
        background: #f9f9f9;
        border-color: #ddd;
    }
    
    .jar-main .dar-population-filter h4,
    .jar-main .dar-population-item {
        color: #333;
    }
    
    .jar-main .dar-chromo-section-header h3,
    .jar-main .dar-chromo-section-header h4 {
        color: #333;
    }
    
    .jar-main .dar-chromo-section-header p {
        color: #666;
    }
    
    .jar-main .dar-data-table thead {
        background: var(--jar-stone-600);
    }
    
    .jar-main .dar-data-table tbody td {
        color: #333;
        border-color: #ddd;
    }
    
    .jar-main .dar-chromo-label {
        background: #f0f0f0;
        color: #333;
        border-color: #ddd;
    }
    
    .jar-main .dar-chromo-container .progress,
    .jar-main .dar-chromo-empty {
        background: #e5e5e5 !important;
    }
}

/* ========================================
   CUSTOM LOADING OVERLAY - Star of David Theme
   ======================================== */
.jar-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E3A5F 0%, #152A45 50%, #0F1E32 100%);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

.jar-loading-overlay.jar-overlay-fadeout {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Background with Warm Parchment Glow */
.jar-loading-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.jar-loading-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: blur(2px) sepia(20%);
    animation: jarLoadingBgPulse 5s ease-in-out infinite;
}

.jar-loading-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at center, transparent 0%, rgba(30, 58, 95, 0.5) 60%, rgba(15, 30, 50, 0.75) 100%),
        linear-gradient(180deg, rgba(158, 126, 66, 0.08) 0%, transparent 40%, transparent 60%, rgba(158, 126, 66, 0.05) 100%);
}

@keyframes jarLoadingBgPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.02); }
}

/* Warm Glow Effect */
.jar-loading-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 60%, rgba(158, 126, 66, 0.12) 0%, transparent 45%);
    animation: jarWarmGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes jarWarmGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Loading Content Container */
.jar-loading-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 500px;
}

/* Star of David Spinner */
.jar-loading-spinner {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jar-spinner-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.jar-ring-outer {
    width: 100%;
    height: 100%;
    border-top-color: var(--jar-gold);
    border-right-color: var(--jar-gold);
    animation: jarSpinnerRotate 3s linear infinite;
    box-shadow: 0 0 20px rgba(158, 126, 66, 0.2);
}

.jar-ring-middle {
    width: 75%;
    height: 75%;
    border-bottom-color: rgba(255, 255, 255, 0.4);
    border-left-color: rgba(255, 255, 255, 0.4);
    animation: jarSpinnerRotate 2.5s linear infinite reverse;
    opacity: 0.7;
}

.jar-ring-inner {
    width: 50%;
    height: 50%;
    border-top-color: var(--jar-gold-light);
    border-right-color: var(--jar-gold-light);
    animation: jarSpinnerRotate 2s linear infinite;
    opacity: 0.5;
}

.jar-spinner-icon {
    font-size: 2.5rem;
    color: var(--jar-gold);
    animation: jarIconPulse 2.5s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(158, 126, 66, 0.5));
}

@keyframes jarSpinnerRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes jarIconPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

/* Decorative Rings */
.jar-loading-spinner::before,
.jar-loading-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(158, 126, 66, 0.2);
    animation: jarDecorRotate 25s linear infinite;
}

.jar-loading-spinner::before {
    width: 160%;
    height: 160%;
}

.jar-loading-spinner::after {
    width: 180%;
    height: 180%;
    animation-direction: reverse;
    animation-duration: 30s;
}

@keyframes jarDecorRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Typography */
.jar-loading-title {
    font-family: var(--jar-font-serif);
    font-size: 2.25rem;
    font-weight: 500;
    color: #FAF6EF;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.jar-loading-subtitle {
    font-size: 0.9375rem;
    color: rgba(250, 246, 239, 0.7);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.jar-loading-narrative {
    font-size: 1rem;
    color: rgba(250, 246, 239, 0.85);
    margin-bottom: 2rem;
    min-height: 1.6em;
    transition: opacity 0.4s ease;
    line-height: 1.6;
}

/* Progress Bar */
.jar-loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(158, 126, 66, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    position: relative;
}

.jar-loading-progress-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, var(--jar-gold-dark), var(--jar-gold), var(--jar-gold-light));
    border-radius: 2px;
    animation: jarProgressFlow 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(158, 126, 66, 0.4);
}

@keyframes jarProgressFlow {
    0% { transform: translateX(-100%); width: 30%; }
    50% { width: 50%; }
    100% { transform: translateX(400%); width: 30%; }
}

/* Hint Text */
.jar-loading-hint {
    font-size: 0.8125rem;
    color: rgba(250, 246, 239, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.jar-loading-hint i {
    animation: jarHintPulse 2s ease-in-out infinite;
    color: var(--jar-gold);
    opacity: 0.6;
}

@keyframes jarHintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Content Hidden State */
.jar-content-hidden {
    opacity: 0 !important;
    visibility: hidden;
}

.jar-content-reveal {
    opacity: 1 !important;
    visibility: visible !important;
    animation: jarContentReveal 0.6s ease-out forwards;
}

.jar-content-hidden.jar-content-reveal {
    opacity: 1 !important;
    visibility: visible !important;
}

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

/* Responsive Adjustments */
@media (max-width: 576px) {
    .jar-loading-content {
        padding: 1.5rem;
    }
    
    .jar-loading-spinner {
        width: 110px;
        height: 110px;
        margin-bottom: 2rem;
    }
    
    .jar-spinner-icon {
        font-size: 2rem;
    }
    
    .jar-loading-title {
        font-size: 1.875rem;
    }
    
    .jar-loading-narrative {
        font-size: 0.9375rem;
    }
    
    .jar-loading-progress {
        width: 160px;
    }
}

/* Print Styles */
@media print {
    .jar-loading-overlay {
        display: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .jar-loading-bg img,
    .jar-loading-bg::before,
    .jar-spinner-ring,
    .jar-spinner-icon,
    .jar-loading-progress-bar,
    .jar-loading-hint i,
    .jar-loading-spinner::before,
    .jar-loading-spinner::after {
        animation: none;
    }
    
    .jar-loading-overlay,
    .jar-content-reveal {
        transition: opacity 0.3s ease;
    }
    
    .jar-loading-progress-bar {
        width: 50%;
        transform: none;
    }
}

/* ========================================
   Heritage Summary Card
   ======================================== */
.jar-summary-card {
    background: linear-gradient(135deg, var(--jar-parchment) 0%, var(--jar-stone-100) 100%);
    border: 1px solid var(--jar-border);
    border-radius: 16px;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto 2rem;
    box-shadow: 0 4px 12px var(--jar-shadow-color-md);
}

.jar-summary-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--jar-stone-800);
    border-bottom: 1px solid var(--jar-stone-600);
}

.jar-summary-logo img {
    opacity: 0.9;
    height: 16px;
    width: auto;
    max-width: 60px;
    max-height: 16px;
}

.jar-summary-title h3 {
    font-family: var(--jar-font-serif);
    font-size: 1.25rem;
    color: var(--jar-parchment);
    margin: 0;
    font-weight: 500;
}

.jar-summary-title span {
    font-size: 0.8125rem;
    color: var(--jar-stone-300);
    font-family: var(--jar-font-sans);
}

.jar-summary-body {
    padding: 1.5rem;
}

.jar-summary-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--jar-border);
    margin-bottom: 1.5rem;
}

.jar-summary-stat {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.jar-summary-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--jar-gold);
    font-family: var(--jar-font-serif);
    line-height: 1.2;
}

.jar-summary-stat-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--jar-text-muted);
    margin-top: 0.25rem;
    font-family: var(--jar-font-sans);
}

.jar-summary-section {
    margin-bottom: 1.5rem;
}

.jar-summary-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--jar-text-muted);
    margin: 0 0 1rem;
    font-family: var(--jar-font-sans);
    font-weight: 600;
}

.jar-summary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.jar-breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.jar-breakdown-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--jar-text-secondary);
    font-family: var(--jar-font-sans);
}

.jar-breakdown-pct {
    font-weight: 600;
    color: var(--jar-text-primary);
}

.jar-breakdown-bar {
    height: 8px;
    background-color: var(--jar-stone-200);
    border-radius: 4px;
    overflow: hidden;
}

.jar-breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.jar-summary-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.jar-summary-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jar-summary-highlight .dna-icon {
    color: var(--jar-gold);
    font-size: 1rem;
    flex-shrink: 0;
}

.jar-summary-hl-label {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jar-text-muted);
    font-family: var(--jar-font-sans);
}

.jar-summary-hl-value {
    font-size: 0.875rem;
    color: var(--jar-text-primary);
    font-weight: 500;
    font-family: var(--jar-font-sans);
}

.jar-summary-footer {
    padding: 1rem 1.5rem;
    background: var(--jar-stone-100);
    text-align: center;
    font-size: 0.75rem;
    color: var(--jar-text-muted);
    border-top: 1px solid var(--jar-border);
    font-family: var(--jar-font-sans);
}

.jar-summary-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.jar-summary-actions .jar-action-btn {
    min-width: 140px;
}

.jar-summary-actions .jar-action-btn-primary {
    background-color: var(--jar-gold);
    color: var(--jar-stone-900);
    border-color: var(--jar-gold);
}

.jar-summary-actions .jar-action-btn-primary:hover {
    background-color: var(--jar-gold-dark);
    border-color: var(--jar-gold-dark);
    color: var(--jar-stone-900);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .jar-summary-card {
        margin: 0 auto 1.5rem;
        border-radius: 12px;
    }
    
    .jar-summary-header {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .jar-summary-body {
        padding: 1.25rem;
    }
    
    .jar-summary-stats {
        gap: 0.75rem;
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .jar-summary-stat {
        min-width: 70px;
    }
    
    .jar-summary-stat-value {
        font-size: 1.25rem;
    }
    
    .jar-summary-actions {
        flex-direction: column;
    }
    
    .jar-summary-actions .jar-action-btn {
        width: 100%;
        min-width: auto;
    }
}

/* Print Styles */
@media print {
    .jar-summary-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .jar-summary-actions {
        display: none;
    }
    
    .jar-summary-header {
        background: #f5f5f5;
        border-bottom: 1px solid #ddd;
    }
    
    .jar-summary-title h3 {
        color: #333;
    }
    
    .jar-summary-title span {
        color: #666;
    }
}


