@font-face {
    font-family: "Messina Sans";
    src: url("fonts/MessinaSans-Regular.woff2") format("woff2"),
         url("fonts/MessinaSans-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Messina Serif";
    src: url("fonts/MessinaSerif-Light.woff2") format("woff2"),
         url("fonts/MessinaSerif-Light.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    --Epoch-Website-Gray-100: #EBF5F4;
    --Epoch-Website-Gray-300: #CCD8D9;
    --Epoch-Website-Gray-400: #90A5AB;
    --Epoch-Website-Gray-500: #5C737B;
    --Epoch-Website-Gray-700: #2B424B;
    --Epoch-Website-Gray-800: #162B32;
    --Epoch-Website-Gray-900: #091D21;
    --Epoch-Website-Green-500: #00A5A6;
    --base-white: #fff;
    --headline-background-color: #ffffff;
    --content-padding: 24px;
    --top-nav-bar-height: 64px;
    --max-content-width: 1440px;
}

@media (min-width: 680px) {
    :root {
        --content-padding: 32px;
    }
}

@media (min-width: 1440px) {
    :root {
        --content-padding: 64px;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    color: var(--Epoch-Website-Gray-800);
    font-family: "Messina Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.18px;
    line-height: 160%;
    background-color: var(--base-white);
}

.header-wrapper {
    width: 100%;
    background-color: var(--base-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 64px;
}

header {
    max-width: var(--max-content-width);
    height: var(--top-nav-bar-height);
    margin: 0 auto;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--Epoch-Website-Gray-700);
    width: 100%;
}

nav {
    display: flex;
    gap: 32px;
}

.header-title {
    text-decoration: none;
    color: var(--Epoch-Website-Gray-900);
    white-space: nowrap;
    margin-right: 48px;
    cursor: pointer;
    display: block;
    height: 28.8px;
    text-wrap-mode: nowrap;
    white-space-collapse: collapse;
}

.nav-link {
    text-decoration: none;
    color: var(--Epoch-Website-Gray-900);
    white-space: nowrap;
    cursor: pointer;
    display: block;
    height: 28.8px;
    width: auto;
    min-width: 140px;
    text-wrap-mode: nowrap;
    white-space-collapse: collapse;
    transition: color 0.2s ease;
    font-family: "Messina Sans";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 160%;
    letter-spacing: 0.18px;
}

.nav-link:hover {
    color: var(--Epoch-Website-Green-500);
}

main {
    max-width: var(--max-content-width);
    margin: 0 auto;
}

#container {
    margin-top: 0;
    flex: 1;
    min-width: 0;
    position: relative;
    width: 100%;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        letter-spacing: 0.08px;
    }

    .nav-link {
        font-size: 16px;
        letter-spacing: 0.08px;
    }
}

/* D3.js Visualization Styles */
.plot-title {
    font-family: "Messina Serif";
    font-size: 20px;
    font-weight: 300;
    letter-spacing: -0.4px;
    line-height: 24px;
    color: #09323A;
    margin: 0 0 24px 0;
}

.axis-label {
    font-family: "Messina Sans";
    font-size: 16px;
    fill: var(--Epoch-Website-Gray-900);
}

.grid line {
    stroke: #e2eeee;
}

.grid path {
    stroke-width: 0;
}

.dot {
    fill: #8cd6d7;
    opacity: 1;
    stroke: #65c8c9;
    stroke-width: 1px;
}

.trend-line {
    stroke: #425861;
    stroke-width: 1.5;
    stroke-dasharray: 8, 8;
    fill: none;
}

#container svg {
    width: 100%;
    height: 600px;
    max-width: 100%;
}

.visualization-container {
    display: flex;
    gap: 32px;
    width: 100%;
    max-width: 1400px;
    align-items: flex-start;
    padding-top: 1.5rem;
    margin-left: auto;
    margin-right: auto;
}

.data-table {
    margin-top: 2rem;
    width: 500px;
    height: 600px;
    background: var(--Epoch-Website-Gray-100);
    border-radius: 4px;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

/* Column widths */
.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 35%;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 15%;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 20%;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 15%;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 15%;
}

.data-table thead {
    position: sticky;
    top: 0;
    background: var(--Epoch-Website-Gray-100);
    z-index: 1;
}

.data-table th {
    text-align: left;
    padding: 16px;
    font-weight: 700;
    color: var(--Epoch-Website-Gray-900);
    border-bottom: 1px solid var(--Epoch-Website-Gray-300);
    white-space: nowrap;
    overflow: visible;
    background: var(--Epoch-Website-Gray-100);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--Epoch-Website-Gray-300);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr.highlighted {
    background-color: var(--Epoch-Website-Green-500);
}

.data-table tr.highlighted td {
    color: white;
}

.data-table tr:hover {
    background-color: var(--Epoch-Website-Gray-300);
    cursor: pointer;
}

@media (max-width: 1024px) {
    .visualization-container {
        flex-direction: column;
    }

    .data-table {
        width: 100%;
        margin-top: 32px;
    }

    #container {
        width: 100%;
    }
}

#map-container {
    /* margin-top: 48px; */
    /* padding: 24px; */
    background: var(--base-white);
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

#map-container svg {
    width: 100%;
    height: auto;
    /* aspect-ratio: 4/3; */
    display: block;
}

#map-container .plot-title {
    margin-bottom: 12px;
}

@media (max-width: 1024px) {
    .visualization-container {
        flex-direction: column;
    }

    .data-table {
        width: 100%;
        margin-top: 32px;
    }

    #container {
        width: 100%;
    }
}

/* Tippy.js custom theme */
.tippy-box[data-theme~='epoch'] {
    background-color: var(--Epoch-Website-Gray-800);
    color: var(--base-white);
    font-family: "Messina Sans";
    font-size: 14px;
    line-height: 1.4;
    padding: 4px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tippy-box[data-theme~='epoch'] .tippy-arrow {
    color: var(--Epoch-Website-Gray-800);
}

.tippy-box[data-theme~='epoch'] strong {
    color: var(--Epoch-Website-Green-500);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 1024px) {
    .visualization-container {
        flex-direction: column;
    }

    .data-table {
        width: 100%;
        margin-top: 32px;
    }

    #container {
        width: 100%;
    }
}

.letter-container {
    max-width: 800px;
    margin: 64px auto;
    padding: 0 32px;
}

.letter {
    font-family: "Messina Sans";
    font-size: 18px;
    line-height: 1.6;
    color: var(--Epoch-Website-Gray-800);
}

@media (max-width: 1024px) {
    .visualization-container {
        flex-direction: column;
    }
} 