.leg-sec {
    scroll-margin-top: 90px;
    margin-top: 38px;
}

.legal-publico { margin: 2rem auto 4rem; max-width: 1120px; color: #102a34; }
.legal-publico h1 { font-size: clamp(1.75rem, 3vw, 2.3rem); letter-spacing: -.8px; }
.legal-publico h2 { font-size: 1.15rem; margin: 1.8rem 0 .75rem; }
.legal-publico .panel h2 { margin-top: 0; }
.legal-publico .legal-contenido { max-width: 80ch; line-height: 1.8; overflow-wrap: anywhere; }
.legal-publico a:not(.btn) { color: #075e70; text-decoration: underline; text-underline-offset: 3px; }
.faq-pregunta { border: 1px solid #dfe6e7; border-radius: 12px; background: #fff; margin-bottom: .75rem; }
.faq-pregunta summary { padding: 1rem 1.2rem; font-weight: 700; cursor: pointer; }
.faq-pregunta[open] summary { background: #e8f9fc; border-radius: 12px 12px 0 0; }
.faq-pregunta > div { padding: 1rem 1.2rem; line-height: 1.75; }
.faq-pregunta p:last-child { margin-bottom: 0; }
.legal-publico :focus-visible { outline: 3px solid #075e70; outline-offset: 3px; }

.leg-sec h2 {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.leg-sec h2 .leg-num {
    color: var(--lnd-gold, #00AFCB);
    font-weight: 800;
}

.leg-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: .92rem;
}

.leg-table th,
.leg-table td {
    border: 1px solid rgba(120, 120, 140, .28);
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
}

.leg-table th {
    background: rgba(120, 120, 140, .10);
    font-weight: 700;
}

.leg-note {
    border-left: 4px solid var(--lnd-gold, #00AFCB);
    background: rgba(0, 175, 203, .08);
    padding: 12px 16px;
    border-radius: 0 10px 10px 0;
    margin: 16px 0;
    font-size: .92rem;
}

.leg-updated {
    font-size: .85rem;
    opacity: .75;
}

.leg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    border-bottom: 2px solid rgba(120, 120, 140, .2);
    margin-bottom: 20px;
}

.leg-tab {
    border: 0;
    background: none;
    padding: 10px 18px;
    font-weight: 600;
    font-size: .95rem;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.leg-tab:hover {
    opacity: .85;
}

.leg-tab.is-active {
    opacity: 1;
    color: var(--lnd-gold, #00AFCB);
    border-bottom-color: var(--lnd-gold, #00AFCB);
}

.leg-tab:focus-visible {
    outline: 2px solid var(--lnd-gold, #00AFCB);
    outline-offset: 2px;
}

.leg-pane[hidden] {
    display: none;
}

.lnd-prose {
    max-width: none;
    margin: 0;
}

.leg-tabs-layout {
    margin-top: 18px;
}

.leg-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 2px 8px 2px 0;
}

.leg-nav-tit {
    font-size: .72rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: .55;
    margin: 0 0 10px 4px;
}

.leg-navtab {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    border: 0;
    background: none;
    font: inherit;
    font-size: .92rem;
    line-height: 1.45;
    color: var(--lnd-body, #2F3F46);
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 11px;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}

.leg-navtab .leg-num {
    flex: 0 0 auto;
    width: 23px;
    height: 23px;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(120, 120, 140, .14);
    color: var(--lnd-body, #2F3F46);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    transition: background .15s, color .15s;
}

.leg-navtab:hover {
    background: rgba(120, 120, 140, .07);
    color: inherit;
}

.leg-navtab:focus-visible {
    outline: 2px solid var(--lnd-gold, #00AFCB);
    outline-offset: 2px;
}

.leg-navtab.is-active {
    color: inherit;
    font-weight: 600;
    background: rgba(0, 175, 203, .13);
    border-left-color: var(--lnd-gold, #00AFCB);
}

.leg-navtab.is-active .leg-num {
    background: var(--lnd-gold, #00AFCB);
    color: #fff;
}

.leg-panels {
    min-width: 0;
}

.leg-panels .leg-sec {
    margin-top: 0;
}

.leg-panels .leg-sec[hidden] {
    display: none;
}

.leg-panels .leg-sec:focus {
    outline: none;
}

@media (max-width: 991.98px) {
    .leg-nav-tit {
        display: none;
    }

    .leg-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        position: static;
        max-height: none;
        gap: 8px;
        padding: 2px 0 10px;
        margin-bottom: 18px;
        border-bottom: 2px solid rgba(120, 120, 140, .18);
        -webkit-overflow-scrolling: touch;
    }

    .leg-navtab {
        flex: 0 0 auto;
        white-space: nowrap;
        border-left: 0;
        padding: 9px 14px;
        border-radius: 999px;
        background: rgba(120, 120, 140, .08);
    }

    .leg-navtab .leg-num {
        display: none;
    }

    .leg-navtab.is-active {
        border-left: 0;
        background: rgba(0, 175, 203, .16);
        box-shadow: inset 0 0 0 1.5px var(--lnd-gold, #00AFCB);
    }
}

@media (prefers-reduced-motion: reduce) {
    .leg-navtab {
        transition: none;
    }
}
