/* Flex TV — Manual del panel (diseño documentación) */
.docs-body {
    --docs-navbar-h: 88px;
    --docs-mobile-bar-h: 0px;
    --docs-top-offset: var(--docs-navbar-h);
    --docs-sidebar-w: 280px;
    --docs-z-nav: 2500;
    --docs-z-site-menu: 2520;
    --docs-z-drawer: 2485;
    --docs-z-subnav: 2480;
    --docs-toc-w: 268px;
    --docs-content-max: 44rem;
    --docs-gutter: clamp(1rem, 3vw, 2.5rem);
    --docs-surface: rgba(12, 18, 42, 0.88);
    --docs-surface-2: rgba(255, 255, 255, 0.04);
    --docs-line: rgba(255, 255, 255, 0.09);
    --docs-line-strong: rgba(0, 102, 255, 0.35);
    --docs-text: rgba(255, 255, 255, 0.86);
    --docs-text-muted: rgba(255, 255, 255, 0.58);
    scroll-behavior: smooth;
}
/* Barra de lectura */
.docs-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.docs-progress__bar {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0049aa, #00c9ff);
    box-shadow: 0 0 12px rgba(0, 201, 255, 0.55);
    transition: width 0.12s ease-out;
}

.docs-page {
    padding-top: var(--docs-top-offset);
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 102, 255, 0.18), transparent 55%),
        var(--black);
}

.docs-shell {
    display: flex;
    align-items: stretch;
    max-width: 1680px;
    margin: 0 auto;
    min-height: calc(100vh - var(--docs-top-offset));
    border-top: 1px solid var(--docs-line);
}

/* —— Barra superior: mismas reglas que web2/index (style.css) —— */
.docs-body .navbar {
    z-index: var(--docs-z-nav);
}

/* Hamburguesa del navbar = copia exacta de web2/style.css (.menu-toggle) */
.docs-body nav.navbar .nav-content > button.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    box-sizing: border-box;
    font: inherit;
    color: inherit;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.docs-body nav.navbar .nav-content > button.menu-toggle:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .docs-body nav.navbar .nav-content > button.menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    .docs-body nav.navbar .nav-content > button.menu-toggle > span {
        width: 22px;
        height: 2.5px;
        background: var(--white);
        border-radius: 2px;
        transition: transform 0.28s ease, opacity 0.2s ease;
        display: block;
        margin: 0 auto;
    }
}

.docs-body .nav-menu a[aria-current="page"] {
    color: var(--white);
    font-weight: 600;
}

.docs-body .nav-menu a[aria-current="page"]::after {
    width: 100%;
}

/* —— Sidebar manual (columna del sitio) —— */
.docs-sidebar {
    position: sticky;
    top: var(--docs-top-offset);
    flex: 0 0 var(--docs-sidebar-w);
    width: var(--docs-sidebar-w);
    height: calc(100vh - var(--docs-top-offset));
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--docs-line);
    background: rgba(10, 10, 10, 0.97);
    z-index: 5;
}

.docs-sidebar__head {
    flex-shrink: 0;
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--docs-line);
}

.docs-sidebar__scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 14px 14px 28px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 102, 255, 0.5) transparent;
}

.docs-sidebar__scroll::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar__scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 102, 255, 0.45);
    border-radius: 6px;
}

.docs-sidebar__title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--docs-text-muted);
    margin: 18px 0 8px 10px;
    padding-left: 8px;
    border-left: 2px solid rgba(0, 102, 255, 0.5);
}

.docs-sidebar__title:first-child {
    margin-top: 6px;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.docs-nav-link {
    display: block;
    padding: 10px 12px 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--docs-text);
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.docs-nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(0, 102, 255, 0.45);
}

.docs-nav-link.is-active {
    color: var(--white);
    background: rgba(0, 102, 255, 0.14);
    border-left-color: var(--primary-light);
    border-color: rgba(0, 102, 255, 0.25);
    border-left-width: 3px;
}

