@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Source+Sans+3:wght@300;400;500;600&display=swap');

:root {
    --navy: #0052A5;
    --crimson: #DC143C;
    --ink: #1a1a2e;
    --muted: #64748b;
    --surface: #f8f9fb;
    --border: #e2e8f0;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    background: var(--surface);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.75;
}

.legal-header {
    background: var(--navy);
    color: var(--white);
    padding: 3rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.legal-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.home-link:hover {
    color: var(--white);
}

.home-link svg {
    width: 16px;
    height: 16px;
}

.header-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.header-eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.75rem;
}

.legal-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.header-sub {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    font-weight: 300;
}

.legal-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

.tab-nav {
    display: flex;
    gap: 0.25rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.35rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--navy);
    background: var(--surface);
}

.tab-btn.active {
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0,82,165,0.25);
}

.tab-content {
    display: none;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    animation: fadeIn 0.25s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.doc-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

.tab-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.lead {
    font-size: 1.05rem;
    color: #334155;
    line-height: 1.8;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--crimson);
}

.tab-content h3 {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab-content p {
    color: #334155;
    margin-bottom: 1rem;
}

.tab-content ul {
    margin: 0.5rem 0 1rem 1.25rem;
    color: #334155;
}

.tab-content ul li {
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}

.tab-content a {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tab-content a:hover {
    color: var(--crimson);
}

.contact-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--navy);
    border-radius: 0 8px 8px 0;
    padding: 1.25rem 1.5rem;
    margin-top: 0.75rem;
    line-height: 2;
    color: #334155;
}

.contact-block a {
    color: var(--navy);
}

.legal-footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legal-footer a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
}

.legal-footer a:hover {
    color: var(--crimson);
}

@media (max-width: 640px) {
    .legal-header {
        padding: 2rem 1.25rem 3rem;
    }

    .tab-nav {
        flex-direction: column;
    }

    .tab-content {
        padding: 1.75rem 1.25rem;
    }

    .doc-meta {
        flex-direction: column;
        gap: 0.4rem;
    }

    .legal-wrapper {
        padding: 2rem 1rem 4rem;
    }
}