:root {
    --api-docs-sidebar-w: 280px;
    --api-docs-header-h: 56px;
    --api-docs-ink: #0b0f0c;
    --api-docs-accent: #0b0f0c;
    --api-docs-acid: #c4d900;
    --api-docs-acid-soft: rgba(232, 255, 61, 0.22);
    --api-docs-accent-soft: rgba(11, 15, 12, 0.06);
    --api-docs-border: #e4e6e2;
    --api-docs-text: #0b0f0c;
    --api-docs-muted: #6b7268;
    --api-docs-code-bg: #121812;
    --api-docs-sidebar-bg: #f7f6f1;
    --api-docs-paper: #fffef9;
}

.api-docs-body {
    margin: 0;
    font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
    color: var(--api-docs-text);
    background: var(--api-docs-paper);
}

.api-docs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--api-docs-header-h);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--api-docs-border);
    background: #fff;
}

.api-docs-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--api-docs-text);
    font-weight: 600;
}

.api-docs-header__brand img {
    height: 32px;
    width: 32px;
    border-radius: 8px;
}

.api-docs-header__muted {
    font-weight: 400;
    color: var(--api-docs-muted);
}

.api-docs-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-docs-layout {
    display: flex;
    padding-top: var(--api-docs-header-h);
    min-height: 100vh;
}

.api-docs-sidebar {
    position: fixed;
    top: var(--api-docs-header-h);
    left: 0;
    width: var(--api-docs-sidebar-w);
    height: calc(100vh - var(--api-docs-header-h));
    overflow-y: auto;
    border-right: 1px solid var(--api-docs-border);
    background: var(--api-docs-sidebar-bg);
    padding: 1.25rem 0;
}

.api-docs-sidebar__group-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--api-docs-muted);
    padding: 0.75rem 1.25rem 0.35rem;
}

.api-docs-sidebar__link {
    display: block;
    padding: 0.45rem 1.25rem;
    font-size: 0.875rem;
    color: var(--api-docs-text);
    text-decoration: none;
    border-left: 3px solid transparent;
}

.api-docs-sidebar__link:hover {
    background: var(--api-docs-acid-soft);
    color: var(--api-docs-ink);
}

.api-docs-sidebar__link.is-active {
    border-left-color: var(--api-docs-ink);
    background: var(--api-docs-acid-soft);
    color: var(--api-docs-ink);
    font-weight: 600;
}

.api-docs-main {
    flex: 1;
    margin-left: var(--api-docs-sidebar-w);
    padding: 2rem 2.5rem 4rem;
    max-width: 920px;
    min-width: 0;
    overflow-x: hidden;
}

.api-docs-breadcrumb {
    font-size: 0.8rem;
    color: var(--api-docs-muted);
    margin-bottom: 1rem;
}

