.terms-page {
    padding: var(--space-10) 0;
    background-color: var(--color-background);
    min-height: 70vh;
}

.terms-layout {
    display: grid;
    gap: var(--space-8);
}

.terms-sidebar {
    order: 2;
}

.terms-content {
    order: 1;
}

.terms-header {
    text-align: center;
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-neutral-200);
}

.terms-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-3xl);
    color: var(--color-text);
    margin-bottom: var(--space-4);
    line-height: var(--line-height-tight);
}

.terms-updated {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-style: italic;
}

.terms-nav {
    background-color: var(--color-surface);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-neutral-200);
}

.terms-nav h3 {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-4);
    color: var(--color-text);
    font-weight: 600;
}

.terms-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.terms-nav li {
    margin-bottom: var(--space-1);
    border-bottom: 1px solid var(--color-neutral-100);
}

.terms-nav li:last-child {
    border-bottom: none;
}

.terms-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: block;
    padding: var(--space-3) 0;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
    border-left: 3px solid transparent;
    padding-left: var(--space-2);
}

.terms-nav a:hover,
.terms-nav a.active {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    padding-left: var(--space-3);
}

.terms-section {
    margin-bottom: var(--space-10);
    scroll-margin-top: var(--space-12);
}

.terms-section:last-child {
    margin-bottom: 0;
}

.terms-section h2 {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-2xl);
    color: var(--color-text);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-primary-light);
    line-height: var(--line-height-tight);
}

.terms-section p {
    margin-bottom: var(--space-4);
    color: var(--color-text);
    line-height: var(--line-height-relaxed);
    max-width: none;
}

.terms-section ul {
    margin-left: var(--space-6);
    margin-bottom: var(--space-5);
    color: var(--color-text);
}

.terms-section li {
    margin-bottom: var(--space-3);
    line-height: var(--line-height-normal);
}

.terms-section strong {
    color: var(--color-text);
    font-weight: 600;
}

.terms-section a {
    text-decoration: underline;
    text-decoration-color: var(--color-primary-light);
    text-underline-offset: 2px;
}

.terms-section a:hover {
    text-decoration-color: var(--color-primary);
}

@media (min-width: 1024px) {
    .terms-layout {
        grid-template-columns: 280px 1fr;
        gap: var(--space-12);
        align-items: start;
    }
    
    .terms-sidebar {
        order: 1;
    }
    
    .terms-content {
        order: 2;
    }
    
    .terms-nav {
        position: sticky;
        top: var(--space-6);
    }
    
    .terms-title {
        font-size: var(--font-size-4xl);
    }
}

@media (max-width: 640px) {
    .terms-page {
        padding: var(--space-6) 0;
    }
    
    .terms-title {
        font-size: var(--font-size-2xl);
    }
    
    .terms-section h2 {
        font-size: var(--font-size-xl);
    }
    
    .terms-nav {
        padding: var(--space-4);
    }
}