#docsPage {
    background: #f6f7f4;
    color: #14171a;
    min-height: calc(100vh - 80px);
}

#docsPage * { box-sizing: border-box; }

.dx-shell {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 240px;
    gap: 48px;
    padding: 32px 32px 80px;
    align-items: start;
}

.dx-side {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    padding-right: 8px;
    font-size: 0.94em;
}

.dx-side::-webkit-scrollbar { width: 6px; }
.dx-side::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

.dx-brand {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(20,23,26,0.08);
}
.dx-brand-name {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #14171a;
}
.dx-brand-tag {
    color: #5e6670;
    font-size: 0.72em;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 4px;
}

.dx-nav-section { margin-bottom: 22px; }
.dx-nav-label {
    color: #1f8ce0;
    font-size: 0.74em;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0 12px;
    margin-bottom: 8px;
}
.dx-nav-label::before { content: "- "; color: rgba(31,140,224,0.6); }

.dx-nav-item {
    display: block;
    color: #14171a;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 6px;
    line-height: 1.35;
    transition: background 0.12s, color 0.12s;
}
.dx-nav-item:hover { background: rgba(20,23,26,0.04); }
.dx-nav-item.active {
    background: #fff;
    color: #1f8ce0;
    font-weight: 600;
    box-shadow: inset 2px 0 0 #1f8ce0;
}

.dx-content {
    min-width: 0;
    background: transparent;
    padding-top: 4px;
    max-width: 760px;
}

