.docs-page {
    padding-top: calc(var(--header-h) + 3rem);
    padding-bottom: 6rem;
}

.docs-layout {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    border: 1px solid var(--line);
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
}

.docs-sidebar__label {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 1rem;
    display: block;
}

.docs-toc {
    list-style: none;
}

.docs-toc li {
    margin-bottom: 0.15rem;
}

.docs-toc a {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    text-decoration: none;
    padding: 0.4rem 0.5rem;
    border-left: 2px solid transparent;
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.docs-toc a:hover,
.docs-toc a.is-active {
    color: var(--text);
    border-left-color: var(--primary);
    background: rgba(255, 77, 109, 0.06);
}

.docs-toc__sub a {
    padding-left: 1rem;
    font-size: 0.72rem;
}

.docs-toc__sub {
    margin-bottom: 0.15rem;
}

.docs-toc__group {
    margin: 1rem 0 0.35rem;
    padding: 0 0 0 0.75rem;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
    list-style: none;
    pointer-events: none;
}

.docs-toc__group:first-child {
    margin-top: 0;
}

.docs-toc--compact a {
    padding: 0.32rem 0.5rem;
    font-size: 0.74rem;
}

.docs-sidebar__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.docs-lang-switch {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.docs-lang-btn {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    padding: 0.28rem 0.45rem;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--faint);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.docs-lang-btn:hover,
.docs-lang-btn.is-active {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.05);
}

html[dir='rtl'] .docs-layout {
    direction: rtl;
}

html[dir='rtl'] .docs-toc a {
    border-left: none;
    border-right: 2px solid transparent;
}

html[dir='rtl'] .docs-toc a:hover,
html[dir='rtl'] .docs-toc a.is-active {
    border-right-color: var(--primary);
}

html[dir='rtl'] .docs-toc__sub a {
    padding-right: 1rem;
    padding-left: 0.5rem;
}

.scan-hub-hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.docs-main {
    min-width: 0;
}

.docs-hero {
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--line);
}

.docs-hero__lead {
    max-width: 40rem;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 0.75rem;
}

.docs-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.docs-tag {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--line);
    color: var(--muted);
}

.docs-section {
    margin-bottom: 4rem;
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.docs-section.reveal:target,
.docs-section.reveal:has(:target) {
    opacity: 1;
    transform: translateY(0);
}

.docs-provider,
.docs-method-card {
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.docs-section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem) !important;
    margin-bottom: 1rem !important;
}

.docs-section h3 {
    font-size: 1.05rem !important;
    font-weight: 400 !important;
    margin: 2rem 0 0.75rem !important;
    color: var(--text) !important;
}

.docs-section p,
.docs-section li {
    color: var(--muted);
    line-height: 1.75;
    font-size: 0.92rem;
    font-weight: 300;
}

.docs-section ul,
.docs-section ol {
    margin: 0.75rem 0 1.25rem 1.25rem;
}

.docs-section li {
    margin-bottom: 0.4rem;
}

.docs-section code,
.docs-artifact code {
    font-family: ui-monospace, monospace;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1em 0.35em;
}

.docs-callout {
    border: 1px solid var(--line);
    border-left: 3px solid var(--primary);
    padding: 1.15rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(255, 77, 109, 0.04);
}

.docs-callout strong {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.docs-callout p {
    margin: 0;
}

.docs-diagram {
    border: 1px solid var(--line);
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--muted);
    background: #050505;
}

.docs-diagram .hl {
    color: var(--primary);
}

.docs-diagram .ok {
    color: #3dd68c;
}

.docs-steps {
    display: grid;
    gap: 1px;
    background: var(--line);
    margin: 1.5rem 0;
}

.docs-step {
    background: var(--bg);
    padding: 1.25rem 1.35rem;
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 1rem;
    align-items: start;
}

.docs-step__num {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--faint);
    padding-top: 0.15rem;
}

.docs-step h4 {
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    margin: 0 0 0.35rem !important;
    color: var(--text) !important;
}

.docs-step p {
    margin: 0;
    font-size: 0.85rem;
}

.docs-code {
    position: relative;
    margin: 1.25rem 0;
    border: 1px solid var(--line);
    background: #050505;
}

.docs-code__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
}

.docs-code__copy {
    font-family: var(--font);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.docs-code__copy:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.3);
}

.docs-code pre {
    margin: 0;
    padding: 1rem 1.1rem;
    overflow-x: auto;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}

