:root {
    --api-background: #f5f7fa;
    --api-surface: #ffffff;
    --api-surface-soft: #f8fafc;
    --api-sidebar: #111827;
    --api-sidebar-soft: #1f2937;
    --api-text: #1f2937;
    --api-text-soft: #5f6b7a;
    --api-border: #dfe4ea;
    --api-border-dark: #cbd3dc;
    --api-primary: #8e2424;
    --api-primary-dark: #6f1919;
    --api-primary-soft: #f9eeee;
    --api-success: #166534;
    --api-warning: #92400e;
    --api-warning-bg: #fff7ed;
    --api-warning-border: #fdba74;
    --api-code-background: #101827;
    --api-code-text: #e5edf7;
    --api-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --api-sidebar-width: 300px;
    --api-content-width: 1080px;
    --api-radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.api-docs-body {
    margin: 0;
    background: var(--api-background);
    color: var(--api-text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

body.api-navigation-open {
    overflow: hidden;
}

a {
    color: var(--api-primary);
}

code {
    padding: 0.12rem 0.35rem;
    border: 1px solid #e3e7ec;
    border-radius: 4px;
    background: #f3f5f7;
    color: #8a1f1f;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;
    font-size: 0.9em;
}

.api-skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 10000;
    padding: 10px 16px;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    box-shadow: var(--api-shadow);
}

.api-skip-link:focus {
    top: 16px;
}

.api-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.api-docs-shell {
    min-height: 100vh;
}

.api-sidebar {
    position: fixed;
    z-index: 1000;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--api-sidebar-width);
    overflow-y: auto;
    background: var(--api-sidebar);
    color: #ffffff;
}

.api-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.api-brand {
    display: flex;
    flex-direction: column;
    color: #ffffff;
    text-decoration: none;
}

.api-brand__company {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.1;
}

.api-brand__product {
    margin-top: 4px;
    color: #c7d0dc;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.api-sidebar__close {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

.api-search {
    padding: 18px 18px 12px;
}

.api-search__input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border: 1px solid #3a4657;
    border-radius: 6px;
    outline: none;
    background: var(--api-sidebar-soft);
    color: #ffffff;
    font-size: 14px;
}

.api-search__input::placeholder {
    color: #94a3b8;
}

.api-search__input:focus {
    border-color: #d4a4a4;
    box-shadow: 0 0 0 3px rgba(212, 164, 164, 0.15);
}

.api-search-results {
    display: none;
    margin-top: 8px;
    border: 1px solid #3a4657;
    border-radius: 6px;
    background: var(--api-sidebar-soft);
}

.api-search-results.is-visible {
    display: block;
}

.api-search-result {
    display: block;
    padding: 9px 11px;
    border-bottom: 1px solid #3a4657;
    color: #e5e7eb;
    font-size: 13px;
    text-decoration: none;
}

.api-search-result:last-child {
    border-bottom: 0;
}

.api-search-result:hover,
.api-search-result:focus {
    background: #293548;
    color: #ffffff;
}

.api-search-empty {
    padding: 10px;
    color: #aab4c2;
    font-size: 13px;
}

.api-nav {
    padding: 6px 12px 90px;
    margin: 0;
    list-style: none;
}

.api-nav__item {
    margin: 2px 0 7px;
}

.api-nav__children {
    padding: 4px 0 4px 15px;
    margin: 0;
    list-style: none;
}

.api-nav__link {
    display: block;
    padding: 8px 10px;
    border-radius: 5px;
    color: #d7dde7;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.api-nav__link:hover,
.api-nav__link:focus,
.api-nav__link.is-active {
    background: var(--api-sidebar-soft);
    color: #ffffff;
}

.api-nav__link.is-active {
    box-shadow: inset 3px 0 0 #c96161;
}

.api-nav__link--child {
    padding-top: 6px;
    padding-bottom: 6px;
    color: #9faabc;
    font-size: 13px;
    font-weight: 400;
}

.api-sidebar__footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 15px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: var(--api-sidebar);
    color: #8692a3;
    font-size: 11px;
}

.api-page {
    min-height: 100vh;
    margin-left: var(--api-sidebar-width);
}

.api-mobile-header {
    display: none;
}

.api-main {
    width: 100%;
}

.api-document {
    max-width: var(--api-content-width);
    padding: 48px 58px 90px;
    margin: 0 auto;
    background: var(--api-surface);
    box-shadow: var(--api-shadow);
}

.api-section {
    padding: 26px 0 52px;
    border-bottom: 1px solid var(--api-border);
    scroll-margin-top: 24px;
}

.api-section:last-of-type {
    border-bottom: 0;
}

.api-subsection {
    padding-top: 28px;
    scroll-margin-top: 24px;
}

.api-section-heading {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.api-section-heading__number {
    min-width: 42px;
    padding-top: 8px;
    color: var(--api-primary);
    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;
    font-size: 13px;
    font-weight: 700;
}

.api-section-heading h2 {
    margin: 0;
    color: #111827;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    line-height: 1.2;
}

.api-section-heading p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--api-text-soft);
    font-size: 17px;
}

