@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@900&display=swap');

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(180deg, #fdfdfb 0%, #f5f5f3 50%, #eaeae8 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

h1 {
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.header-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.header-portrait {
    width: 180px;
    height: 180px;
    object-fit: cover;
    object-position: top center;
}

/* Style 1: Currency Medallion - circular with coin-like border */
.portrait-medallion {
    border-radius: 50%;
    border: 3px solid #1a4d2e;
    outline: 2px solid #1a4d2e;
    outline-offset: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


.chart-container {
    width: 100%;
    max-width: 1200px;
    margin-top: 2rem;
    margin-bottom: 60px;
}

#chart {
    width: 100%;
    height: 500px;
}

.table-section {
    width: 100%;
    max-width: 1200px;
}

.table-container {
    flex: 1;
}


.money-supply-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.money-supply-table thead {
    border-bottom: 2px solid #1a4d2e;
}

.money-supply-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    color: #1a4d2e;
}

.money-supply-table th:not(:first-child) {
    text-align: center;
}

.money-supply-table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.money-supply-table td:first-child {
    font-weight: 500;
    color: #333;
}

.money-supply-table td:not(:first-child) {
    text-align: center;
}

.money-supply-table tbody tr:nth-child(even) {
    background-color: rgba(26, 77, 46, 0.04);
}

.money-supply-table tbody tr:hover {
    background-color: rgba(26, 77, 46, 0.08);
}

.checkbox {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #9a9a9a;
    border-radius: 2px;
    background-color: white;
    vertical-align: middle;
}

.checkbox.checked {
    background-color: #1a4d2e;
    border-color: #1a4d2e;
    position: relative;
}

.checkbox.checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 40%;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.fred-id a {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
    color: #555;
    text-decoration: none;
}

.table-note {
    font-size: 0.8125rem;
    color: #555;
    margin-top: 1rem;
    margin-left: 1rem;
    text-align: left;
    line-height: 1.1;
}

.tms-title-engraved {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-transform: uppercase;
    color: #1a4d2e;
    text-align: center;
    text-shadow: 
        1px 1px 0px #4ea067, 
        2px 2px 0px #133821,
        3px 3px 0px #fff,
        4px 4px 5px rgba(0,0,0,0.3);
    letter-spacing: 2px;
    border-top: 2px solid #1a4d2e;
    border-bottom: 2px solid #1a4d2e;
    display: inline-block;
    padding: 8px 30px;
    margin: 15px 0;
}

.sub-text {
    font-family: sans-serif;
    font-size: 1rem;
    color: #555;
    letter-spacing: 4px;
    margin-top: 0.5rem;
}

.footer-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    margin-top: 60px;
    padding-bottom: 40px;
}

.explanation-section {
    flex: 2;
}

.explanation-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: #1a4d2e;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #1a4d2e;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.explanation-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1rem;
    max-width: 800px;
}

.explanation-section strong {
    color: #1a4d2e;
}

.sidebar-section {
    min-width: 150px;
    text-align: right;
    margin-top: 3.5rem;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a4d2e;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.sidebar-section h3:first-child {
    margin-top: 0;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 0.4rem;
}

.sidebar-links a {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.sidebar-links a:hover {
    color: #1a4d2e;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
    .footer-section {
        flex-direction: column;
        gap: 2rem;
    }
    
    .header-section {
        gap: 1rem;
    }
    
    .header-portrait {
        width: 120px;
        height: 120px;
    }
    
    .tms-title-engraved {
        font-size: 2.25rem;
    }
}

@media (max-width: 600px) {
    .tms-title-engraved {
        font-size: 1.75rem;
        padding: 6px 20px;
    }
    
    .header-portrait {
        width: 80px;
        height: 80px;
    }
    
    .header-section {
        gap: 0.75rem;
    }
}
