/* ======================== LEGAL PAGES STYLESHEET ======================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --legal-dark: #0F0E17;
    --legal-accent: #E85B3F;
    --legal-text: #2C2A36;
    --legal-text-light: #5C5A6E;
    --legal-border: #E2DFEA;
    --legal-bg: #FCFBFE;
    --legal-card: #FFFFFF;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--legal-text);
    background-color: var(--legal-bg);
    -webkit-font-smoothing: antialiased;
}

.legal-page {
    background-color: var(--legal-bg);
}

/* ======================== SCOPE ISOLATION ======================== */
.legal-page .legal-content section,
.legal-page .legal-content .legal-section {
    background-color: transparent !important;
}

/* ======================== LEGAL HEADER ======================== */
.legal-header {
    background: linear-gradient(135deg, #0F0E17 0%, #1A1830 50%, #121120 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-header::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 91, 63, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.legal-header .container {
    position: relative;
    z-index: 2;
}

.legal-header .breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.legal-header .breadcrumb a {
    color: #B0ADBC;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-header .breadcrumb a:hover {
    color: var(--white);
}

.legal-header .breadcrumb .separator {
    color: #3F3E45;
}

.legal-header .breadcrumb .current {
    color: var(--white);
}

.legal-header h1 {
    font-size: 42px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.legal-header .effective-date {
    font-size: 14px;
    color: #B0ADBC;
    font-weight: 500;
}

.legal-header .adhoc-link {
    display: none;
}

/* ======================== LEGAL CONTENT ======================== */
.legal-content {
    padding: 60px 0 40px;
}

.legal-content .container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ======================== TABLE OF CONTENTS ======================== */
.legal-toc {
    background-color: var(--legal-card);
    border: 1px solid var(--legal-border);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 40px;
}

.legal-toc h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--legal-dark);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.legal-toc ol {
    list-style: none;
    counter-reset: toc-counter;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.legal-toc ol li {
    counter-increment: toc-counter;
    border-bottom: 1px solid #F3F1F8;
}

.legal-toc ol li:last-child {
    border-bottom: none;
}

.legal-toc ol li a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 8px;
    color: var(--legal-text);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
}

.legal-toc ol li a:hover {
    color: var(--legal-accent);
    background: rgba(232, 91, 63, 0.04);
}

.legal-toc ol li a::before {
    content: counter(toc-counter) ".";
    color: var(--legal-accent);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    min-width: 24px;
}

/* ======================== LEGAL SECTIONS ======================== */
.legal-content section,
.legal-content .legal-section {
    margin-bottom: 48px;
}

.legal-content section:last-child,
.legal-content .legal-section:last-child {
    margin-bottom: 0;
}

.legal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--legal-dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F0EDF8;
    letter-spacing: -0.3px;
    scroll-margin-top: 40px;
}

.legal-content p {
    font-size: 16px;
    color: var(--legal-text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content ul {
    list-style: none;
    margin-bottom: 16px;
    padding-left: 0;
}

.legal-content ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--legal-text-light);
    line-height: 1.7;
}

.legal-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(232, 91, 63, 0.5);
}

.legal-content ul li:last-child {
    margin-bottom: 0;
}

.legal-content strong {
    color: var(--legal-dark);
    font-weight: 600;
}

.legal-content a {
    color: var(--legal-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content a:hover {
    color: #D04A2F;
}

.legal-content address {
    font-style: normal;
    line-height: 1.8;
    color: var(--legal-text-light);
}

.back-to-top {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--legal-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-to-top:hover {
    color: #D04A2F;
}

.last-updated {
    font-size: 13px;
    color: #9A98AE;
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid var(--legal-border);
    font-style: italic;
}

/* ======================== LEGAL FOOTER ======================== */
.legal-footer {
    background-color: var(--legal-dark);
    padding: 24px 0;
    text-align: center;
}

.legal-footer .container {
    max-width: 860px;
}

.legal-footer p {
    font-size: 14px;
    color: #8C8A9E;
    margin-bottom: 8px;
}

.legal-footer a {
    color: var(--legal-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.legal-footer a:hover {
    color: #F07B63;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
    .legal-header {
        padding: 60px 0 40px;
    }

    .legal-header h1 {
        font-size: 30px;
    }

    .legal-content {
        padding: 40px 0 30px;
    }

    .legal-content h2 {
        font-size: 20px;
    }

    .legal-toc {
        padding: 20px 20px;
    }

    .legal-toc ol li a {
        font-size: 14px;
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .legal-content .container {
        padding: 0 16px;
    }

    .legal-header h1 {
        font-size: 26px;
    }

    .legal-content h2 {
        font-size: 18px;
    }

    .legal-content p,
    .legal-content ul li {
        font-size: 15px;
    }
}
