dl.py.class,
dl.py.function,
dl.py.method,
dl.py.property,
dl.py.attribute,
dl.py.signal {
    background-color: #eef5ff;
    padding: 1rem;
    margin-top: 2rem;

    border-top: 2px solid #0066ff;
}

dl.py.class  > dt.sig,
dl.py.function  > dt.sig,
dl.py.function > dt.sig,
dl.py.property > dt.sig,
dl.py.attribute > dt.sig,
dl.py.signal > dt.sig {
    background-color: #dce9ff;
    padding: 0.5rem 0.75rem;
    margin: -1rem -1rem 1rem -1rem;
    font-weight: 600;
}

dl.py.class dl.field-list > dt,
dl.py.function dl.field-list > dt,
dl.py.fuction dl.field-list > dt,
dl.py.property dl.field-list > dt,
dl.py.attribute dl.field-list > dt,
dl.py.signal dl.field-list > dt {
    font-weight: 600;
    margin-top: 0.5rem;
    background-color: #dce9ff;
}

.admonition,
.admonition > .admonition-body {
    border: none !important;
    background-color: #f5f5f5 !important;
}

/* Tables: a plain, compact style.
   Rows are separated by thin lines (no stripes), code in cells has no colored
   background and does not break inside a short key, and a wide table scrolls
   horizontally instead of squeezing its columns. */
.bd-article-container {
    max-width: 64em;
}

.bd-content table.table {
    font-size: 0.9em;
    width: auto;
    margin-left: 0;
    border-collapse: collapse;
}

.bd-content table.table th,
.bd-content table.table td {
    padding: 0.35em 0.8em;
    vertical-align: top;
    border: none;
    border-bottom: 1px solid var(--pst-color-border);
    background-color: transparent !important;
}

.bd-content table.table thead th {
    border-bottom: 2px solid var(--pst-color-text-muted);
    font-weight: 600;
    word-break: keep-all;  /* Japanese headers are not broken between characters. */
}

.bd-content table.table tr,
.bd-content table.table thead {
    background-color: transparent !important;
}

.bd-content table.table tbody tr:hover {
    background-color: var(--pst-color-surface) !important;
}

.bd-content table.table code.literal {
    background-color: transparent;
    border: none;
    padding: 0;
    color: var(--pst-color-inline-code);
    white-space: nowrap;
}

.bd-content table.table code.literal.table-code-wrap,
.bd-content table.table code.literal.table-code-wrap span.pre {
    white-space: normal;
}

/* Sidebar: "[en, ja]" links after the entries with a Japanese version (custom.js). */
.bd-sidebar-primary li:has(> .language-links) {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.bd-sidebar-primary li:has(> .language-links) > a.reference {
    flex: 0 1 auto;
}

.bd-sidebar-primary li:has(> .language-links) > :not(a):not(.language-links) {
    flex-basis: 100%;
}

.bd-sidebar-primary .language-links {
    font-size: 0.8em;
    color: var(--pst-color-text-muted);
    white-space: nowrap;
    margin-left: 0.4em;
}

.bd-sidebar-primary .language-links a {
    display: inline;
    padding: 0;
    color: var(--pst-color-link);
}

.bd-sidebar-primary .language-links a.current-language {
    font-weight: 700;
}
