/* Refine spacing and typography without changing document content. */

:root {
    --ss-ink: #10263d;
    --ss-ink-soft: #41576d;
    --ss-ink-faint: #6d8093;
    --ss-accent: #16324f;
    --ss-accent-soft: #edf3f8;
    --ss-border: #d8e1eb;
    --ss-surface: #ffffff;
    --ss-surface-muted: #f7f9fc;
    --ss-shadow: 0 2px 10px rgba(16, 38, 61, 0.04);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--ss-ink);
    text-rendering: optimizeLegibility;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-feature-settings: "kern" 1, "liga" 1;
}

.wy-body-for-nav {
    background: #f6f8fb;
}

.wy-nav-side {
    box-shadow: inset -1px 0 0 rgba(216, 225, 235, 0.16);
}

.wy-nav-side::-webkit-scrollbar {
    width: 10px;
}

.wy-nav-side::-webkit-scrollbar-thumb {
    background: rgba(220, 232, 242, 0.22);
    border-radius: 999px;
}

.wy-side-nav-search,
.wy-nav-top {
    background: var(--ss-accent);
}

.wy-side-nav-search {
    padding: 1.1rem 1rem 0.95rem;
}

.wy-side-nav-search > a,
.wy-side-nav-search .wy-dropdown > a {
    font-weight: 700;
    letter-spacing: 0.005em;
}

.wy-side-nav-search > a.icon-home,
.wy-side-nav-search .wy-dropdown > a.icon-home {
    display: block;
    margin: 0 auto 0.9rem;
    padding: 0;
}

.wy-side-nav-search > a.icon-home img.logo,
.wy-side-nav-search .wy-dropdown > a.icon-home img.logo {
    display: block;
    width: min(100%, 240px);
    max-width: 88%;
    height: auto;
    margin: 0 auto;
    padding: 0.35rem 0.45rem;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 22px rgba(8, 21, 34, 0.14);
}

.wy-side-nav-search input[type="text"] {
    margin-top: 0.15rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.wy-menu-vertical p.caption {
    color: #dbe7f3;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.wy-menu-vertical a {
    line-height: 1.45;
    border-radius: 4px;
}

.wy-menu-vertical li.current > a,
.wy-menu-vertical li.toctree-l1.current > a,
.wy-menu-vertical li.toctree-l2.current > a {
    color: var(--ss-ink);
    font-weight: 600;
}

.wy-menu-vertical li.toctree-l1 > a:hover,
.wy-menu-vertical li.toctree-l2 > a:hover,
.wy-menu-vertical li.toctree-l3 > a:hover {
    background: rgba(219, 231, 243, 0.08);
}

.wy-menu-vertical li.current {
    background: rgba(240, 246, 252, 0.72);
}

.wy-menu-vertical li.current > a {
    border-left: 3px solid #5a7ca0;
}

.wy-nav-content-wrap {
    background: #f6f8fb;
}

.wy-nav-content {
    max-width: 980px;
    margin-top: 0.9rem;
    margin-bottom: 1rem;
    padding: 2rem 2.6rem 2.3rem;
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: 6px;
    box-shadow: var(--ss-shadow);
}

.rst-content {
    line-height: 1.72;
    color: var(--ss-ink);
    font-size: 0.98rem;
}

.rst-content > div.section:first-of-type > p:first-of-type,
.rst-content > p:first-of-type {
    color: var(--ss-ink-soft);
    font-size: 1.02rem;
    line-height: 1.76;
}

.wy-breadcrumbs {
    margin-bottom: 1rem;
    padding: 0.45rem 0 0.8rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--ss-border);
    border-radius: 0;
}

.wy-breadcrumbs li {
    color: var(--ss-ink-soft);
    font-size: 0.92rem;
}

.wy-breadcrumbs li.wy-breadcrumbs-aside {
    margin-left: auto;
}

.rst-content p,
.rst-content ul,
.rst-content ol,
.rst-content dl {
    margin-bottom: 0.95rem;
}

.rst-content li {
    margin-bottom: 0.2rem;
}

.rst-content ul li::marker,
.rst-content ol li::marker {
    color: #60758a;
}

.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4 {
    color: var(--ss-ink);
    letter-spacing: -0.01em;
}

.rst-content h1 {
    margin-bottom: 0.65rem;
    font-size: 2.05rem;
    line-height: 1.18;
    font-weight: 700;
}

