/* Legal layout */
.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
    padding: 64px 0;
}
@media (max-width: 900px) {
    .legal-layout { grid-template-columns: 1fr; }
    .legal-toc { display: none; }
}

/* Sidebar TOC */
.legal-toc {
    position: sticky;
    top: 90px;
}
.legal-toc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.legal-toc-head {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
    font-size: 0.813rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.legal-toc-head svg { width: 16px; height: 16px; flex-shrink: 0; }
.legal-toc-list {
    padding: 12px 0;
}
.legal-toc-item {
    display: block;
    padding: 9px 20px;
    font-size: 0.825rem;
    color: var(--text-dim);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    line-height: 1.4;
}
.legal-toc-item:hover {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-pale);
}
.legal-toc-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-pale);
    font-weight: 600;
}
.legal-toc-num {
    display: inline-block;
    width: 22px;
    height: 22px;
    background: var(--accent-pale);
    color: var(--accent);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    line-height: 22px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Content boxes */
.legal-updated {
    background: var(--accent-pale);
    border-radius: var(--radius);
    padding: 14px 20px;
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.legal-intro {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    font-size: 0.938rem;
    color: var(--text-dim);
    line-height: 1.80;
    box-shadow: var(--shadow-sm);
}
.legal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 100px;
}
.legal-box-head {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light, #2d5a45) 100%);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.legal-box-head-num {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.813rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.legal-box-head-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}
.legal-box-body {
    padding: 20px 24px;
}
.legal-box-body p {
    font-size: 0.938rem;
    color: var(--text-dim);
    line-height: 1.80;
    margin-bottom: 12px;
}
.legal-box-body p:last-child { margin-bottom: 0; }
.legal-box-body ul {
    padding-left: 0;
    list-style: none;
    margin: 8px 0 12px;
}
.legal-box-body li {
    font-size: 0.925rem;
    color: var(--text-dim);
    line-height: 1.7;
    padding: 6px 0 6px 28px;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.legal-box-body li:last-child { border-bottom: none; }
.legal-box-body li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}
.legal-box-body a { color: var(--accent); }
.legal-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.legal-contact-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.legal-contact-item svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.legal-contact-item a { color: var(--text); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.legal-contact-item a:hover { color: var(--accent); }
.legal-contact-lbl { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 2px; }