.api-section h3 {
    margin: 0 0 13px;
    color: #182230;
    font-size: 25px;
    line-height: 1.3;
}

.api-section h4 {
    margin: 28px 0 9px;
    color: #263446;
    font-size: 18px;
}

.api-section p {
    max-width: 850px;
}

.api-hero {
    padding-top: 12px;
}

.api-hero h1 {
    max-width: 800px;
    margin: 8px 0 15px;
    color: #111827;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 52px;
    line-height: 1.08;
}

.api-eyebrow {
    color: var(--api-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.api-lead {
    max-width: 800px;
    margin: 0;
    color: #4b5563;
    font-size: 20px;
    line-height: 1.65;
}

.api-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 25px;
    margin-top: 25px;
    color: #657182;
    font-size: 13px;
}

.api-callout {
    padding: 16px 18px;
    margin: 22px 0;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #64748b;
    border-radius: var(--api-radius);
    background: #f8fafc;
}

.api-callout--warning {
    border-color: var(--api-warning-border);
    border-left-color: #ea580c;
    background: var(--api-warning-bg);
    color: #713f12;
}

.api-step-list {
    padding: 0;
    margin: 18px 0;
    list-style: none;
    counter-reset: api-step;
}

.api-step-list li {
    position: relative;
    min-height: 50px;
    padding: 3px 0 24px 58px;
    counter-increment: api-step;
}

.api-step-list li::before {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--api-primary-soft);
    color: var(--api-primary);
    content: counter(api-step);
    font-weight: 800;
}

.api-requirement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.api-requirement {
    padding: 17px;
    border: 1px solid var(--api-border);
    border-radius: var(--api-radius);
    background: var(--api-surface-soft);
}

.api-requirement__label {
    display: block;
    margin-bottom: 7px;
    color: var(--api-text-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.api-endpoint {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    margin: 17px 0;
    border: 1px solid var(--api-border-dark);
    border-radius: var(--api-radius);
    background: #ffffff;
}

.api-endpoint__method {
    display: flex;
    align-items: center;
    padding: 13px 17px;
    background: var(--api-primary);
    color: #ffffff;
    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;
    font-size: 13px;
    font-weight: 800;
}

.api-endpoint__url {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    overflow-x: auto;
    padding: 13px 17px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #263446;
    white-space: nowrap;
}

.api-copy-button {
    min-width: 67px;
    padding: 7px 12px;
    border: 1px solid #4b596c;
    border-radius: 5px;
    background: transparent;
    color: #dce4ef;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.api-copy-button:hover,
.api-copy-button:focus {
    background: rgba(255, 255, 255, 0.08);
}

.api-copy-button.is-copied {
    border-color: #65a30d;
    color: #bef264;
}

.api-copy-button--endpoint {
    margin: 8px;
    border-color: var(--api-border-dark);
    color: #4b5563;
}

.api-copy-button--endpoint:hover,
.api-copy-button--endpoint:focus {
    background: #f3f4f6;
}

.api-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 17px 0 28px;
    border: 1px solid var(--api-border);
    border-radius: var(--api-radius);
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 14px;
}

.api-table th,
.api-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--api-border);
    text-align: left;
    vertical-align: top;
}