.rst-content h2 {
    margin-top: 2.15rem;
    padding-top: 0.2rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--ss-border);
    font-size: 1.34rem;
    font-weight: 650;
}

.rst-content h3 {
    margin-top: 1.7rem;
    color: #173a5b;
    font-size: 1.08rem;
}

.rst-content h4 {
    margin-top: 1.25rem;
    color: #2b4a67;
    font-size: 1rem;
}

.rst-content h1 + p,
.rst-content h2 + p,
.rst-content h3 + p {
    margin-top: 0.55rem;
}

.rst-content a {
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.12em;
}

.rst-content a:hover {
    color: #284f74;
}

.rst-content p a,
.rst-content li a,
.rst-content td a {
    font-weight: 500;
}

.rst-content strong {
    color: #17314d;
}

.rst-content code.literal,
.rst-content tt.literal {
    padding: 0.12rem 0.38rem;
    color: #183754;
    background: #f5f7fa;
    border: 1px solid #dde6ef;
    border-radius: 4px;
}

.rst-content kbd {
    padding: 0.12rem 0.38rem;
    background: #f7f9fc;
    border: 1px solid #d7e0ea;
    border-radius: 4px;
}

.rst-content div[class^="highlight"],
.rst-content pre.literal-block {
    margin: 0.95rem 0 1.15rem;
    border: 1px solid #dfe6ee;
    border-radius: 6px;
    box-shadow: none;
    overflow: hidden;
    background: #fafbfd;
}

.rst-content .highlight-bash,
.rst-content .highlight-shell {
    border-left: 3px solid #5f7d99;
}

.rst-content .highlight-text {
    border-left: 3px solid #8b9aad;
    background: #fbfcfd;
}

.rst-content .highlight-yaml {
    border-left: 3px solid #6a8299;
}

.rst-content div[class^="highlight"] pre,
.rst-content pre,
.rst-content pre.literal-block {
    border-radius: 6px;
    font-size: 0.92rem;
    line-height: 1.62;
}

.rst-content .admonition,
.rst-content .note,
.rst-content .important,
.rst-content .warning,
.rst-content .tip,
.rst-content .hint {
    margin: 1.2rem 0 1.35rem;
    border: 1px solid var(--ss-border);
    border-left: 3px solid #5d7fa1;
    border-radius: 4px;
    box-shadow: none;
    background: #fbfcfe;
}

.rst-content .admonition-title,
.rst-content .note .admonition-title,
.rst-content .important .admonition-title,
.rst-content .warning .admonition-title,
.rst-content .tip .admonition-title,
.rst-content .hint .admonition-title {
    margin: 0 0 0.55rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ss-ink);
}

.rst-content .important {
    border-left-color: #254f78;
}

.rst-content .warning {
    border-left-color: #b06f2f;
}

.rst-content .tip,
.rst-content .hint {
    border-left-color: #3b7f6f;
}

.rst-content table.docutils {
    width: 100%;
    border: 1px solid #dfe6ee;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: none;
    background: #fff;
}

.rst-content table.docutils th,
.rst-content table.docutils td {
    padding: 0.72rem 0.9rem;
    vertical-align: top;
    line-height: 1.58;
}

.rst-content table.docutils td p:last-child,
.rst-content table.docutils th p:last-child {
    margin-bottom: 0;
}

.rst-content table.docutils thead th,
.rst-content table.docutils tr:first-child th {
    background: #f3f6f9;
    color: var(--ss-ink);
}

.rst-content table.docutils tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.rst-content table.docutils caption,
.rst-content table.docutils + p.caption {
    color: var(--ss-ink-faint);
    font-size: 0.9rem;
}

.rst-content figure {
    margin: 1.35rem 0 1.6rem;
    text-align: center;
}

.rst-content .figure img,
.rst-content img {
    border-radius: 4px;
    box-shadow: none;
    border: 1px solid #e0e7ef;
    background: #fff;
}

.rst-content .figure .caption,
.rst-content figcaption,
.rst-content .figure p.caption {
    margin-top: 0.55rem;
    color: var(--ss-ink-soft);
    font-size: 0.9rem;
    line-height: 1.55;
    text-align: left;
    max-width: 88%;
    margin-left: auto;
    margin-right: auto;
}

.rst-content hr.docutils {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--ss-border);
}