.docs-code .cm { color: var(--faint); }
.docs-code .kw { color: #ff8fab; }
.docs-code .ty { color: #7eb8ff; }
.docs-code .str { color: #9be7a8; }

.docs-table-wrap {
    overflow-x: auto;
    margin: 1.25rem 0;
    border: 1px solid var(--line);
}

.docs-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.docs-table th,
.docs-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-weight: 300;
}

.docs-table th {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
    background: rgba(255, 255, 255, 0.02);
}

.docs-table td:first-child {
    color: var(--text);
}

.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.docs-card {
    border: 1px solid var(--line);
    padding: 1.25rem;
}

.docs-card__icon {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.docs-card h4 {
    font-size: 0.95rem !important;
    margin: 0 0 0.5rem !important;
    font-weight: 400 !important;
}

.docs-card p {
    margin: 0;
    font-size: 0.8rem;
}

.docs-disclaimer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: var(--faint);
    line-height: 1.6;
}

.docs-layer-badge {
    display: inline-block;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    margin-bottom: 0.65rem;
    border: 1px solid;
}

.docs-layer-badge--um {
    color: #7eb8ff;
    border-color: rgba(126, 184, 255, 0.45);
    background: rgba(126, 184, 255, 0.08);
}

.docs-layer-badge--k {
    color: #3dd68c;
    border-color: rgba(61, 214, 140, 0.45);
    background: rgba(61, 214, 140, 0.08);
}

.docs-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    margin: 1.5rem 0;
}

.docs-split__col {
    background: var(--bg);
    padding: 1.35rem;
}

.docs-split__col h4 {
    font-size: 0.95rem !important;
    margin: 0 0 0.75rem !important;
    font-weight: 400 !important;
}

.docs-split__col ul {
    margin: 0;
    padding-left: 1.1rem;
}

.docs-split__col li {
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.docs-artifact {
    border: 1px solid var(--line);
    margin: 2rem 0;
    overflow: hidden;
}

.docs-artifact__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.docs-artifact__head h3 {
    margin: 0 !important;
    font-size: 1.1rem !important;
}

.docs-artifact__body {
    padding: 1.25rem;
}

.docs-artifact__body > p:first-child {
    margin-top: 0;
}

.docs-flow-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 1.25rem 0;
    font-size: 0.72rem;
    color: var(--faint);
}

.docs-flow-chain span {
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--line);
    color: var(--muted);
}

.docs-flow-chain i {
    color: var(--primary);
    font-size: 0.6rem;
}

@media (max-width: 768px) {
    .docs-split {
        grid-template-columns: 1fr;
    }
}

.docs-provider {
    --provider-accent: var(--primary);
    border: 1px solid var(--line);
    margin: 2.5rem 0;
    overflow: hidden;
}

.docs-provider__head {
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    border-left: 3px solid var(--provider-accent);
}

.docs-provider__head-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.docs-provider__head h3 {
    margin: 0 !important;
    font-size: 1.2rem !important;
}

.docs-provider__link {
    font-size: 0.72rem;
    color: var(--provider-accent);
    text-decoration: none;
}

.docs-provider__link:hover {
    text-decoration: underline;
}

.docs-provider__scan-focus {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}

.docs-provider__body {
    padding: 1.25rem 1.35rem;
}

.docs-provider__hunt {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 0 1.25rem;
}

.docs-provider__hunt span {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--line);
    color: var(--faint);
}

.docs-provider--echo { --provider-accent: #5ce1e6; }
.docs-provider--detect { --provider-accent: #6b9fff; }
.docs-provider--napse { --provider-accent: #b388ff; }
.docs-provider--anticheat { --provider-accent: #ffab40; }
.docs-provider--nexora { --provider-accent: #69f0ae; }

.docs-status-overview {
    margin: 1.5rem 0 2.5rem;
    border: 1px solid var(--line);
    overflow-x: auto;
}

.docs-status-overview table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.docs-status-overview th,
.docs-status-overview td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-weight: 300;
}

.docs-status-overview th {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
}

.docs-status-overview a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.docs-status-overview a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.docs-method-catalog-block {
    margin-top: 2rem;
}

.docs-method-catalog-block__title {
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0 0 0.35rem;
}

.docs-method-catalog-block__lead {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 1rem;
}

.docs-method-card-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.docs-method-card {
    border: 1px solid var(--line);
    padding: 1rem 1.1rem;
    background: rgba(0, 0, 0, 0.12);
}

.docs-method-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.docs-method-card__head h4 {
    font-size: 0.88rem;
    font-weight: 400;
    margin: 0;
}

.docs-method-card__detect {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 0.75rem;
}

.docs-method-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.docs-method-card__grid p {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0.35rem 0 0;
}

.docs-method-card__meta {
    font-size: 0.68rem;
    color: var(--faint);
    margin: 0.65rem 0 0;
}

.docs-method-index {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.72rem;
}

.docs-method-index li { margin: 0.15rem 0; }

.docs-method-index a {
    color: var(--muted);
    text-decoration: none;
}

.docs-method-index a:hover { color: var(--primary); }

.docs-artifact-methods {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--line);
}

.docs-artifact-methods h4 {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 400;
    margin: 0 0 0.65rem;
}

.docs-table--methods td code {
    font-size: 0.65rem;
    word-break: break-all;
}

.docs-muted {
    display: block;
    font-size: 0.68rem;
    color: var(--faint);
    margin-top: 0.2rem;
}

.docs-page :is(.docs-table-wrap, .docs-status-overview, .docs-code pre) {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.04);
}

.docs-page :is(.docs-table-wrap, .docs-status-overview, .docs-code pre)::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.docs-page :is(.docs-table-wrap, .docs-status-overview, .docs-code pre)::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

.docs-page :is(.docs-table-wrap, .docs-status-overview, .docs-code pre)::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 6px;
}

.docs-page :is(.docs-table-wrap, .docs-status-overview, .docs-code pre)::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.docs-page :is(.docs-table-wrap, .docs-status-overview, .docs-code pre)::-webkit-scrollbar-button {
    display: none;
}

@media (max-width: 900px) {
    .docs-method-card__grid {
        grid-template-columns: 1fr;
    }

    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
    }

    .docs-toc {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .docs-toc li {
        margin: 0;
    }

    .docs-toc a {
        border-left: none;
        border: 1px solid var(--line);
        padding: 0.35rem 0.65rem;
    }

    .docs-toc a.is-active {
        border-color: var(--primary);
    }
}
