/* Remove "View page source" link */
.rst-content .viewcode-link,
.rst-content a.viewcode-back,
a.reference.internal.viewcode-link,
.wy-breadcrumbs-aside {
    display: none !important;
}




/* Make content use full available width */
.wy-nav-content {
    max-width: 100% !important;
}

/* Ensure content stretches properly */
.wy-nav-content-wrap {
    margin-left: 300px; /* keep sidebar space */
}

/* Optional: improve readability */
.rst-content {
    max-width: 100% !important;
}

/* Reduce extra footer spacing */
.wy-nav-content {
    padding-bottom: 1rem !important;
}

/* Reduce footer margin */
.rst-footer-buttons {
    margin-top: 1rem;
}

footer {
    margin-top: 1rem;
    padding-bottom: 0.5rem;
}


/* Collapse all nested toctrees by default */
.wy-menu-vertical ul ul {
    display: none;
}

/* Expand only the current page's tree */
.wy-menu-vertical li.current > ul {
    display: block;
}

/* Allow manual expansion on click */
.wy-menu-vertical li.toctree-l1.current > ul,
.wy-menu-vertical li.toctree-l2.current > ul {
    display: block;
}
