/* Legal pages (Privacy Policy, Terms of Service)
   Depends on css/shared.css for variables, header, footer, and reset. */

/* Push content below the fixed site header */
.legal-main {
    padding: 120px 0 80px;
}

.legal-main .container {
    max-width: 900px;
}

/* Document card */
.legal-document {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* Title + "last updated" subtitle */
.legal-document h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.legal-document .legal-updated {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-document .legal-updated strong {
    font-weight: 600;
}

/* Section + sub-section headings.
   scroll-margin-top keeps in-page anchor jumps clear of the fixed header. */
.legal-document h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 2.75rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    scroll-margin-top: 100px;
}

.legal-document h3 {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 2rem 0 0.75rem;
    scroll-margin-top: 100px;
}

.legal-document p {
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    scroll-margin-top: 100px;
}

.legal-document strong {
    color: var(--text-light);
    font-weight: 600;
}

.legal-document em {
    color: var(--text-light);
}

/* Lists */
.legal-document ul,
.legal-document ol {
    margin: 0 0 1.25rem 1.5rem;
    color: var(--text-muted);
}

.legal-document li {
    margin-bottom: 0.6rem;
    padding-left: 0.35rem;
}

.legal-document ul ul,
.legal-document ol ol,
.legal-document ul ol,
.legal-document ol ul {
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

/* Links */
.legal-document a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-word;
    transition: color 0.2s ease;
}

.legal-document a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Tables (data-category tables in the privacy policy) */
.legal-document table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
}

.legal-document th,
.legal-document td {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
    color: var(--text-muted);
}

.legal-document th {
    background: rgba(147, 51, 234, 0.12);
    color: var(--text-light);
    font-weight: 600;
}

.legal-document tbody tr:nth-child(even),
.legal-document tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive */
@media (max-width: 768px) {
    .legal-main {
        padding: 100px 0 60px;
    }

    .legal-document {
        padding: 1.75rem 1.25rem;
    }

    .legal-document h1 {
        font-size: 2rem;
    }

    .legal-document h2 {
        font-size: 1.3rem;
    }

    .legal-document table,
    .legal-document thead,
    .legal-document tbody,
    .legal-document th,
    .legal-document td,
    .legal-document tr {
        display: block;
    }

    .legal-document th {
        display: none;
    }

    .legal-document td {
        border: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 0;
    }

    .legal-document tr {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
        margin-bottom: 1rem;
    }
}