.rst-content blockquote {
    margin: 1rem 0 1.25rem;
    padding-left: 1rem;
    border-left: 3px solid #c7d5e2;
    color: var(--ss-ink-soft);
}

.rst-content .toctree-wrapper > p.caption {
    margin-top: 1.4rem;
    margin-bottom: 0.55rem;
    color: var(--ss-ink);
    font-weight: 700;
    letter-spacing: 0.015em;
    font-size: 0.95rem;
}

.rst-content .toctree-wrapper.compound > ul,
.rst-content .toctree-wrapper > ul {
    margin: 0.9rem 0 1.4rem;
    padding: 0;
    list-style: none;
}

.rst-content .toctree-wrapper.compound > ul > li,
.rst-content .toctree-wrapper > ul > li {
    margin: 0 0 0.7rem;
    padding: 0.82rem 0.92rem;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    border: 1px solid #e0e7ef;
    border-radius: 6px;
    box-shadow: none;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.rst-content .toctree-wrapper.compound > ul > li:hover,
.rst-content .toctree-wrapper > ul > li:hover {
    transform: none;
    background: #fbfdff;
    border-color: #cfd9e4;
    box-shadow: none;
}

.rst-content .toctree-wrapper.compound > ul > li > a,
.rst-content .toctree-wrapper > ul > li > a {
    display: inline-block;
    font-weight: 600;
    color: var(--ss-ink);
    text-decoration: none;
    line-height: 1.45;
}

.rst-content .toctree-wrapper.compound > ul > li ul,
.rst-content .toctree-wrapper > ul > li ul {
    margin-top: 0.55rem;
    margin-bottom: 0;
}

.rst-content .toctree-wrapper.compound > ul > li li,
.rst-content .toctree-wrapper > ul > li li {
    margin-bottom: 0.25rem;
}

.rst-content .toctree-wrapper.compound > ul > li li a,
.rst-content .toctree-wrapper > ul > li li a {
    color: var(--ss-ink-soft);
    font-weight: 500;
}

.rst-content .section > ul:first-of-type li,
.rst-content .section > ol:first-of-type li {
    padding-left: 0.05rem;
}

.rst-footer-buttons {
    margin-top: 1.8rem;
}

.rst-footer-buttons .btn {
    min-width: 8.5rem;
    text-align: center;
}

.btn,
.btn-neutral {
    border-radius: 4px;
    border: 1px solid #d8e1eb;
    box-shadow: none;
}

.btn-neutral:hover {
    background: #f4f8fb;
}

.rst-content .section > h2:first-child,
.rst-content .section > h3:first-child {
    margin-top: 1.8rem;
}

@media print {
    .wy-nav-side,
    .wy-nav-top,
    .wy-breadcrumbs,
    .rst-footer-buttons,
    .wy-side-nav-search,
    .wy-breadcrumbs-aside {
        display: none !important;
    }

    .wy-nav-content-wrap,
    .wy-body-for-nav,
    .wy-nav-content {
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .rst-content {
        font-size: 10.5pt;
        line-height: 1.55;
    }

    .rst-content a {
        color: #000;
        text-decoration: none;
    }

    .rst-content img,
    .rst-content .figure img,
    .rst-content table.docutils,
    .rst-content div[class^="highlight"],
    .rst-content .admonition {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .rst-content h1,
    .rst-content h2,
    .rst-content h3 {
        break-after: avoid;
        page-break-after: avoid;
    }
}

@media screen and (max-width: 768px) {
    .wy-side-nav-search {
        padding: 0.95rem 0.85rem 0.85rem;
    }

    .wy-side-nav-search > a.icon-home,
    .wy-side-nav-search .wy-dropdown > a.icon-home {
        margin-bottom: 0.75rem;
    }

    .wy-side-nav-search > a.icon-home img.logo,
    .wy-side-nav-search .wy-dropdown > a.icon-home img.logo {
        width: min(100%, 210px);
        max-width: 84%;
        padding: 0.28rem 0.34rem;
        border-radius: 8px;
    }

    .wy-nav-content {
        margin-top: 0;
        margin-bottom: 0;
        padding: 1.3rem 1.15rem 1.55rem;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .rst-content h1 {
        font-size: 1.72rem;
    }

    .rst-content .figure .caption,
    .rst-content figcaption,
    .rst-content .figure p.caption {
        max-width: 100%;
    }
}
