body {
    font-family: 'Inter', sans-serif;
    background-color: #111827; 
    color: #E5E7EB; 
    overflow-x: hidden; 
}

a {
    text-decoration: underline !important;
    color: lightyellow !important ;
}

strong {
    color: yellow !important;
}

.cover-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cover-section .background-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -1;
    filter: brightness(0.4);
}

.content-section {
    max-width: 48rem; 
    margin-left: auto;
    margin-right: auto;
    padding: 4rem 1.5rem; 
}

#dot-plot-section {
    max-width: 72rem; 
    padding-bottom: 2rem; 
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    #dot-plot-section {
        padding-bottom: 2rem;
    }
}

.story-section + .story-section {
    padding-top: 2rem;
}

.scroll-reveal {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.hidden-left {
    opacity: 0;
    transform: translateX(-50px);
}

.scroll-reveal.hidden-right {
    opacity: 0;
    transform: translateX(50px);
}

.scroll-reveal.hidden-bottom {
    opacity: 0;
    transform: translateY(50px);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.chart-container {
    position: -webkit-sticky; 
    position: sticky;
    top: 10vh; 
    height: 80vh; 
}

#step-1 {
    margin-top: 70vh; 
}

.chart-step {
    padding: 1.5rem;
    background-color: rgba(17, 24, 39, 0.6); 
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    margin-bottom: 90vh; 
    border: 1px solid rgba(55, 65, 81, 0.3);
}

@media (max-width: 768px) {
    .chart-step {
        background-color: rgba(17, 24, 39, 0.75); 
        backdrop-filter: blur(12px);
        margin: 2rem 1rem 50vh 1rem; 
        border: 1px solid rgba(55, 65, 81, 0.5);
        padding: 1rem;
    }
}

.chart-step.active p {
    color: #F9FAFB; 
}

.scatterplot-section {
    max-width: 85rem;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.scatterplot-section .grid {
    gap: 4rem;
}

.dot {
    cursor: pointer;
}

.dot-plot-dot {
    transition: filter 0.2s ease-out;
}

.dot-plot-dot:hover {
    filter: drop-shadow(0px 0px 8px rgba(245, 158, 11, 0.8));
}

.dot-plot-dot.selected {
    filter: drop-shadow(0px 0px 8px rgba(245, 158, 11, 0.8));
}

#tooltip {
    position: fixed; 
    background-color: rgba(17, 24, 39, 0.8); 
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
}

#info-panel {
    background-color: #1F2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.3);
    max-width: 72rem;
    margin: 0 auto;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.7s ease-in-out, opacity 0.5s ease-in-out, margin-top 0.5s ease-in-out, margin-bottom 0.5s ease-in-out;
}

#info-panel.visible {
    max-height: 2000px; 
    opacity: 1;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

#panel-content {
    overflow: visible;
}

.timeline-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 1rem;
    width: 100%;
    padding: 0 1.5rem 1.5rem 1.5rem; 
}

@media (max-width: 768px) {
    .timeline-charts-grid {
        grid-template-columns: 1fr; 
        gap: 1rem;
        padding: 0 1rem 1rem 1rem;
    }
}

.timeline-chart-container {
    margin-bottom: 0.5rem;
    min-width: 0; 
}

.prose p + p {
    margin-top: 1rem !important; 
}

.story-section .prose p:not(:first-child) {
    margin-top: 1rem;
}

.story-section .grid {
    margin-top: 3rem; 
}

.scatterplot-section {
    margin-top: 1rem; 
}

.country-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.country-image {
    width: 100%;
    height: 8rem;
    object-fit: cover;
    object-position: 0%;
}

.country-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    color: white;
}