    .collapse {
        transition: height 0.3s ease;
    }

    #filtros-mobile .btn {
        margin-bottom: 15px;
    }

    .compare-tool {
        margin-bottom: 20px;
    }

    fieldset {
        border: 1px solid #e5e5e5;
        margin-bottom: 15px;
        border-radius: 5px;
        padding: 15px;
    }

    legend {
        font-size: 1.2rem;
        color: #007bff;
        font-weight: bold;
    }

    button.btn-primary {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .msg {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        padding: .5rem;
        margin-bottom: 1rem;
        background-color: hsla(0, 0%, 100%, .5);
        border-style: dashed;
        border-width: 1px;
        border-radius: .25rem;
    }

    .scroll-nav {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .scroll-nav .nav {
        white-space: nowrap;
        gap: .5rem;
        padding: .25rem .5rem;
    }

    .scroll-nav .nav-item {
        scroll-snap-align: start;
    }

    /* Enlaces (gris claro, esquinas cuadradas) */
    .scroll-nav .nav-link {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        padding: .55rem .9rem;
        background: #ffffff;
        /* gris claro por defecto */
        color: #0f172a;
        border: 1px solid #e5e7eb;
        border-radius: 0;
        /* cuadrado */
        text-decoration: none;
    }

    /* Solo el activo con el fondo solicitado */
    .scroll-nav .nav-link.active,
    .scroll-nav .nav-link[aria-current="page"] {
        background: #f2f7fc;
        /* solicitado para activo */
        color: #000000ff;
        border-color: #f2f7fc;
    }

    /* Scrollbar opcional sutil */
    .scroll-nav::-webkit-scrollbar {
        height: 8px;
    }

    .scroll-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .scroll-nav::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, .12);
    }


    @media (prefers-reduced-motion:reduce) {

        .scroll-nav .nav-link,
        .scroll-nav .nav-link::after {
            transition: none;
        }
    }


    /* Enlaces guía sin subrayado (como pediste) */
    .c-toc a,
    .c-toc-content a {
        text-decoration: none;
        color: #334155;
    }

    .c-toc a:hover,
    .c-toc-content a:hover {
        color: var(--brand);
    }

    .c-toc-content h2 {
        scroll-margin-top: 90px;
    }

    html {
        scroll-behavior: smooth;
    }

    .c-toc a {
        color: #334155;
        border-radius: 8px;
        padding: .35rem .25rem;
        text-decoration: none;
    }

    .c-toc a:hover,
    .c-toc a:focus-visible {
        color: #2f55d4;
        background: #f4f7ff;
        outline: none;
        box-shadow: 0 0 0 3px rgba(47, 85, 212, .12);
    }

    /* Fila del TOC */
    .c-toc .list-unstyled li a,
    .c-toc-sidebar__list li a {
        display: flex;
        align-items: flex-start;
        gap: .5rem;
        padding: .4rem .25rem;
        border-radius: 8px;
        transition: color .2s ease, background .2s ease, box-shadow .2s ease;
    }

    /* Icono Bootstrap inline */
    .c-toc .list-unstyled li a .bi,
    .c-toc-sidebar__list li a .bi {
        width: 1.1rem;
        height: 1.1rem;
        font-size: 1rem;
        line-height: 1;
        margin-top: .15rem;
        flex: 0 0 1.1rem;
        opacity: .85;
    }

    /* Hover/focus final */
    .c-toc .list-unstyled li a:hover,
    .c-toc .list-unstyled li a:focus-visible,
    .c-toc-sidebar__list li a:hover,
    .c-toc-sidebar__list li a:focus-visible {
        color: #2f55d4;
        background: #f4f7ff;
        box-shadow: 0 0 0 3px rgba(47, 85, 212, .15);
    }
@media (max-width: 767.98px) {
  /* Panel mobile a pantalla completa al abrir */
  #bloquefiltros {
    transition: transform .25s ease, visibility 0s;
    border-radius: 0 !important;
  }
  #bloquefiltros:not(.show) {
    visibility: hidden;
    pointer-events: none;
    transform: translateY(100%);
  }
  #bloquefiltros.show {
    position: fixed;
    inset: 0;
    z-index: 1060;
    overflow-y: auto;
    background: #fff;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .filters-header .btn { line-height: 1; }
  .filters-footer { z-index: 1; }

  .filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1055;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
  }
  .filters-backdrop.show {
    opacity: 1;
    visibility: visible;
  }
}