/* LUX-LEET Legal Aesthetics (Branding Aligned) */
.legal-section {
    padding: 12rem 0 8rem;
    min-height: 100vh;
    background-color: var(--neutral-light); /* #eeeeee */
    position: relative;
    overflow: hidden;
}

/* Background Blueprint Grid */
.legal-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 150, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 150, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto; /* Centering Fix */
    position: relative;
    z-index: 2;
}

/* Sub-page Navigation & Logo */
.legal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.legal-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-dark);
}

.legal-logo img {
    height: 40px;
}

.legal-logo span {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.2rem;
}

.back-link {
    text-decoration: none;
    color: var(--primary-teal);
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    color: var(--secondary-green);
    transform: translateX(-5px);
}

/* Branded Header with Gradient Underline */
.legal-header {
    text-align: center;
    margin-bottom: 5rem;
}

.legal-header h1 {
    font-size: 3.5rem;
    color: var(--text-dark);
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.header-accent {
    width: 80px;
    height: 4px;
    margin: 0 auto;
    background: linear-gradient(-70deg, var(--primary-teal), var(--secondary-green));
    border-radius: 2px;
}

/* Glassmorphic Legal Container */
.legal-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 4rem;
    border-radius: 24px;
    border: 2px dashed rgba(var(--primary-teal-rgb), 0.15); /* Aligned with Blueprint Style */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04);
}

.legal-content {
    line-height: 1.8;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
}

.legal-chapter {
    margin-bottom: 5rem;
}

.legal-chapter-title {
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--secondary-green);
    letter-spacing: 3px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legal-chapter-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--primary-teal-rgb), 0.2), transparent);
}

.legal-content h2 {
    color: var(--text-dark);
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Outfit', sans-serif;
}

/* Safeguard Boxes for Internal IP and Access Control */
.safeguard-box {
    background: rgba(0, 161, 142, 0.04);
    border-left: 4px solid var(--primary-teal);
    padding: 2.5rem;
    border-radius: 0 16px 16px 0;
    margin: 2.5rem 0;
}

.safeguard-box h3 {
    margin-top: 0 !important;
    font-size: 1.1rem !important;
    color: var(--primary-teal) !important;
    margin-bottom: 1rem !important;
}

.safeguard-box p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
    color: var(--text-dark);
    font-weight: 600;
}

.legal-reference-note {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 8px;
}

.legal-content ul {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    list-style: none;
}

.legal-content li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.legal-content li::before {
    content: '▪';
    position: absolute;
    left: 0;
    color: var(--secondary-green);
    font-size: 1.2rem;
    line-height: 1.5;
}

/* Legal Table of Contents Grid */
.legal-toc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 5rem;
    padding-bottom: 4rem;
    border-bottom: 1px dashed rgba(var(--primary-teal-rgb), 0.15);
}

.toc-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(var(--primary-teal-rgb), 0.03);
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.toc-item:hover {
    background: rgba(var(--primary-teal-rgb), 0.08);
    border-color: rgba(var(--primary-teal-rgb), 0.2);
    transform: translateY(-3px);
}

.toc-number {
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--secondary-green);
    letter-spacing: 1px;
}

.toc-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-section-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-teal);
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    border-radius: 4px;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 900px) {
    .legal-toc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .legal-toc-grid {
        grid-template-columns: 1fr;
    }
}
