.api-docs {
    --api-ink: #161719;
    --api-muted: #62666d;
    --api-line: #dedfe2;
    --api-red: #991b1b;
    color: var(--api-ink);
    background: #fff;
}

.api-docs-hero {
    padding: 8rem 0 3.5rem;
    background: linear-gradient(135deg, #f9f6f4 0%, #fff 56%, #f4f1ef 100%);
    border-bottom: 1px solid var(--api-line);
}

.api-docs-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    align-items: end;
    gap: 4rem;
}

.api-docs-eyebrow {
    margin: 0 0 1rem;
    color: var(--api-red);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
}

.api-docs-hero h1 {
    margin: 0;
    font-size: clamp(3rem, 5.6vw, 5.5rem);
    line-height: .95;
    letter-spacing: -.06em;
}

.api-docs-hero h1 span { color: var(--api-red); }

.api-docs-intro {
    max-width: 700px;
    margin: 1.5rem 0 0;
    color: var(--api-muted);
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    line-height: 1.65;
}

.api-docs-base-url {
    padding: 1.4rem;
    background: #17181b;
    border-radius: .45rem;
    box-shadow: 0 20px 50px rgba(22, 23, 25, .13);
}

.api-docs-base-url > span {
    display: block;
    margin-bottom: .6rem;
    color: #c8c9cc;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.api-docs-base-url > code { display: block; overflow-wrap: anywhere; color: #fff; font-size: .92rem; }
.api-docs-base-url p { margin: .8rem 0 0; color: #9c9fa5; font-size: .8rem; line-height: 1.5; }
.api-docs-base-url p code { color: #f2b4b6; }

.api-docs-browser { min-height: 680px; padding: 2.5rem 0 5.5rem; }

.api-docs-layout {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.api-docs-sidebar-sticky { position: sticky; top: 6.25rem; }
.api-docs-sidebar-label { margin: 0 0 .65rem; color: #8a8d93; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.api-docs-sidebar nav { display: grid; gap: .25rem; }

.api-docs-sidebar nav a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .68rem .75rem;
    color: #555960;
    border: 1px solid transparent;
    border-radius: .35rem;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.api-docs-sidebar nav a i { width: 1rem; color: #8b8e94; text-align: center; }
.api-docs-sidebar nav a:hover { color: var(--api-ink); background: #f7f6f4; }
.api-docs-sidebar nav a.is-active { color: var(--api-red); background: #fff5f5; border-color: #edc7c8; }
.api-docs-sidebar nav a.is-active i { color: var(--api-red); }

.api-docs-sidebar-help { display: flex; align-items: flex-start; gap: .6rem; margin-top: 1.25rem; padding: .85rem; color: #666a70; background: #f7f7f8; border: 1px solid var(--api-line); border-radius: .35rem; }
.api-docs-sidebar-help i { color: #168252; }
.api-docs-sidebar-help p { margin: 0; font-size: .75rem; line-height: 1.5; }

.api-docs-mobile-navigation { display: none; margin-bottom: 1.25rem; }
.api-docs-mobile-navigation label { display: block; margin-bottom: .45rem; color: #696c72; font-size: .75rem; font-weight: 700; }
.api-docs-mobile-navigation select { width: 100%; padding: .8rem 2.5rem .8rem .9rem; color: var(--api-ink); background: #fff; border: 1px solid #cfd1d5; border-radius: .35rem; }

.api-docs-content { min-width: 0; }
.api-docs.is-enhanced .api-docs-panel:not(.is-active) { display: none; }
.api-docs-panel:focus { outline: none; }

.api-docs-panel-heading { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--api-line); }
.api-docs-panel-heading h2 { margin: 0; font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -.05em; }
.api-docs-panel-heading > p:last-child { max-width: 780px; margin: 1rem 0 0; color: var(--api-muted); font-size: 1rem; line-height: 1.7; }
.api-docs-panel-title-row { display: flex; align-items: center; gap: .9rem; }
.api-docs-panel-icon { display: inline-flex; width: 2.6rem; height: 2.6rem; align-items: center; justify-content: center; color: var(--api-red); background: #fff2f2; border-radius: .45rem; font-size: 1.2rem; }

.api-docs-code-card { overflow: hidden; background: #f5f5f6; border: 1px solid var(--api-line); border-radius: .4rem; }
.api-docs-code-heading { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; color: #666a71; border-bottom: 1px solid var(--api-line); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.api-docs-code-card pre { overflow-x: auto; margin: 0; padding: 1.35rem; color: #25272b; font-size: .85rem; line-height: 1.75; }
.api-docs-code-card code { color: inherit; }
.api-docs-code-card-dark { margin-top: 1rem; color: #fff; background: #1d1f23; border-color: #35383e; }
.api-docs-code-card-dark .api-docs-code-heading { color: #b8bac0; border-color: #35383e; }
.api-docs-code-card-dark pre { color: #f5f5f6; }

.api-docs-notice { display: flex; align-items: flex-start; gap: .9rem; margin-top: 1rem; padding: 1rem; color: #651517; background: #fff5f5; border: 1px solid #edc7c8; border-radius: .35rem; }
.api-docs-notice i { font-size: 1.1rem; }
.api-docs-notice p { margin: 0; line-height: 1.6; }

.api-docs-ai-prompt { overflow: hidden; background: #f7f7f8; border: 1px solid var(--api-line); border-radius: .45rem; }
.api-docs-ai-prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-bottom: 1px solid var(--api-line); }
.api-docs-ai-prompt-heading > span { display: flex; align-items: center; gap: .55rem; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.api-docs-ai-prompt-heading > span i { color: var(--api-red); }
.api-docs-ai-prompt-heading button { padding: .55rem .85rem; color: #fff; background: var(--api-red); border: 1px solid var(--api-red); border-radius: .35rem; font-size: .78rem; font-weight: 700; cursor: pointer; }
.api-docs-ai-prompt-heading button:hover { background: #781416; border-color: #781416; }
.api-docs-ai-prompt textarea { display: block; width: 100%; min-height: 300px; padding: 1.25rem; color: #282a2e; background: #fff; border: 0; outline: 0; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: .86rem; line-height: 1.7; }
.api-docs-ai-prompt textarea:focus { box-shadow: inset 0 0 0 2px rgba(153, 27, 27, .25); }

.api-docs-subheading { margin: 2.25rem 0 1rem; }
.api-docs-subheading h3 { margin: 0; font-size: 1.35rem; letter-spacing: -.025em; }
.api-docs-subheading p { margin: .45rem 0 0; color: var(--api-muted); line-height: 1.6; }
.api-docs-subheading code { color: var(--api-red); }

.api-docs-permissions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--api-line); border-left: 1px solid var(--api-line); }
.api-docs-permissions article { display: flex; flex-direction: column; gap: .45rem; padding: 1rem; border-right: 1px solid var(--api-line); border-bottom: 1px solid var(--api-line); }
.api-docs-permissions code { color: var(--api-red); font-size: .78rem; }
.api-docs-permissions span { font-size: .88rem; font-weight: 600; }

.api-docs-endpoints { display: grid; gap: .9rem; }
.api-docs-endpoint { padding: 1.15rem 1.2rem; border: 1px solid var(--api-line); border-radius: .4rem; box-shadow: 0 8px 22px rgba(22, 23, 25, .035); }
.api-docs-endpoint-signature { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.api-docs-endpoint-signature > code { overflow-wrap: anywhere; color: #292c31; font-size: .9rem; font-weight: 700; }
.api-docs-endpoint > p { margin: .75rem 0; color: var(--api-muted); font-size: .9rem; line-height: 1.6; }
.api-docs-endpoint-meta { display: flex; align-items: center; gap: .6rem; padding-top: .7rem; border-top: 1px solid #ececef; font-size: .75rem; }
.api-docs-endpoint-meta span { color: #83868c; }
.api-docs-endpoint-meta code { color: var(--api-red); }

.api-docs-endpoint-details { margin-top: .85rem; padding-top: .8rem; border-top: 1px solid #ececef; }
.api-docs-endpoint-details summary { color: var(--api-ink); font-size: .82rem; font-weight: 700; cursor: pointer; }
.api-docs-endpoint-details summary::marker { color: var(--api-red); }
.api-docs-endpoint-details summary:hover { color: var(--api-red); }
.api-docs-endpoint-details summary:focus-visible { outline: 2px solid rgba(153, 27, 27, .4); outline-offset: 4px; }
.api-docs-endpoint-details-body { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #ececef; }
.api-docs-endpoint-details-body > p { margin: 0 0 1rem; color: var(--api-muted); font-size: .86rem; line-height: 1.6; }
.api-docs-endpoint-details-body > p code { color: var(--api-red); }
.api-docs-endpoint-details-body .api-docs-code-card-dark { margin-top: 0; }

.api-docs-method { display: inline-flex; flex: 0 0 auto; min-width: 54px; justify-content: center; padding: .25rem .45rem; color: #08783e; background: #e8f7ef; border-radius: 999px; font-size: .69rem; font-weight: 800; }
.api-docs-method-post { color: #1456a0; background: #e9f2fc; }
.api-docs-method-patch { color: #865a05; background: #fff5d9; }

.api-docs-table-wrap { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--api-line); border-radius: .4rem; }
.api-docs-table { width: 100%; min-width: 790px; table-layout: fixed; border-collapse: collapse; }
.api-docs-table th { padding: .75rem .9rem; color: #65686e; background: #f5f5f6; border-bottom: 1px solid var(--api-line); font-size: .7rem; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.api-docs-table th:nth-child(1) { width: 175px; }
.api-docs-table th:nth-child(2), .api-docs-table th:nth-child(3) { width: 110px; }
.api-docs-table td { padding: .85rem .9rem; border-bottom: 1px solid var(--api-line); font-size: .84rem; line-height: 1.5; vertical-align: top; }
.api-docs-table tbody tr:last-child td { border-bottom: 0; }
.api-docs-table td code { color: #7f171b; overflow-wrap: anywhere; }

.api-docs-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.api-docs-status-grid article { display: flex; gap: 1rem; padding: 1.1rem; border: 1px solid var(--api-line); border-radius: .4rem; }
.api-docs-status-grid > article > code { color: var(--api-red); font-size: 1.05rem; font-weight: 800; }
.api-docs-status-grid h3 { margin: 0 0 .3rem; font-size: .95rem; }
.api-docs-status-grid p { margin: 0; color: var(--api-muted); font-size: .85rem; line-height: 1.5; }

@media (max-width: 991.98px) {
    .api-docs-hero { padding-top: 7rem; }
    .api-docs-hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .api-docs-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 1.5rem; }
}

@media (max-width: 767.98px) {
    .api-docs-hero { padding: 6.5rem 0 3rem; }
    .api-docs-browser { padding: 1.5rem 0 4rem; }
    .api-docs-layout { display: block; }
    .api-docs-sidebar { display: none; }
    .api-docs-mobile-navigation { display: block; }
    .api-docs-permissions,
    .api-docs-status-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .api-docs-panel-heading h2 { font-size: 2.25rem; }
    .api-docs-endpoint-signature { align-items: flex-start; flex-direction: column; }
    .api-docs-code-heading { align-items: flex-start; flex-direction: column; }
    .api-docs-code-card pre { padding: 1rem; font-size: .75rem; }
    .api-docs-ai-prompt-heading { align-items: stretch; flex-direction: column; }
    .api-docs-ai-prompt-heading button { width: 100%; }
}