.dx-breadcrumb {
    color: #1f8ce0;
    font-size: 0.92em;
    margin-bottom: 18px;
}
.dx-breadcrumb a { color: inherit; text-decoration: none; }
.dx-breadcrumb a:hover { text-decoration: underline; }
.dx-breadcrumb .sep { color: #5e6670; margin: 0 6px; }
.dx-breadcrumb .leaf { color: #14171a; }

.dx-content h1 {
    font-size: clamp(2.1em, 4vw, 2.6em);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
    color: #14171a;
}

.dx-lead {
    color: #475059;
    font-size: 1.08em;
    line-height: 1.55;
    margin: 0 0 28px;
}

.dx-rule {
    border: none;
    border-top: 2px solid #1f8ce0;
    width: 84px;
    margin: 0 0 36px;
    opacity: 0.85;
}

.dx-content h2 {
    font-size: 1.55em;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 56px 0 16px;
    color: #14171a;
    border-left: 5px solid #1f8ce0;
    padding-left: 14px;
    line-height: 1.2;
}

.dx-content h3 {
    font-size: 1.18em;
    font-weight: 700;
    margin: 36px 0 12px;
    color: #14171a;
    letter-spacing: -0.01em;
}

.dx-content h4 {
    font-size: 1.02em;
    font-weight: 700;
    margin: 24px 0 8px;
    color: #14171a;
}

.dx-content p {
    color: #2a3138;
    line-height: 1.7;
    margin: 0 0 18px;
    font-size: 1.0em;
}

.dx-content a {
    color: #1f8ce0;
    text-decoration: none;
    border-bottom: 1px solid rgba(31,140,224,0.3);
}
.dx-content a:hover { border-bottom-color: #1f8ce0; }

.dx-content strong { color: #14171a; font-weight: 700; }
.dx-content em { font-style: italic; color: #2a3138; }

.dx-content ul, .dx-content ol {
    color: #2a3138;
    line-height: 1.65;
    margin: 0 0 18px;
    padding-left: 24px;
}
.dx-content li { margin: 6px 0; }
.dx-content li > p { margin: 4px 0; }

.dx-content code {
    background: rgba(31,140,224,0.10);
    color: #14171a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.88em;
}

.dx-content pre {
    background: #0f1115;
    color: #d6dde5;
    padding: 18px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0 0 22px;
    line-height: 1.55;
    font-size: 0.86em;
    border: 1px solid #1c2026;
}
.dx-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.dx-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 22px;
    font-size: 0.92em;
    background: #fff;
    border: 1px solid rgba(20,23,26,0.10);
    border-radius: 8px;
    overflow: hidden;
}
.dx-content th {
    text-align: left;
    background: #f0f3ee;
    padding: 10px 14px;
    font-weight: 600;
    color: #14171a;
    border-bottom: 1px solid rgba(20,23,26,0.08);
}
.dx-content td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(20,23,26,0.05);
    color: #2a3138;
    vertical-align: top;
}
.dx-content tr:last-child td { border-bottom: none; }

.dx-content blockquote {
    margin: 0 0 22px;
    padding: 14px 18px;
    background: rgba(31,140,224,0.05);
    border-left: 3px solid #1f8ce0;
    border-radius: 4px;
    color: #2a3138;
}
.dx-content blockquote p { margin: 0; }
.dx-content blockquote strong { color: #1f8ce0; }

.dx-engineering-note {
    background: #fff;
    border: 1px solid rgba(20,23,26,0.10);
    border-left: 3px solid #14171a;
    border-radius: 6px;
    padding: 16px 18px;
    margin: 0 0 32px;
    font-size: 0.94em;
    line-height: 1.65;
}
.dx-engineering-note p { margin: 6px 0; }
.dx-engineering-note p:first-child { margin-top: 0; }
.dx-engineering-note p:last-child { margin-bottom: 0; }
.dx-engineering-note .label {
    display: inline-block;
    color: #14171a;
    font-weight: 700;
    font-size: 0.92em;
    margin-bottom: 4px;
}

.dx-prevnext {
    display: flex;
    justify-content: space-between;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid rgba(20,23,26,0.08);
    gap: 20px;
}
.dx-pn-card {
    flex: 1;
    background: #fff;
    border: 1px solid rgba(20,23,26,0.08);
    border-radius: 8px;
    padding: 14px 18px;
    text-decoration: none;
    color: #14171a;
    transition: border-color 0.12s, transform 0.12s;
}
.dx-pn-card:hover { border-color: #1f8ce0; transform: translateY(-2px); }
.dx-pn-card .dx-pn-dir {
    color: #5e6670;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.dx-pn-card .dx-pn-title {
    font-weight: 600;
    color: #14171a;
}
.dx-pn-card.next { text-align: right; }

.dx-toc {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    font-size: 0.86em;
    padding-left: 12px;
}
.dx-toc-label {
    color: #5e6670;
    font-size: 0.74em;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.dx-toc a {
    display: block;
    color: #1f8ce0;
    text-decoration: none;
    padding: 4px 0;
    line-height: 1.4;
    border-left: 2px solid transparent;
    padding-left: 10px;
    margin-left: -2px;
    transition: color 0.12s, border-color 0.12s;
}
.dx-toc a:hover { color: #14171a; }
.dx-toc a.active {
    color: #14171a;
    border-left-color: #1f8ce0;
    font-weight: 500;
}
.dx-toc a.h3 { padding-left: 22px; font-size: 0.94em; color: #5e6670; }
.dx-toc a.h3:hover, .dx-toc a.h3.active { color: #14171a; }

.dx-loading, .dx-error {
    padding: 60px 0;
    text-align: center;
    color: #5e6670;
}
.dx-error { color: #d04a3b; }

@media (max-width: 1100px) {
    .dx-shell { grid-template-columns: 240px minmax(0, 1fr); padding-right: 24px; }
    .dx-toc { display: none; }
}
@media (max-width: 760px) {
    .dx-shell { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
    .dx-side { position: static; max-height: none; padding-right: 0; }
    .dx-brand { display: none; }
}

body.dx-active .nav {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(20,23,26,0.08) !important;
    color: #14171a !important;
}
body.dx-active .nav .nav-logo,
body.dx-active .nav .nav-link,
body.dx-active .nav .nav-external,
body.dx-active .nav button { color: #14171a !important; }
body.dx-active .nav .nav-link.active,
body.dx-active .nav .nav-link:hover { color: #1f8ce0 !important; }
body.dx-active .nav .nav-toggle span { background: #14171a !important; }
body.dx-active .theme-toggle svg { stroke: #14171a !important; }
.dx-mobile-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ece9d8;
    border-bottom: 1px solid rgba(10, 10, 10, 0.10);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.dx-mobile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #0a0a0a;
    color: #ece9d8;
    border: none;
    border-radius: 0;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.78em;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    cursor: pointer;
}
.dx-mobile-trigger:hover { background: #1a7878; }
.dx-mobile-current {
    color: #0a0a0a;
    font-size: 0.92em;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.dx-side-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.5);
    z-index: 90;
}
.dx-side-overlay.open { display: block; }

@media (max-width: 1100px) {
    #docsPage .dx-shell {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    #docsPage .dx-mobile-bar {
        display: flex;
    }
    #docsPage .dx-side {
        position: fixed;
        top: 0;
        left: -320px;
        bottom: 0;
        width: 300px;
        max-height: none;
        background: #ece9d8;
        z-index: 100;
        padding: 24px 16px 60px;
        overflow-y: auto;
        transition: left 0.22s ease;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0);
        border-right: 1px solid rgba(10, 10, 10, 0.10);
    }
    #docsPage .dx-side.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    }
    #docsPage .dx-content {
        padding: 24px 18px 60px;
        max-width: 100%;
    }
    #docsPage .dx-toc { display: none !important; }
}

#docsPage .dx-side .dx-side-close {
    display: none;
    background: none;
    border: 1px solid rgba(10, 10, 10, 0.20);
    color: #0a0a0a;
    padding: 6px 10px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.78em;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 16px;
}
@media (max-width: 1100px) {
    #docsPage .dx-side .dx-side-close { display: inline-block; }
}
