:root {
    --m-get: #61AFEF;
    --m-post: #98C379;
    --m-patch: #E5C07B;
    --m-delete: #E06C75;
}

body.docs-body main {
    max-width: 1180px;
}

.docs-intro {
    padding: 140px 0 60px;
}

.docs-eyebrow {
    color: var(--fg-dim);
    font-size: 0.85rem;
    margin: 0 0 10px;
}

.docs-title {
    font-size: 1.8rem;
    margin: 0 0 16px;
}

.docs-lead {
    color: var(--fg-dim);
    max-width: 640px;
    margin: 0 0 28px;
}

.docs-shell {
    display: flex;
    align-items: flex-start;
    gap: 48px;
    padding-bottom: 80px;
}

.docs-nav {
    position: sticky;
    top: 96px;
    flex: 0 0 200px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 20px;
    border-right: 1px solid var(--border-soft);
}

.docs-nav-group {
    margin-bottom: 24px;
}

.docs-nav-group:last-child {
    margin-bottom: 0;
}

.docs-nav-title {
    color: var(--fg-dim);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 8px;
    opacity: 0.7;
}

.docs-nav a {
    display: block;
    text-decoration: none;
    color: var(--fg-dim);
    font-size: 0.85rem;
    padding: 4px 0 4px 10px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.docs-nav a:hover {
    color: var(--fg);
    border-left-color: var(--border);
}

.docs-nav a.active {
    color: var(--fg);
    border-left-color: var(--fg);
    font-weight: bold;
}

.docs-content {
    flex: 1;
    min-width: 0;
}

.docs-section {
    margin-bottom: 56px;
    scroll-margin-top: 96px;
}

.docs-section-title {
    font-size: 1rem;
    font-weight: normal;
    color: var(--fg-dim);
    margin: 0 0 20px;
}

.docs-section-note {
    color: var(--fg-dim);
    margin: -8px 0 20px;
    font-size: 0.9rem;
}

.endpoint {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px 24px;
    background: var(--panel-bg);
    margin-bottom: 16px;
    scroll-margin-top: 96px;
}

.endpoint-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.method-get { color: var(--m-get); }
.method-post { color: var(--m-post); }
.method-patch { color: var(--m-patch); }
.method-delete { color: var(--m-delete); }

.endpoint-head code.path {
    font-family: var(--mono);
    background: var(--code-bg);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.72rem;
    color: var(--fg-dim);
}

.tag-stream { color: var(--m-get); }
.tag-restricted { color: var(--m-delete); }

.endpoint-desc {
    color: var(--fg-dim);
    margin: 12px 0 16px;
}

.endpoint-desc:last-child {
    margin-bottom: 0;
}

.endpoint-tables {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-table-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg-dim);
    margin: 0 0 8px;
}

.field-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.field-table th,
.field-table td {
    text-align: left;
    padding: 6px 12px 6px 0;
    border-bottom: 1px solid var(--border-soft);
}

.field-table th {
    color: var(--fg-dim);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field-table tr:last-child td {
    border-bottom: none;
}

.field-table code,
.endpoint-desc code,
.docs-lead code {
    font-family: var(--mono);
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
}

.status-code {
    font-weight: 700;
    color: var(--fg);
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre;
}

.docs-models {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.model-block h3 {
    font-size: 0.9rem;
    margin: 0 0 10px;
    font-weight: normal;
    color: var(--fg);
}

.section-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.section-title-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 860px) {
    .docs-shell {
        flex-direction: column;
    }

    .docs-nav {
        position: static;
        width: 100%;
        max-height: none;
        overflow-y: visible;
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 24px;
    }

    .docs-intro {
        padding-top: 120px;
    }
}