.api-docs-breadcrumb a {
    color: var(--api-docs-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.api-docs-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.api-docs-lead {
    color: var(--api-docs-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.api-docs-lead a {
    color: var(--api-docs-ink);
}

.api-docs-muted {
    color: var(--api-docs-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.api-docs-endpoint-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.api-docs-method {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.api-docs-method--get {
    background: #e8fff3;
    color: #0d6832;
}

.api-docs-method--post {
    background: var(--api-docs-acid-soft);
    color: #5a6200;
}

.api-docs-method--put,
.api-docs-method--patch {
    background: #f1faff;
    color: #1b84ff;
}

.api-docs-method--delete {
    background: #fff5f8;
    color: #d9214e;
}

.api-docs-url {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    background: #f5f8fa;
    border: 1px solid var(--api-docs-border);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.api-docs-section {
    margin-bottom: 2.5rem;
}

.api-docs-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--api-docs-border);
}

.api-docs-subhead {
    font-size: 0.8rem;
    font-weight: 700;
    color: #3d433c;
    margin: 1rem 0 0.5rem;
}

.api-docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.api-docs-table th,
.api-docs-table td {
    border: 1px solid var(--api-docs-border);
    padding: 0.65rem 0.85rem;
    text-align: left;
    vertical-align: top;
}

.api-docs-table th {
    background: #f5f8fa;
    font-weight: 600;
}

.api-docs-table code {
    font-size: 0.8rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.api-docs-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.api-docs-badge--required {
    background: #fff5f8;
    color: #d9214e;
}

.api-docs-badge--optional {
    background: #f5f8fa;
    color: var(--api-docs-muted);
}

.api-docs-badge--ok {
    background: #e8fff3;
    color: #0d6832;
}

.api-docs-code-tabs {
    border: 1px solid var(--api-docs-border);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.api-docs-code-tabs__nav {
    display: flex;
    gap: 0;
    background: #f5f8fa;
    border-bottom: 1px solid var(--api-docs-border);
    overflow-x: auto;
}

.api-docs-code-tabs__btn {
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--api-docs-muted);
    cursor: pointer;
    white-space: nowrap;
}

.api-docs-code-tabs__btn.is-active {
    color: var(--api-docs-ink);
    background: #fff;
    box-shadow: inset 0 -2px 0 var(--api-docs-acid);
}

.api-docs-code-tabs__panel {
    display: none;
    position: relative;
}

.api-docs-code-tabs__panel.is-active {
    display: block;
}

.api-docs-code-tabs__panel pre {
    margin: 0;
    padding: 1rem 1.25rem;
    background: var(--api-docs-code-bg);
    color: #e9ecef;
    font-size: 0.78rem;
    line-height: 1.5;
    overflow-x: auto;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.api-docs-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border-radius: 0.25rem;
    cursor: pointer;
    font-family: inherit;
}

.api-docs-json-block {
    position: relative;
    max-width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--api-docs-border);
    box-sizing: border-box;
}

.api-docs-json-block pre {
    margin: 0;
    padding: 2.25rem 1.25rem 1rem;
    font-size: 0.78rem;
    line-height: 1.55;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    background: var(--api-docs-code-bg);
    color: #e9ecef;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.api-docs-json-block pre code {
    display: block;
    color: inherit;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    padding: 0;
    border: none;
}

.api-docs-json-block .api-docs-copy-btn {
    z-index: 2;
}

.api-docs-response--ok pre,
.api-docs-response--ok pre code {
    background: #0f2419;
    color: #c8e6c9;
}

.api-docs-response--err pre,
.api-docs-response--err pre code {
    background: #2a1518;
    color: #f5c2c7;
}

.api-docs-callout {
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.api-docs-callout--info {
    background: var(--api-docs-acid-soft);
    border: 1px dashed #9aa80a;
    color: var(--api-docs-text);
}

.api-docs-callout a {
    color: var(--api-docs-ink);
    font-weight: 600;
}

.api-docs-callout code {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.82rem;
}

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

.api-docs-card {
    border: 1px solid var(--api-docs-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.api-docs-card:hover {
    border-color: #9aa80a;
    box-shadow: 0 4px 16px rgba(11, 15, 12, 0.08);
}

.api-docs-card h3 {
    font-size: 1rem;
    margin: 0.5rem 0 0.35rem;
}

.api-docs-card p {
    font-size: 0.8rem;
    color: var(--api-docs-muted);
    margin: 0;
}

.api-docs-event-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.api-docs-event-list code {
    font-size: 0.75rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    background: #f5f8fa;
    border: 1px solid var(--api-docs-border);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.api-docs-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-3 { margin-top: 0.75rem; }
.me-1 { margin-right: 0.25rem; }

.api-docs-header .btn.api-docs-sidebar-toggle {
    display: none;
}

.api-docs-header .btn,
.api-docs-main .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
}

.api-docs-header .btn-light,
.api-docs-main .btn-light {
    background: #f5f8fa;
    border-color: var(--api-docs-border);
    color: var(--api-docs-text);
}

.api-docs-header .btn-light-primary {
    background: var(--api-docs-acid);
    border-color: var(--api-docs-acid);
    color: var(--api-docs-ink);
}

.api-docs-main .btn-primary {
    background: var(--api-docs-ink);
    border-color: var(--api-docs-ink);
    color: #fff;
}

@media (max-width: 991px) {
    .api-docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s;
        z-index: 100;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    }

    .api-docs-sidebar.is-open {
        transform: translateX(0);
    }

    body.api-docs-sidebar-open::before {
        content: '';
        position: fixed;
        inset: var(--api-docs-header-h) 0 0 0;
        background: rgba(11, 15, 12, 0.35);
        z-index: 95;
    }

    .api-docs-main {
        margin-left: 0;
        padding: 1.25rem 1rem 3rem;
    }

    .api-docs-header .btn.api-docs-sidebar-toggle {
        display: inline-flex;
    }
}
