:root {
    --docs-bg: #f2f8f9;
    --docs-surface: #ffffff;
    --docs-ink: #0f2a2e;
    --docs-muted: #5b6b73;
    --docs-line: #d5e6e8;
    --docs-accent: #008694;
    --docs-accent-soft: #e8f6f7;
    --docs-code-bg: #043f45;
    --docs-code-ink: #e2e8f0;
    --docs-success: #0f7b4c;
    --docs-warn: #9a6700;
    --docs-radius: 14px;
    --docs-sidebar: 280px;
}

* { box-sizing: border-box; }

body.docs-body {
    margin: 0;
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    color: var(--docs-ink);
    background: var(--docs-bg);
    line-height: 1.6;
}

.docs-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--docs-line);
}

.docs-topbar__inner,
.docs-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.docs-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--docs-ink);
    text-decoration: none;
    font-weight: 700;
}

.docs-brand img {
    height: 28px;
    width: auto;
}

.docs-brand em {
    font-style: normal;
    color: var(--docs-accent);
    font-weight: 600;
}

.docs-topbar__links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.docs-topbar__links a {
    color: var(--docs-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.docs-topbar__links a:hover { color: var(--docs-accent); }

.docs-btn-sm {
    background: var(--docs-accent) !important;
    color: #fff !important;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
}

.docs-nav-toggle {
    display: none;
    border: 1px solid var(--docs-line);
    background: #fff;
    border-radius: 10px;
    width: 42px;
    height: 42px;
}

.docs-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    display: grid;
    grid-template-columns: var(--docs-sidebar) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 78px;
    background: var(--docs-surface);
    border: 1px solid var(--docs-line);
    border-radius: var(--docs-radius);
    padding: 1rem 0.75rem;
    max-height: calc(100vh - 100px);
    overflow: auto;
}

.docs-sidebar__label {
    margin: 0.85rem 0.65rem 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8292a6;
    font-weight: 700;
}

.docs-sidebar__label:first-child { margin-top: 0.2rem; }

.docs-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    color: var(--docs-muted);
    text-decoration: none;
    font-size: 0.92rem;
}

.docs-nav-link:hover,
.docs-nav-link.is-active {
    background: var(--docs-accent-soft);
    color: var(--docs-accent);
    font-weight: 600;
}

.docs-nav-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
}

.docs-main {
    background: var(--docs-surface);
    border: 1px solid var(--docs-line);
    border-radius: var(--docs-radius);
    padding: 2rem 2.25rem;
    min-height: 60vh;
}

.docs-main h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.docs-main h2 {
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--docs-line);
}

.docs-main h2:first-of-type { border-top: 0; padding-top: 0; }

.docs-main h3 {
    font-size: 1.05rem;
    margin: 1.5rem 0 0.5rem;
}

.docs-lead {
    color: var(--docs-muted);
    font-size: 1.05rem;
    max-width: 52rem;
    margin-bottom: 1.5rem;
}

.docs-kicker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--docs-accent);
    margin-bottom: 0.5rem;
}

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

.docs-card {
    display: block;
    border: 1px solid var(--docs-line);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    background: #fbfcfe;
    transition: border-color .15s ease, transform .15s ease;
}

.docs-card:hover {
    border-color: var(--docs-accent);
    transform: translateY(-2px);
}

.docs-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--docs-ink);
}

.docs-card span {
    color: var(--docs-muted);
    font-size: 0.9rem;
}

.docs-endpoint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--docs-line);
    border-radius: 10px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
}

.docs-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.docs-method--post { background: #0f7b4c; }
.docs-method--get { background: #008694; }

.docs-main pre {
    background: var(--docs-code-bg);
    color: var(--docs-code-ink);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    overflow: auto;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.84rem;
    line-height: 1.55;
}

.docs-main code {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.88em;
}

.docs-main p code,
.docs-main li code,
.docs-main td code {
    background: #eef3f8;
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
}

.docs-main pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.92rem;
}

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

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

.docs-callout {
    border-left: 4px solid var(--docs-accent);
    background: var(--docs-accent-soft);
    padding: 0.85rem 1rem;
    border-radius: 0 10px 10px 0;
    margin: 1.25rem 0;
}

.docs-callout--warn {
    border-left-color: var(--docs-warn);
    background: #fff8e8;
}

.docs-callout--danger {
    border-left-color: #b42318;
    background: #fef3f2;
    color: #7a271a;
}

.docs-badge--deprecated {
    background: #fef3f2;
    color: #b42318;
}

.docs-callout--ok {
    border-left-color: var(--docs-success);
    background: #e9f8f0;
}

.docs-network-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.docs-network-hero img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--docs-line);
}

.docs-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.docs-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--docs-muted);
}

.docs-badge--on {
    background: #e9f8f0;
    color: var(--docs-success);
}

.docs-prose :is(h1, h2, h3, h4) {
    scroll-margin-top: 90px;
}

.docs-prose img {
    max-width: 100%;
    height: auto;
}

.docs-figure {
    margin: 1.5rem 0;
    padding: 0.75rem;
    border: 1px solid var(--docs-line);
    border-radius: 12px;
    background: #f8fbfb;
}

.docs-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--docs-line);
    background: #fff;
}

.docs-figure figcaption {
    margin: 0.75rem 0.25rem 0.15rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--docs-muted);
}

.docs-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.docs-prose table td,
.docs-prose table th {
    border: 1px solid var(--docs-line);
    padding: 0.5rem 0.65rem;
}

.docs-empty {
    color: var(--docs-muted);
    padding: 2rem 0;
}

.docs-footer {
    border-top: 1px solid var(--docs-line);
    background: #fff;
    color: var(--docs-muted);
    font-size: 0.9rem;
}

.docs-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--docs-line);
}

.docs-pager__link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--docs-line);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-pager__link:hover {
    border-color: var(--docs-accent, #0d9488);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.docs-pager__link--next {
    text-align: right;
    align-items: flex-end;
}

.docs-pager__dir {
    font-size: 0.8rem;
    color: var(--docs-muted);
}

.docs-pager__title {
    font-size: 0.95rem;
    font-weight: 600;
}

.docs-pager__spacer {
    display: block;
}

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

    .docs-sidebar {
        position: static;
        display: none;
        max-height: none;
    }

    .docs-sidebar.is-open { display: block; }

    .docs-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

    .docs-topbar__links { display: none; }

    .docs-main { padding: 1.35rem 1.1rem; }

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

    .docs-pager__link--next {
        text-align: left;
        align-items: flex-start;
    }
}