.docs-nav-link__label {
    display: block;
    line-height: 1.35;
}

.docs-search-wrap {
    padding: 0;
}

.docs-search {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border-radius: 10px;
    border: 1px solid var(--docs-line);
    background: rgba(0, 0, 0, 0.35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.1a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 12px center no-repeat;
    color: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.docs-search:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.22);
}
/* —— Zona central: artículo + TOC derecho —— */
.docs-center {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.docs-main {
    flex: 1;
    min-width: 0;
    max-width: calc(var(--docs-content-max) + var(--docs-gutter) * 2);
    padding: 0 var(--docs-gutter) 100px;
}

.docs-hero {
    padding: 32px 0 28px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--docs-line);
    position: relative;
}

.docs-hero::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 120px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.docs-breadcrumb {
    font-size: 0.82rem;
    color: var(--docs-text-muted);
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.docs-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.docs-breadcrumb a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.docs-breadcrumb__sep {
    opacity: 0.45;
    user-select: none;
}

.docs-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-article {
    font-size: 1.02rem;
}

.docs-lead {
    font-size: 1.15rem;
    color: var(--docs-text);
    margin: 0 0 36px;
    line-height: 1.75;
    padding: 20px 22px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(0, 73, 170, 0.12) 0%, rgba(0, 201, 255, 0.04) 100%);
    border: 1px solid var(--docs-line-strong);
}

.docs-article > .docs-lead:first-child {
    margin-top: 8px;
}

.docs-article h2,
.docs-main h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 52px 0 18px;
    padding: 0 0 0 16px;
    border-left: 4px solid transparent;
    border-image: var(--gradient-primary) 1;
    color: var(--white);
    scroll-margin-top: calc(var(--docs-navbar-h) + 24px);
    line-height: 1.3;
}

.docs-section-heading {
    position: relative;
}

.docs-article h3,
.docs-main h3 {
    font-size: 1.12rem;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--accent-light);
    scroll-margin-top: calc(var(--docs-navbar-h) + 24px);
}

.docs-article h4,
.docs-main h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 22px 0 10px;
    color: rgba(255, 255, 255, 0.92);
}

.docs-article p,
.docs-article li,
.docs-main p,
.docs-main li {
    color: var(--docs-text);
    line-height: 1.72;
}

.docs-article ul,
.docs-article ol,
.docs-main ul,
.docs-main ol {
    margin: 14px 0 22px;
    padding-left: 1.35rem;
}

.docs-article li,
.docs-main li {
    margin-bottom: 8px;
}

.docs-article li::marker {
    color: var(--primary-light);
}

.docs-article a:not(.docs-pager__link),
.docs-main a:not(.docs-pager__link) {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(0, 201, 255, 0.35);
    text-underline-offset: 3px;
}

.docs-article a:not(.docs-pager__link):hover,
.docs-main a:not(.docs-pager__link):hover {
    color: var(--accent-light);
}

.docs-module-grid .docs-card h4 a {
    text-decoration: none;
}

/* Tarjetas */
.docs-card {
    background: var(--docs-surface-2);
    border: 1px solid var(--docs-line);
    border-radius: var(--border-radius-lg);
    padding: 22px 26px;
    margin: 24px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.docs-card--warn {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.04) 100%);
}

.docs-card--tip {
    border-color: rgba(0, 201, 255, 0.4);
    background: linear-gradient(135deg, rgba(0, 201, 255, 0.1) 0%, rgba(0, 102, 255, 0.04) 100%);
}

.docs-card strong {
    color: var(--white);
}

.docs-card h4 {
    margin-top: 0;
}

.docs-card h4 a {
    color: var(--white);
    text-decoration: none;
}

.docs-card h4 a:hover {
    color: var(--accent-light);
}
/* Módulos en índice */
.docs-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin: 28px 0 36px;
}

.docs-module-grid .docs-card {
    margin: 0;
    padding: 20px 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.docs-module-grid .docs-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 102, 255, 0.45);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.15);
}

