/* --- DESIGN SYSTEM --- */
:root {
    --bg-body: #FFFFFF; 
    --text-primary: #0F172A; 
    --text-secondary: #475569; 
    --text-muted: #94A3B8; 
    --text-inverse: #FFFFFF; 
    --brand-primary: #0055FF;
    --brand-hover: #0044CC; 
    --bg-dark: #020617;
    --font-main: 'Inter', sans-serif; 
    --font-logo: 'Outfit', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-body); 
    color: var(--text-primary);
    font-family: var(--font-main); 
    line-height: 1.6;
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
}

/* --- HEADER --- */
header {
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 100;
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #E2E8F0; 
    padding: 20px 0;
}

.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 0 40px; 
}

nav { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

.logo-text { 
    font-family: var(--font-logo); 
    font-weight: 800; 
    font-size: 2rem; 
    letter-spacing: -0.03em; 
    color: #0F172A; 
    text-decoration: none; 
}

.nav-right { 
    display: flex; 
    gap: 16px; 
    align-items: center; 
}

.btn { 
    padding: 10px 24px; 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 0.95rem; 
    cursor: pointer; 
    text-decoration: none; 
    transition: 0.2s; 
}

.btn-text { 
    color: var(--text-primary); 
} 
.btn-text:hover { 
    color: var(--brand-primary); 
}

.btn-primary { 
    background: var(--brand-primary); 
    color: #fff; 
    border: 1px solid #000; 
}
.btn-primary:hover { 
    background: var(--brand-hover); 
    transform: translateY(-1px); 
}

/* --- LEGAL PAGE LAYOUT --- */
.legal-wrapper { 
    margin-top: 140px; 
    margin-bottom: 100px; 
    display: grid; 
    grid-template-columns: 280px 1fr;
    gap: 60px; 
    align-items: start; 
}

.legal-sidebar { 
    position: sticky; 
    top: 120px; 
    padding-right: 20px; 
    border-right: 1px solid #E2E8F0;
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.sidebar-title { 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    color: var(--text-muted); 
    font-weight: 700; 
    margin-bottom: 16px;
    padding-left: 16px;
}

.legal-nav { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.legal-nav a { 
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    padding: 12px 16px;
    color: var(--text-secondary); 
    font-weight: 500; 
    text-decoration: none; 
    position: relative;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1.4;
    font-size: 1rem;
}

.legal-nav a:hover { 
    color: var(--brand-primary); 
    background: #F8FAFC; 
}

.legal-nav a.active { 
    color: var(--brand-primary); 
    font-weight: 700; 
    background: #EFF6FF; 
}

.legal-nav a.active::before { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 0; 
    bottom: 0; 
    width: 4px; 
    background: var(--brand-primary); 
    border-radius: 4px 0 0 4px; 
}

/* CONTENT TYPOGRAPHY */
.legal-content { 
    max-width: 800px; 
    font-size: 1.05rem; 
    min-width: 0; 
}

.legal-content h1 { 
    font-size: 2.5rem; 
    font-weight: 800; 
    letter-spacing: -0.02em; 
    margin-bottom: 10px; 
    color: var(--text-primary); 
    line-height: 1.2; 
}

.legal-content h5 { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    margin-bottom: 40px; 
    font-weight: 500; 
    text-transform: uppercase; 
}

.legal-content h2 { 
    font-size: 1.5rem; 
    font-weight: 700; 
    margin-top: 40px; 
    margin-bottom: 16px; 
    letter-spacing: -0.01em; 
    color: var(--text-primary); 
}

.legal-content h3 { 
    font-size: 1.25rem; 
    font-weight: 600; 
    margin-top: 30px; 
    margin-bottom: 12px; 
    color: var(--text-primary); 
}

.legal-content h4 { 
    font-size: 1.1rem; 
    font-weight: 600; 
    margin-top: 20px; 
    margin-bottom: 10px; 
    color: var(--text-primary); 
}

.legal-content p { 
    margin-bottom: 20px; 
    color: var(--text-secondary); 
    line-height: 1.7; 
}

.legal-content ul, 
.legal-content ol { 
    margin-bottom: 20px; 
    padding-left: 20px; 
    color: var(--text-secondary); 
}

.legal-content li { 
    margin-bottom: 8px; 
    line-height: 1.6; 
}

.legal-content a { 
    color: var(--brand-primary); 
    text-decoration: underline; 
    text-underline-offset: 4px; 
}

/* TABLE STYLES */
.table-container { 
    overflow-x: auto; 
    margin-bottom: 30px; 
    border: 1px solid #E2E8F0; 
    border-radius: 8px; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.9rem; 
}

th { 
    background: #F1F5F9; 
    text-align: left; 
    padding: 12px 16px; 
    font-weight: 700; 
    border-bottom: 1px solid #E2E8F0; 
    color: var(--text-primary); 
}

td { 
    padding: 12px 16px; 
    border-bottom: 1px solid #E2E8F0; 
    vertical-align: top; 
    color: var(--text-secondary); 
    line-height: 1.5; 
}

tr:last-child td { 
    border-bottom: none; 
}

/* FOOTER */
footer { 
    margin-top: auto; 
    padding: 80px 0 40px; 
    background: var(--bg-dark); 
    color: var(--text-inverse); 
}

.footer-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 50px; 
}

.footer-logo { 
    color: #FFF; 
    font-family: var(--font-logo); 
    font-size: 2rem; 
    font-weight: 800; 
}

.social-links { 
    display: flex; 
    gap: 24px; 
}

.social-links a { 
    color: var(--text-muted); 
    font-size: 1.5rem; 
    transition: 0.2s; 
}

.social-links a:hover { 
    color: #FFFFFF; 
}

.footer-links { 
    display: flex; 
    gap: 30px; 
    margin-bottom: 50px; 
    flex-wrap: wrap; 
}

.footer-links a { 
    color: var(--text-muted); 
    font-weight: 600; 
    font-size: 0.95rem; 
    text-decoration: none; 
    transition: 0.2s; 
}

.footer-links a:hover { 
    color: #FFFFFF; 
    text-decoration: underline; 
}

.footer-bottom { 
    border-top: 1px solid #1E293B; 
    padding-top: 30px; 
}

.copy { 
    color: #64748B; 
    font-size: 0.9rem; 
}

.disclaimer { 
    color: #475569; 
    font-size: 0.8rem; 
    margin-top: 10px; 
    font-style: italic; 
}

/* MOBILE RESPONSIVE */
@media(max-width: 1024px) {
    .legal-wrapper { 
        grid-template-columns: 1fr; 
        gap: 40px; 
        margin-top: 100px; 
    }
    .legal-sidebar { 
        position: relative; 
        top: 0; 
        border-right: none; 
        border-bottom: 1px solid #E2E8F0; 
        padding-bottom: 20px; 
        max-height: none;
    }
    .sidebar-title { 
        padding-left: 0; 
    }
    .legal-nav { 
        flex-direction: row; 
        flex-wrap: wrap; 
        gap: 10px; 
    }
    .legal-nav a { 
        display: inline-block; 
        white-space: nowrap; 
        background: #F8FAFC; 
        width: auto; 
        padding: 8px 16px; 
    }
    .legal-nav a.active { 
        background: #0055FF; 
        color: white; 
    }
    .legal-nav a.active::before { 
        display: none; 
    }
    .container { 
        padding: 0 24px; 
    }
    .footer-top { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 20px; 
    }
    .footer-links { 
        flex-direction: column; 
        gap: 16px; 
    }
}