.terms-hero {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
    padding: var(--space-12) 0 var(--space-8);
    border-bottom: 1px solid var(--color-bg-elevated);
    position: relative;
    overflow: hidden;
}

.terms-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.terms-hero .container {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    margin-bottom: var(--space-6);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: var(--space-2);
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-text-secondary);
    transition: color var(--duration-fast) var(--ease-out);
}

.breadcrumb a:hover {
    color: var(--color-mahogany-light);
}

.breadcrumb [aria-current="page"] {
    color: var(--color-text-primary);
    font-weight: 500;
}

.terms-hero h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-aluminum) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.terms-hero .lead {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    max-width: 60ch;
    margin-bottom: 0;
}

.terms-content {
    padding: var(--space-12) 0;
    background-color: var(--color-bg-primary);
}

.terms-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-10);
    align-items: start;
}

.terms-nav {
    position: sticky;
    top: var(--space-6);
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-height: calc(100vh - var(--space-12));
    overflow-y: auto;
}

.terms-nav h2 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
    font-family: var(--font-serif);
}

.terms-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.terms-nav a {
    display: block;
    padding: var(--space-2) var(--space-3);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
    border-left: 2px solid transparent;
}

.terms-nav a:hover,
.terms-nav a.active {
    color: var(--color-text-primary);
    background-color: var(--color-bg-tertiary);
    border-left-color: var(--color-mahogany);
    padding-left: var(--space-4);
}

.terms-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.terms-section {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    scroll-margin-top: var(--space-6);
    transition: border-color var(--duration-normal) var(--ease-out);
}

.terms-section:hover {
    border-color: var(--color-aluminum-dark);
}

.terms-section h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-6);
    color: var(--color-text-primary);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-bg-elevated);
}

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

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

.terms-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: var(--space-4);
}

.terms-section li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

.terms-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background-color: var(--color-mahogany);
    border-radius: 50%;
}

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

.terms-section a {
    color: var(--color-mahogany-light);
    text-decoration: underline;
    text-decoration-color: var(--color-mahogany-dark);
    text-underline-offset: 3px;
    transition: all var(--duration-fast) var(--ease-out);
}

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

.terms-meta {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-bg-elevated);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.terms-meta time {
    color: var(--color-text-secondary);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .terms-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .terms-nav {
        position: static;
        max-height: none;
        order: -1;
    }

    .terms-nav ul {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-2);
    }
}

@media (max-width: 768px) {
    .terms-hero {
        padding: var(--space-8) 0 var(--space-6);
    }

    .terms-hero h1 {
        font-size: var(--text-3xl);
    }

    .terms-hero .lead {
        font-size: var(--text-lg);
    }

    .terms-content {
        padding: var(--space-6) 0;
    }

    .terms-section {
        padding: var(--space-5);
    }

    .terms-section h2 {
        font-size: var(--text-xl);
    }

    .terms-nav ul {
        grid-template-columns: 1fr;
    }
}

@media print {
    .terms-hero {
        background: none;
        padding: var(--space-4) 0;
    }

    .terms-nav {
        display: none;
    }

    .terms-grid {
        grid-template-columns: 1fr;
    }

    .terms-section {
        break-inside: avoid;
        border: 1px solid #ccc;
        background: white;
        color: black;
        page-break-inside: avoid;
    }

    .terms-section h2 {
        color: black;
    }

    .terms-section p,
    .terms-section li {
        color: #333;
    }
}