.docs-module-grid .docs-card p {
    font-size: 0.9rem;
    margin: 8px 0 0;
    color: var(--docs-text-muted);
}
/* Tablas */
.docs-table-wrap {
    overflow-x: auto;
    margin: 20px 0 28px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--docs-line);
    background: rgba(0, 0, 0, 0.25);
    -webkit-overflow-scrolling: touch;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.docs-table th,
.docs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--docs-line);
}

.docs-table th {
    background: rgba(0, 73, 170, 0.35);
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.docs-table tbody tr:last-child td {
    border-bottom: none;
}

.docs-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}
/* Pasos numerados */
.docs-steps {
    counter-reset: docstep;
    list-style: none;
    margin: 20px 0 32px;
    padding: 0;
}

.docs-steps li {
    position: relative;
    padding: 4px 0 4px 56px;
    margin-bottom: 24px;
    counter-increment: docstep;
}

.docs-steps li::before {
    content: counter(docstep);
    position: absolute;
    left: 0;
    top: 2px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    background: var(--gradient-primary);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--white);
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.35);
}

.docs-steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 17px;
    top: 42px;
    bottom: -18px;
    width: 2px;
    background: linear-gradient(180deg, rgba(0, 102, 255, 0.5), transparent);
}

.docs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 24px 0;
}

.docs-kbd {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.85em;
    font-family: ui-monospace, Consolas, monospace;
}

/* Navegacion anterior / siguiente (orden del indice lateral) */
.docs-pager {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--docs-line);
}

.docs-pager__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
}

.docs-pager__slot {
    min-height: 3.5rem;
    min-width: 0;
    display: flex;
}

.docs-pager__slot:first-child {
    justify-content: flex-start;
}

.docs-pager__slot:last-child {
    justify-content: flex-end;
}

.docs-pager__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 3.5rem;
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--docs-line);
    background: rgba(0, 0, 0, 0.28);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.docs-pager__link:hover {
    border-color: rgba(0, 102, 255, 0.5);
    background: rgba(0, 102, 255, 0.14);
    box-shadow: 0 6px 24px rgba(0, 102, 255, 0.18);
    transform: translateY(-1px);
}

.docs-pager__link--prev {
    justify-content: flex-start;
}

.docs-pager__link--next {
    justify-content: flex-end;
    text-align: right;
}

.docs-pager__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.docs-pager__link--next .docs-pager__text {
    align-items: flex-end;
}

.docs-pager__dir {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.docs-pager__label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--docs-text-muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.docs-pager__arrow {
    flex-shrink: 0;
    font-size: 1.15rem;
    line-height: 1;
    color: rgba(0, 201, 255, 0.65);
    font-weight: 700;
}

.docs-pager__link:hover .docs-pager__arrow {
    color: var(--accent-light);
}

@media (max-width: 640px) {
    .docs-pager__grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .docs-pager__link {
        padding: 12px 10px;
        gap: 8px;
        min-height: 3rem;
    }

    .docs-pager__dir {
        font-size: 0.85rem;
    }

    .docs-pager__label {
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .docs-pager__arrow {
        font-size: 1rem;
    }
}

.docs-code {
    display: block;
    margin: 16px 0 24px;
    padding: 18px 20px;
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--docs-line);
    background: rgba(0, 0, 0, 0.5);
    font-size: 0.84rem;
    line-height: 1.55;
}

.docs-code code {
    font-family: Consolas, Monaco, monospace;
    color: rgba(255, 255, 255, 0.9);
    white-space: pre;
}
/* TOC derecho (desktop) */
.docs-page-toc {
    flex: 0 0 var(--docs-toc-w);
    width: var(--docs-toc-w);
    padding: 32px 20px 80px 0;
}

.docs-page-toc__sticky {
    position: sticky;
    top: calc(var(--docs-navbar-h) + 20px);
    max-height: calc(100vh - var(--docs-navbar-h) - 40px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.docs-page-toc__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--docs-text-muted);
    margin: 0 0 6px 4px;
    flex-shrink: 0;
}

.docs-page-toc__hint {
    font-size: 0.78rem;
    color: var(--docs-text-muted);
    margin: 0 0 12px 4px;
    line-height: 1.4;
    flex-shrink: 0;
}

.docs-page-toc__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    overflow: visible;
    padding-right: 4px;
}

