
body.split-doc {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #f4f5f7;
}

.doc-shell {
    display: grid;
    grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
    min-height: 100vh;
}

.doc-index {
    box-sizing: border-box;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 1.2rem 1rem;
    border-right: 1px solid #d9dde3;
    background: #eef1f4;
}

.doc-index-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.8rem;
}

.doc-index-title {
    display: block;
    flex: 1 1 auto;
    color: #24506b;
    font-family: 'Proxima Nova', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
}

.doc-index-controls {
    display: flex;
    flex: 0 0 auto;
    gap: 0.05rem;
}

.doc-index-home,
.doc-index-step {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #8b99a3;
    font-size: 0.72rem;
    line-height: 1.35rem;
    text-align: center;
    text-decoration: none;
}

.doc-index-home:hover,
.doc-index-step:hover {
    border-color: transparent;
    background: rgba(36, 80, 107, 0.08);
    color: #526a7a;
}

.doc-index-step.is-disabled {
    cursor: default;
    opacity: 0.35;
}

.doc-index-step.is-disabled:hover {
    border-color: transparent;
    background: transparent;
    color: #8b99a3;
}

.doc-index ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-index li {
    margin: 0;
}

.doc-index li + li {
    margin-top: 0.1rem;
}

.doc-index a {
    display: block;
    border-radius: 4px;
    color: #26343d;
    font-size: 0.86rem;
    line-height: 1.25;
    padding: 0.35rem 0.45rem;
    text-decoration: none;
}

.doc-index .doc-index-home,
.doc-index .doc-index-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    font-size: 0.72rem;
    line-height: 1;
}

.doc-index a:hover,
.doc-index .is-active a {
    background: #dce8ef;
    color: #14384c;
}

.doc-index .nav-part a {
    margin-top: 0.55rem;
    color: #24506b;
    font-weight: 700;
}

.doc-index .nav-chapter a,
.doc-index .nav-article a {
    padding-left: 1rem;
}

.doc-index .nav-subchapter a {
    padding-left: 2rem;
}

.doc-index .nav-subsubchapter a {
    padding-left: 3rem;
}

.doc-index .nav-appendix a {
    padding-left: 1rem;
    color: #4b5060;
}

.doc-page {
    box-sizing: border-box;
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.split-index ol {
    margin-left: 0;
    padding-left: 0;
    list-style: none;
}

.split-index li {
    margin: 0;
}

.split-index li + li {
    margin-top: 0.25rem;
}

.split-index a {
    color: #24506b;
    text-decoration: none;
}

.split-index a:hover {
    text-decoration: underline;
}

.split-index .index-part {
    margin-top: 0.8rem;
    font-weight: 700;
}

.split-index .index-chapter,
.split-index .index-article,
.split-index .index-appendix {
    padding-left: 1rem;
}

.split-index .index-subchapter {
    padding-left: 2rem;
}

.split-index .index-subsubchapter {
    padding-left: 3rem;
}

.doc-prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #d9dde3;
}

.doc-prev-next a {
    border: 1px solid #d9dde3;
    border-radius: 6px;
    background: #fff;
    color: #24506b;
    padding: 0.7rem 0.8rem;
    text-decoration: none;
}

.doc-prev-next a:hover {
    border-color: #9eb5c4;
    background: #f8fbfc;
}

.doc-prev-next span {
    display: block;
    color: #67737c;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.doc-prev-next .next {
    grid-column: 2;
    text-align: right;
}

@media (max-width: 760px) {
    .doc-shell {
        display: block;
    }

    .doc-index {
        position: relative;
        height: auto;
        max-height: 45vh;
        border-right: none;
        border-bottom: 1px solid #d9dde3;
    }

    .doc-page {
        padding: 1.2rem 1rem 3rem;
    }

    .doc-prev-next {
        grid-template-columns: 1fr;
    }

    .doc-prev-next .next {
        grid-column: 1;
        text-align: left;
    }
}

@media (prefers-color-scheme: dark) {
    body.split-doc {
        background: #151719;
    }

    .doc-index {
        background: #202428;
        border-color: #353b42;
    }

    .doc-index-title,
    .doc-index .nav-part a,
    .split-index a,
    .doc-prev-next a {
        color: #bde;
    }

    .doc-index a {
        color: #d7dde2;
    }

    .doc-index a:hover,
    .doc-index .is-active a {
        background: #2f3c45;
        color: #eaf7ff;
    }

    .doc-index-home,
    .doc-index-step {
        border-color: transparent;
        color: #6f818e;
    }

    .doc-index-home:hover,
    .doc-index-step:hover {
        border-color: transparent;
        background: rgba(189, 221, 238, 0.08);
        color: #9fb3bf;
    }

    .doc-index-step.is-disabled:hover {
        border-color: transparent;
        background: transparent;
        color: #6f818e;
    }

    .doc-index .nav-appendix a,
    .doc-prev-next span {
        color: #b9c0c7;
    }

    .doc-prev-next {
        border-color: #353b42;
    }

    .doc-prev-next a {
        background: #202428;
        border-color: #353b42;
    }

    .doc-prev-next a:hover {
        background: #263039;
        border-color: #536474;
    }
}