.api-table th {
    background: #f5f7f9;
    color: #4b5665;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.api-table tbody tr:last-child td {
    border-bottom: 0;
}

.api-table tbody tr:hover {
    background: #fafbfc;
}

.api-field-alias {
    margin-top: 6px;
    color: var(--api-text-soft);
    font-size: 11px;
}

.api-type {
    color: #475569;
    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;
    font-size: 12px;
}

.api-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.api-badge--required {
    background: #fee2e2;
    color: #991b1b;
}

.api-badge--optional {
    background: #e2e8f0;
    color: #475569;
}

.api-muted {
    color: #9aa4b2;
}

.api-http-status {
    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;
    font-weight: 800;
}

.api-inline-url {
    display: inline-block;
    max-width: 450px;
    overflow-wrap: anywhere;
}

.api-job-type {
    padding-top: 12px;
}

.api-list {
    padding-left: 24px;
}

.api-list li {
    margin: 8px 0;
}

.api-code-block {
    overflow: hidden;
    margin: 17px 0 27px;
    border-radius: var(--api-radius);
    background: var(--api-code-background);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.13);
}

.api-code-block__header {
    display: flex;
    min-height: 47px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 8px 17px;
    border-bottom: 1px solid #2c3748;
    color: #b8c3d3;
}

.api-code-block__title {
    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;
    font-size: 12px;
    font-weight: 700;
}

.api-code-block__pre {
    max-height: 700px;
    padding: 21px;
    margin: 0;
    overflow: auto;
    background: var(--api-code-background);
    color: var(--api-code-text);
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;
    font-size: 13px;
    line-height: 1.65;
    tab-size: 4;
}

.api-code-block__pre code {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    white-space: pre;
}

.api-tabs__controls {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 20px 0 4px;
    border-radius: 7px;
    background: #edf1f5;
}

.api-tab {
    padding: 9px 17px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #5b6675;
    cursor: pointer;
    font-weight: 700;
}

.api-tab:hover,
.api-tab:focus {
    color: #111827;
}

.api-tab.is-active {
    background: #ffffff;
    color: var(--api-primary);
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.13);
}

.api-tab-panel {
    padding-top: 5px;
}

.api-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.api-two-column .api-code-block {
    min-width: 0;
}

.api-validation-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.api-validation-group {
    padding: 17px;
    border: 1px solid var(--api-border);
    border-radius: var(--api-radius);
    background: var(--api-surface-soft);
}

.api-validation-group h4 {
    margin: 0 0 10px;
}

.api-validation-group ul {
    padding-left: 19px;
    margin: 0;
}

.api-validation-group li {
    margin: 6px 0;
}

.api-glossary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--api-border);
    border-radius: var(--api-radius);
    background: var(--api-border);
}

.api-glossary__entry {
    padding: 18px;
    background: #ffffff;
}

.api-glossary dt {
    margin-bottom: 5px;
    color: var(--api-primary);
    font-weight: 800;
}

.api-glossary dd {
    margin: 0;
    color: #586575;
}

.api-document-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 34px;
    color: #7a8593;
    font-size: 12px;
}

.api-sidebar-overlay {
    display: none;
}

