/* =====================================================
   legal.css — trang Điều khoản sử dụng & Chính sách bảo mật
   ===================================================== */

.legal {
    padding: var(--stc-space-8, 4rem) 0 var(--stc-space-9, 6rem);
    min-height: 60vh;
}

/* Tự quản chiều ngang — KHÔNG dùng .container để tránh xung đột max-width.
   Bề ngang bằng đúng container chuẩn của site (--stc-container: 1200px). */
.legal__inner {
    width: 100%;
    max-width: var(--stc-container, 1200px);
    margin-inline: auto;
    padding-inline: 20px;
    box-sizing: border-box;
}

/* ---------- Header ---------- */
.legal__head {
    text-align: left;
    margin-bottom: var(--stc-space-7, 3.5rem);
}

.legal__eyebrow {
    font-size: var(--stc-text-xs, .75rem);
    font-weight: var(--stc-weight-semibold, 600);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--stc-primary, #6366f1);
    margin-bottom: var(--stc-space-2, .5rem);
}

.legal__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: var(--stc-weight-bold, 700);
    color: var(--stc-text-heading, #0f172a);
    line-height: 1.2;
    margin-bottom: var(--stc-space-3, .75rem);
}

.legal__updated {
    font-size: var(--stc-text-sm, .875rem);
    color: var(--stc-text-muted, #64748b);
}

/* ---------- Mục lục ---------- */
.legal__toc {
    background: var(--stc-surface-2, #f8fafc);
    border: 1px solid var(--stc-border, #e2e8f0);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: var(--stc-space-5, 2rem);
}

.legal__toc-title {
    font-size: var(--stc-text-sm, .875rem);
    font-weight: var(--stc-weight-bold, 700);
    color: var(--stc-text-heading, #0f172a);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .75rem;
}

.legal__toc ol {
    margin: 0;
    padding-left: 1.25rem;
    columns: 2;
    column-gap: 2rem;
}

.legal__toc li {
    font-size: var(--stc-text-sm, .875rem);
    line-height: 1.9;
    break-inside: avoid;
}

.legal__toc a {
    color: var(--stc-text-body, #334155);
    text-decoration: none;
}

.legal__toc a:hover { color: var(--stc-primary, #6366f1); text-decoration: underline; }

@media (max-width: 640px) {
    .legal__toc ol { columns: 1; }
}

/* ---------- Body ---------- */
.legal__body {
    background: var(--stc-surface, #fff);
    border: 1px solid var(--stc-border, #e2e8f0);
    border-radius: 16px;
    padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow: 0 4px 24px rgba(15, 23, 42, .06);
}

/* Căn đều hai lề cho văn bản pháp lý */
.legal__body p,
.legal__body li {
    text-align: justify;
}

.legal__section + .legal__section {
    margin-top: var(--stc-space-6, 2.5rem);
    padding-top: var(--stc-space-6, 2.5rem);
    border-top: 1px dashed var(--stc-border, #e2e8f0);
}

.legal__section h2 {
    font-size: var(--stc-text-lg, 1.125rem);
    font-weight: var(--stc-weight-bold, 700);
    color: var(--stc-text-heading, #0f172a);
    margin-bottom: var(--stc-space-3, .75rem);
}

.legal__section p {
    font-size: var(--stc-text-sm, .875rem);
    line-height: 1.75;
    color: var(--stc-text-body, #334155);
    margin-bottom: var(--stc-space-3, .75rem);
}

.legal__section p:last-child { margin-bottom: 0; }

.legal__section ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: var(--stc-space-3, .75rem);
}

.legal__section li {
    font-size: var(--stc-text-sm, .875rem);
    line-height: 1.75;
    color: var(--stc-text-body, #334155);
    margin-bottom: var(--stc-space-2, .5rem);
}

.legal__section li:last-child { margin-bottom: 0; }

.legal__section li::marker { color: var(--stc-primary, #6366f1); }

/* ---------- Footer ---------- */
.legal__foot {
    text-align: center;
    margin-top: var(--stc-space-6, 2.5rem);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .legal { padding-top: var(--stc-space-6, 2.5rem); }
    .legal__body { border-radius: 12px; }
    .legal__body p, .legal__body li { text-align: left; }
}
