.legal-page {
    min-height: 100vh;
    background: #050505;
}

.legal-page .navbar {
    position: relative;
    top: auto;
    margin-top: 20px;
}

.legal-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.legal-nav a {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    transition: color 0.25s ease;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
    color: var(--accent-secondary);
}

.legal-main {
    position: relative;
    z-index: 1;
    padding: 88px 0 110px;
}

.legal-hero {
    max-width: 850px;
    margin-bottom: 42px;
}

.legal-kicker {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--accent-secondary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-hero h1 {
    margin-bottom: 20px;
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 1.02;
}

.legal-hero > p {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.legal-meta {
    margin-top: 18px;
    color: #777780;
    font-size: 0.82rem;
}

.draft-notice {
    max-width: 900px;
    margin-bottom: 38px;
    padding: 20px 22px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: var(--radius-md);
    background: rgba(245, 158, 11, 0.06);
    color: #ded5c4;
    line-height: 1.7;
}

.draft-notice strong {
    color: #fbbf24;
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(190px, 0.3fr) minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 28px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
}

.legal-toc strong {
    margin-bottom: 7px;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.legal-toc a {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.legal-toc a:hover {
    color: var(--accent-secondary);
}

.legal-content {
    max-width: 850px;
}

.legal-section {
    scroll-margin-top: 28px;
    margin-bottom: 44px;
    padding-bottom: 44px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.legal-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.legal-section h2 {
    margin-bottom: 18px;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
}

.legal-section h3 {
    margin: 26px 0 12px;
    font-size: 1.05rem;
}

.legal-section p,
.legal-section li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.85;
}

.legal-section p + p {
    margin-top: 14px;
}

.legal-section ul {
    display: grid;
    gap: 9px;
    margin: 14px 0 0 22px;
}

.legal-section a {
    color: var(--accent-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    margin-top: 18px;
    padding: 11px 16px;
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 12px;
    background: rgba(6, 182, 212, 0.08);
    color: var(--text-main);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.legal-page .site-footer {
    padding-top: 44px;
}

.legal-page .footer-bottom {
    margin-top: 0;
    border-top: 0;
}

@media (max-width: 768px) {
    .legal-page .navbar {
        width: calc(100% - 28px);
    }

    .legal-nav a:not(.legal-home-link) {
        display: none;
    }

    .legal-main {
        padding: 64px 0 80px;
    }

    .legal-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .legal-toc {
        position: static;
    }
}
