:root {
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
    color: #1f2937;
    background: #ffffff;
}

.skip-link {
    position: absolute;
    left: 0.5rem;
    top: -9999px;
    background: #0b1f44;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0.5rem;
}

.site-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #d1d5db;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-header a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.mobile-nav-open,
.mobile-nav-close {
    display: none;
    border: 1px solid #cbd5e1;
    border-radius: 0.4rem;
    background: #ffffff;
    color: #0f172a;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-nav-backdrop {
    display: none;
}

.page-layout {
    max-width: 88rem;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    display: grid;
    grid-template-columns: minmax(17rem, 22.5rem) minmax(0, 1fr);
    gap: 1.75rem;
}

.site-sidebar nav {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.85rem;
    background: #ffffff;
}

.site-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-sidebar ul ul {
    margin-top: 0.25rem;
    margin-left: 0.35rem;
    padding-left: 0.5rem;
    border-left: 1px solid #e7ebf0;
}

.site-sidebar li + li {
    margin-top: 0.22rem;
}

.site-sidebar nav > ul > li + li {
    margin-top: 0.55rem;
}

.site-sidebar .nav-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 0.25rem;
    min-height: 1.9rem;
    padding-right: 0.15rem;
}

.site-sidebar .nav-toggle {
    width: 1.4rem;
    height: 1.4rem;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.site-sidebar .nav-toggle:hover {
    background: #f1f5f9;
}

.site-sidebar .nav-chevron {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease-in-out;
}

.site-sidebar .has-children.is-open > .nav-row .nav-chevron {
    transform: rotate(45deg);
}

.site-sidebar a {
    display: block;
    color: #0f172a;
    text-decoration: none;
    border-left: 3px solid transparent;
    padding: 0.3rem 0.55rem;
    border-radius: 0.25rem;
    line-height: 1.35;
}

.site-sidebar li:not(.has-children) > a {
    padding-left: 2.2rem;
}

.site-sidebar .has-children > .nav-row > a,
.site-sidebar .has-children > .nav-row > .nav-group {
    color: #1e293b;
    font-weight: 600;
}

.site-sidebar .has-children > .nav-row:hover {
    background: #f8fafc;
}

.site-sidebar a[aria-current="page"] {
    border-left-color: #2563eb;
    background: #eff6ff;
    color: #0b3a8f;
    font-weight: 700;
}

.site-sidebar .is-current-path > .nav-row > a,
.site-sidebar .is-current-path > .nav-row > .nav-group {
    background: #f8fafc;
    color: #0f172a;
}

.site-sidebar .is-current-path > .nav-row {
    box-shadow: inset 2px 0 0 #94a3b8;
}

.site-sidebar .nav-group {
    display: block;
    color: #334155;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

.site-sidebar nav.is-js .has-children > ul[hidden] {
    display: none;
}

.content {
    min-width: 0;
    padding-right: 0.25rem;
}

.content > :is(h1, h2, h3, h4, h5, h6),
.content > :is(p, ul, ol, blockquote) {
    max-width: 78ch;
}

.content h1 {
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
}

.content h2 {
    line-height: 1.25;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content :is(h3, h4, h5, h6) {
    line-height: 1.3;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.content p {
    margin: 0.8rem 0;
}

.content a {
    color: #1d4ed8;
}

.content ul,
.content ol {
    padding-left: 1.35rem;
    margin: 0.85rem 0 1rem;
}

.content li + li {
    margin-top: 0.22rem;
}

.content blockquote {
    margin: 1rem 0 1.15rem;
    padding: 0.65rem 0.95rem;
    border-left: 4px solid #c7d2df;
    color: #334155;
    background: #f7f9fc;
}

.content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #111827;
    padding: 0.08rem 0.3rem;
    border-radius: 0.2rem;
}

.content pre {
    overflow-x: auto;
    background: #111827;
    color: #f9fafb;
    margin: 1rem 0 1.2rem;
    padding: 1rem;
    border-radius: 0.55rem;
}

.content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0 1.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.content hr {
    border: 0;
    border-top: 1px solid #d1d5db;
    margin: 1.75rem 0;
}

.content table {
    border-collapse: collapse;
    display: block;
    width: 100%;
    max-width: min(100%, 95ch);
    overflow-x: auto;
    margin: 1rem 0 1.2rem;
}

.content th,
.content td {
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.65rem;
    text-align: left;
}

.content th {
    background: #f8fafc;
    font-weight: 600;
}

a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (max-width: 860px) {
    body.nav-drawer-open {
        overflow: hidden;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 30;
        padding: 0.75rem 0.85rem;
    }

    .mobile-nav-open {
        width: 2.5rem;
        height: 2.5rem;
        display: inline-flex;
        font-size: 1.35rem;
        line-height: 1;
        flex-shrink: 0;
    }

    .site-header > a {
        min-width: 0;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        z-index: 40;
    }

    .mobile-nav-backdrop[hidden] {
        display: none;
    }

    .page-layout {
        grid-template-columns: 1fr;
        padding: 0.75rem 0.75rem 1.5rem;
        gap: 1rem;
    }

    .site-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 22rem);
        max-width: 100%;
        padding: 0.75rem;
        overflow-y: auto;
        background: #ffffff;
        z-index: 50;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

    .site-sidebar.is-drawer-open {
        transform: translateX(0);
    }

    .mobile-nav-close {
        width: 2.25rem;
        height: 2.25rem;
        display: inline-flex;
        margin: 0 0 0.5rem auto;
        font-size: 1.55rem;
        line-height: 1;
    }

    .site-sidebar nav {
        padding: 0.7rem;
    }

    .site-sidebar .nav-row {
        min-height: 2.5rem;
    }

    .site-sidebar .nav-toggle {
        width: 2.1rem;
        height: 2.1rem;
    }

    .site-sidebar a,
    .site-sidebar .nav-group {
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .site-sidebar li + li {
        margin-top: 0.3rem;
    }

    .content {
        padding-right: 0;
    }

    .content > :is(h1, h2, h3, h4, h5, h6),
    .content > :is(p, ul, ol, blockquote) {
        max-width: 100%;
    }

    .content h1 {
        font-size: clamp(1.6rem, 5.8vw, 2rem);
        line-height: 1.22;
    }

    .content p,
    .content li {
        line-height: 1.6;
    }

    .content img {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
}
