.bd-toc {
    position: sticky;
    top: 1rem;
}

.bd-sidebar-secondary {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.bd-article-container {
    max-width: 100%;
    overflow-x: hidden;
}

p, li, td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

pre, code {
    white-space: pre-wrap !important;
    word-wrap: break-word;
    overflow-x: auto;
}

code.literal {
    word-break: break-all;
}

.mermaid {
    text-align: center;
}

.mermaid svg {
    max-width: 100%;
    width: auto !important;
    height: auto !important;
}

/* Wide table scroll support */
.pst-scrollable-table-container {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid var(--pst-color-border, #dee2e6);
    border-radius: 4px;
}

.pst-scrollable-table-container table {
    width: auto;
    min-width: 100%;
    margin-bottom: 0;
}

.pst-scrollable-table-container table td:first-child {
    white-space: nowrap;
    max-width: 350px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.pst-scrollable-table-container table td code.literal {
    word-break: break-all;
    white-space: pre-wrap;
}