.docs-page-toc__link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--docs-text-muted);
    font-size: 0.86rem;
    line-height: 1.35;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.docs-page-toc__link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.docs-page-toc__link.is-active {
    color: var(--white);
    background: rgba(0, 102, 255, 0.15);
    border-color: rgba(0, 102, 255, 0.35);
}

.docs-page-toc__text {
    flex: 1;
}

/* Botón flotante volver arriba (visible al bajar en la página) */
.docs-scroll-top {
    position: fixed;
    right: 20px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 2470;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 102, 255, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.docs-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.docs-scroll-top:hover {
    filter: brightness(1.08);
}
/* Índice embebido antiguo (por si queda en caché) */
.docs-toc {
    display: none !important;
}

.docs-mobile-bar {
    display: none;
}

.docs-sidebar__close {
    display: none;
}

.docs-sidebar-backdrop,
.docs-page-toc-backdrop {
    display: none;
}

.docs-page-toc-drawer {
    display: none;
}

.docs-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

/* Menú Sitio web / Documentación por encima de Índice, Contenido y drawers del manual */
body.menu-open.docs-body .navbar {
    z-index: var(--docs-z-site-menu);
}

body.menu-open.docs-body .nav-menu.active {
    z-index: calc(var(--docs-z-site-menu) - 1);
}

body.menu-open.docs-body .nav-backdrop {
    z-index: calc(var(--docs-z-site-menu) - 2);
}
/* —— Tablet / móvil —— */
@media (max-width: 1280px) {
    .docs-page-toc {
        display: none !important;
    }
    .docs-center {
        display: block;
    }
    .docs-main {
        max-width: none;
    }
}
@media (max-width: 1100px) {
    .docs-body {
        --docs-mobile-bar-h: 50px;
        --docs-top-offset: calc(var(--docs-navbar-h) + var(--docs-mobile-bar-h));
    }

    body.docs-sidebar-open,
    body.docs-page-toc-open {
        overflow: hidden;
        touch-action: none;
    }

    .docs-mobile-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        top: var(--docs-navbar-h);
        left: 0;
        right: 0;
        z-index: var(--docs-z-subnav);
        height: var(--docs-mobile-bar-h);
        padding: 6px 12px;
        background: rgba(10, 14, 39, 0.96);
        border-bottom: 1px solid var(--docs-line);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }

    .docs-mobile-bar__group {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
    }

    /* Índice del manual: misma apariencia que .menu-toggle del index */
    .docs-index-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        padding: 0;
        margin: 0;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.06);
        flex-shrink: 0;
        cursor: pointer;
        box-sizing: border-box;
        font: inherit;
        color: inherit;
        line-height: 1;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
    }

    .docs-index-toggle span {
        width: 22px;
        height: 2.5px;
        background: var(--white);
        border-radius: 2px;
        transition: transform 0.28s ease, opacity 0.2s ease;
        display: block;
        margin: 0 auto;
    }

    .docs-index-toggle:focus-visible {
        outline: 2px solid var(--primary-light);
        outline-offset: 2px;
    }

    .docs-mobile-bar__btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 38px;
        padding: 8px 12px;
        border-radius: 9px;
        border: 1px solid rgba(0, 102, 255, 0.35);
        background: rgba(0, 102, 255, 0.12);
        color: var(--white);
        font-family: inherit;
        font-size: 0.88rem;
        font-weight: 600;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .docs-mobile-bar__btn:hover,
    .docs-mobile-bar__btn:focus-visible {
        background: rgba(0, 102, 255, 0.22);
        border-color: rgba(0, 102, 255, 0.55);
        outline: none;
    }

    .docs-mobile-bar__btn[aria-expanded="true"] {
        background: var(--gradient-primary);
        border-color: transparent;
        box-shadow: 0 4px 16px rgba(0, 102, 255, 0.35);
    }

    .docs-mobile-bar__btn--sections:not([hidden]) {
        flex: 1;
    }

    .docs-mobile-bar__btn[hidden] {
        display: none !important;
    }

    .docs-mobile-bar__icon {
        font-size: 1.05rem;
        line-height: 1;
        opacity: 0.9;
    }

    .docs-shell {
        display: block;
    }

    .docs-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(var(--docs-sidebar-w), 92vw);
        max-width: 340px;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: var(--docs-z-drawer);
        box-shadow: none;
    }

    .docs-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 8px 0 48px rgba(0, 0, 0, 0.55);
    }

    .docs-sidebar__head {
        position: relative;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
        padding-right: 52px;
    }

    .docs-sidebar__close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: calc(8px + env(safe-area-inset-top, 0px));
        right: 12px;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        color: var(--white);
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
        -webkit-tap-highlight-color: transparent;
    }

    .docs-sidebar-backdrop,
    .docs-page-toc-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.72);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: calc(var(--docs-z-drawer) - 1);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .docs-sidebar-backdrop.is-open,
    .docs-page-toc-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

    .docs-page-toc-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: min(75vh, 520px);
        z-index: var(--docs-z-drawer);
        background: var(--docs-surface);
        border-radius: 18px 18px 0 0;
        border-top: 1px solid var(--docs-line-strong);
        transform: translateY(105%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .docs-page-toc-drawer.is-open {
        transform: translateY(0);
    }

    .docs-page-toc-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px 12px;
        border-bottom: 1px solid var(--docs-line);
        flex-shrink: 0;
    }

    .docs-page-toc-drawer__title {
        font-weight: 700;
        font-size: 1rem;
        color: var(--white);
    }

    .docs-page-toc-drawer__close {
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        color: var(--white);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .docs-page-toc-drawer__nav {
        overflow-y: auto;
        padding: 10px 14px 20px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .docs-page-toc-drawer__nav .docs-page-toc__link {
        padding: 14px 14px;
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .docs-main {
        padding: 20px 16px calc(88px + env(safe-area-inset-bottom, 0px));
    }

    .docs-main h2,
    .docs-article h2,
    .docs-main h3,
    .docs-article h3 {
        scroll-margin-top: calc(var(--docs-top-offset) + 16px);
    }

    .docs-hero {
        padding-top: 16px;
        margin-bottom: 4px;
    }

    .docs-hero__title {
        font-size: clamp(1.45rem, 6vw, 1.85rem);
    }

    .docs-lead {
        padding: 16px 18px;
        font-size: 1.05rem;
    }

    .docs-module-grid {
        grid-template-columns: 1fr;
    }

    .docs-grid-2 {
        grid-template-columns: 1fr;
    }

    .docs-table-wrap {
        margin-left: -4px;
        margin-right: -4px;
        border-radius: 10px;
    }

    .docs-scroll-top {
        right: 16px;
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 768px) {
    .docs-body {
        --docs-navbar-h: 76px;
        --docs-mobile-bar-h: 48px;
    }

    .docs-mobile-bar {
        padding: 6px 10px;
        gap: 6px;
    }

    .docs-mobile-bar__label {
        font-size: 0.82rem;
    }

    .docs-main h2,
    .docs-article h2 {
        font-size: 1.22rem;
        margin-top: 40px;
    }
}

@media (min-width: 1101px) {
    .docs-mobile-bar {
        display: none !important;
    }

    .docs-page-toc-drawer,
    .docs-page-toc-backdrop {
        display: none !important;
    }

    .docs-sidebar {
        top: var(--docs-navbar-h);
        height: calc(100vh - var(--docs-navbar-h));
    }
}