@media (max-width: 1180px) {
    .api-document {
        padding-right: 38px;
        padding-left: 38px;
    }

    .api-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --api-sidebar-width: 290px;
    }

    .api-sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

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

    .api-sidebar__close {
        display: block;
    }

    .api-sidebar-overlay {
        position: fixed;
        z-index: 900;
        inset: 0;
        background: rgba(15, 23, 42, 0.62);
    }

    .api-sidebar-overlay.is-visible {
        display: block;
    }

    .api-page {
        margin-left: 0;
    }

    .api-mobile-header {
        position: sticky;
        z-index: 800;
        top: 0;
        display: flex;
        min-height: 60px;
        align-items: center;
        gap: 14px;
        padding: 0 19px;
        border-bottom: 1px solid var(--api-border);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(8px);
    }

    .api-menu-button {
        display: flex;
        width: 38px;
        height: 38px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 0;
        border: 1px solid var(--api-border-dark);
        border-radius: 6px;
        background: #ffffff;
        cursor: pointer;
    }

    .api-menu-button span {
        display: block;
        width: 17px;
        height: 2px;
        background: #263446;
    }

    .api-mobile-brand {
        color: #111827;
        font-weight: 800;
        text-decoration: none;
    }

    .api-document {
        max-width: none;
        padding: 36px 25px 70px;
        box-shadow: none;
    }

    .api-hero h1 {
        font-size: 43px;
    }

    .api-section-heading h2 {
        font-size: 33px;
    }
}

@media (max-width: 680px) {
    body.api-docs-body {
        font-size: 15px;
    }

    .api-document {
        padding-right: 17px;
        padding-left: 17px;
    }

    .api-hero h1 {
        font-size: 36px;
    }

    .api-lead {
        font-size: 18px;
    }

    .api-section-heading {
        gap: 10px;
    }

    .api-section-heading__number {
        min-width: 30px;
    }

    .api-section-heading h2 {
        font-size: 29px;
    }

    .api-section h3 {
        font-size: 22px;
    }

    .api-requirement-grid,
    .api-validation-list,
    .api-glossary {
        grid-template-columns: 1fr;
    }

    .api-endpoint {
        display: block;
    }

    .api-endpoint__method {
        display: inline-flex;
    }

    .api-endpoint__url {
        display: block;
        width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .api-copy-button--endpoint {
        width: calc(100% - 16px);
    }

    .api-table-wrapper {
        border: 0;
        overflow: visible;
    }

    .api-table,
    .api-table tbody,
    .api-table tr,
    .api-table td {
        display: block;
        width: 100%;
    }

    .api-table thead {
        display: none;
    }

    .api-table tr {
        margin-bottom: 14px;
        border: 1px solid var(--api-border);
        border-radius: var(--api-radius);
        background: #ffffff;
    }

    .api-table td {
        position: relative;
        min-height: 48px;
        padding: 13px 13px 13px 43%;
        border-bottom: 1px solid var(--api-border);
    }

    .api-table td:last-child {
        border-bottom: 0;
    }

    .api-table td::before {
        position: absolute;
        top: 13px;
        left: 13px;
        width: 36%;
        color: #6b7280;
        content: attr(data-label);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .api-code-block__pre {
        padding: 16px;
        font-size: 12px;
    }

    .api-document-footer {
        display: block;
    }

    .api-document-footer div + div {
        margin-top: 5px;
    }
}

@media print {
    body.api-docs-body {
        background: #ffffff;
        color: #000000;
        font-size: 10pt;
    }

    .api-sidebar,
    .api-mobile-header,
    .api-sidebar-overlay,
    .api-copy-button,
    .api-tabs__controls {
        display: none !important;
    }

    .api-page {
        margin-left: 0;
    }

    .api-document {
        max-width: none;
        padding: 0;
        box-shadow: none;
    }

    .api-section {
        page-break-inside: avoid;
    }

    .api-tab-panel {
        display: block !important;
    }

    .api-tab-panel[hidden] {
        display: block !important;
    }

    .api-code-block {
        border: 1px solid #444444;
        box-shadow: none;
    }

    .api-code-block__pre {
        max-height: none;
        overflow: visible;
        background: #ffffff;
        color: #000000;
        white-space: pre-wrap;
    }

    a {
        color: #000000;
        text-decoration: none;
    }
}
