.tv-legal { --tv-accent: var(--primary-color, #82b440); background: #f6f7f9; padding: 0 0 80px; }
.tv-legal__grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: -28px; position: relative; }

.tv-legal__aside { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.tv-legal__toc { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; box-shadow: 0 10px 30px -18px rgba(15,23,42,.25); overflow: hidden; }
.tv-legal__toc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-weight: 700; color: #0f172a; border-bottom: 1px solid #f1f5f9; }
.tv-legal__toc summary::-webkit-details-marker { display: none; }
.tv-legal__toc summary svg { width: 18px; height: 18px; color: var(--tv-accent); }
.tv-legal__toc-caret { margin-left: auto; color: #94a3b8 !important; transition: transform .2s; }
.tv-legal__toc:not([open]) .tv-legal__toc-caret { transform: rotate(-90deg); }
.tv-legal__toc ol { list-style: none; margin: 0; padding: 8px; max-height: calc(100vh - 330px); overflow-y: auto; }
.tv-legal__toc a { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; color: #475569; font-size: 14px; line-height: 1.4; text-decoration: none; transition: background .15s, color .15s; }
.tv-legal__toc a:hover { background: #f8fafc; color: #0f172a; }
.tv-legal__toc a.is-active { background: rgba(var(--primary-color-rgb, 130,180,64), .12); color: #0f172a; font-weight: 600; }
.tv-legal__toc-num { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; color: #94a3b8; min-width: 20px; }
.tv-legal__toc a.is-active .tv-legal__toc-num { color: var(--tv-accent); }

.tv-legal__help { display: flex; gap: 12px; padding: 18px 20px; border-radius: 16px; background: #0f172a; color: #cbd5e1; }
.tv-legal__help > svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--tv-accent); }
.tv-legal .tv-legal__help strong { color: #fff !important; display: block; margin-bottom: 2px; }
.tv-legal .tv-legal__help p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: #cbd5e1 !important; }
.tv-legal__help a { color: var(--tv-accent); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.tv-legal__help a svg { width: 16px; height: 16px; }

.tv-legal__body { background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; padding: 44px 52px; box-shadow: 0 10px 30px -18px rgba(15,23,42,.25); min-width: 0; }
.tv-legal__notice { display: flex; gap: 12px; padding: 16px 18px; border-radius: 12px; background: rgba(var(--primary-color-rgb, 130,180,64), .08); border-left: 4px solid var(--tv-accent); margin-bottom: 32px; }
.tv-legal__notice svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--tv-accent); margin-top: 1px; }
.tv-legal__notice p { margin: 0; color: #334155; font-size: 15px; line-height: 1.6; }

.tv-legal__content { color: #334155; font-size: 16px; line-height: 1.8; }
.tv-legal__content > p:first-child, .tv-legal__content > *:first-child { margin-top: 0; }
.tv-legal__content h2 {
    display: flex; align-items: center; gap: 14px;
    font-size: 22px; line-height: 1.3; color: #0f172a;
    margin: 44px 0 16px; padding-top: 32px; border-top: 1px solid #f1f5f9;
    scroll-margin-top: 110px;
}
.tv-legal__content h2:first-of-type { border-top: 0; padding-top: 0; }
.tv-legal__num {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(var(--primary-color-rgb, 130,180,64), .14); color: var(--tv-accent);
    font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.tv-legal__content p { margin: 0 0 14px; }
.tv-legal__content strong { color: #0f172a; }
.tv-legal .tv-legal__content ul { list-style: none !important; padding: 0 !important; margin: 6px 0 18px; display: grid; gap: 8px; }
.tv-legal .tv-legal__content ul li { list-style: none !important; position: relative; padding-left: 28px; margin: 0; }
.tv-legal .tv-legal__content ul li::marker { content: none; font-size: 0; }
.tv-legal .tv-legal__content ul li::before {
    content: ""; position: absolute; left: 4px; top: .62em;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--tv-accent); box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb, 130,180,64), .15);
}
.tv-legal__content a { color: var(--tv-accent); text-decoration: underline; text-underline-offset: 3px; }

.tv-legal__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 44px; padding: 24px 28px; border-radius: 16px; background: #f8fafc; border: 1px solid #e5e7eb; }
.tv-legal__footer strong { color: #0f172a; font-size: 17px; }
.tv-legal__footer p { margin: 4px 0 0; color: #64748b; font-size: 14px; }
.tv-legal__footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tv-legal__btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a; text-decoration: none; cursor: pointer; transition: all .15s; }
.tv-legal__btn:hover { border-color: #0f172a; }
.tv-legal__btn svg { width: 18px; height: 18px; }
.tv-legal__btn--primary { background: var(--tv-accent); border-color: var(--tv-accent); color: #fff; }
.tv-legal__btn--primary:hover { background: var(--primary-color-hover, #6e8516); border-color: var(--primary-color-hover, #6e8516); color: #fff; }

.tv-legal__top {
    position: fixed; right: 24px; bottom: 24px; z-index: 50;
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #0f172a; color: #fff; box-shadow: 0 10px 25px -10px rgba(15,23,42,.6);
    opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .2s;
}
.tv-legal__top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.tv-legal__top:hover { background: var(--tv-accent); color: #fff; }
.tv-legal__top svg { width: 20px; height: 20px; }

@media (max-width: 991px) {
    .tv-legal__grid { grid-template-columns: 1fr; gap: 20px; }
    .tv-legal__aside { position: static; }
    .tv-legal__toc ol { max-height: 320px; }
    .tv-legal__help { display: none; }
    .tv-legal__body { padding: 32px 28px; }
}
@media (max-width: 575px) {
    .tv-legal__body { padding: 24px 18px; border-radius: 16px; }
    .tv-legal__content { font-size: 15px; }
    .tv-legal__content h2 { font-size: 19px; gap: 10px; }
    .tv-legal__num { width: 32px; height: 32px; font-size: 14px; }
    .tv-legal__footer { padding: 20px; }
    .tv-legal__footer-actions, .tv-legal__btn { width: 100%; justify-content: center; }
}
@media print {
    header, footer, .tv-legal__aside, .tv-legal__footer, .tv-legal__top, .tv-legal__notice { display: none !important; }
    .tv-legal { background: none; padding: 0; }
    .tv-legal__grid { display: block; margin: 0; }
    .tv-legal__body { border: 0; box-shadow: none; padding: 0; }
}
