/* Agrogat — dokumentasjon (API-referanse m.m.) */
:root {
    --doc-bg: #0d1117;
    --doc-surface: #161b22;
    --doc-border: #30363d;
    --doc-text: #c9d1d9;
    --doc-muted: #8b949e;
    --doc-accent: #58a6ff;
    --doc-green: #3fb950;
    --doc-sidebar-w: 280px;
}

body.docs-page {
    background: var(--doc-bg);
    color: var(--doc-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

.docs-nav {
    background: var(--doc-surface);
    border-bottom: 1px solid var(--doc-border);
}

.docs-shell {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 57px);
}

.docs-sidebar {
    width: var(--doc-sidebar-w);
    flex-shrink: 0;
    border-right: 1px solid var(--doc-border);
    padding: 1.5rem 1rem 2rem;
    position: sticky;
    top: 57px;
    align-self: flex-start;
    max-height: calc(100vh - 57px);
    overflow-y: auto;
}

.docs-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--doc-muted);
    margin-bottom: 0.75rem;
}

.docs-toc a {
    display: block;
    color: var(--doc-muted);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.375rem;
    border-left: 2px solid transparent;
    line-height: 1.4;
}

.docs-toc a:hover {
    color: var(--doc-text);
    background: rgba(88, 166, 255, 0.08);
}

.docs-toc a.docs-toc-h3 {
    padding-left: 1.25rem;
    font-size: 0.8125rem;
}

.docs-main {
    flex: 1;
    min-width: 0;
    padding: 2rem 2rem 4rem;
}

.docs-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--doc-border);
}

.docs-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.docs-header-desc {
    color: var(--doc-muted);
    font-size: 1.05rem;
    max-width: 42rem;
    margin-bottom: 1rem;
}

.docs-base-url {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: #21262d;
    border: 1px solid var(--doc-border);
    border-radius: 0.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875rem;
    color: var(--doc-accent);
}

.docs-content h2.docs-h2:not(.docs-endpoint-heading) {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 2.5rem 0 1rem;
    padding-top: 0.5rem;
    scroll-margin-top: 5rem;
}

.docs-content h3.docs-h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e6edf3;
    margin: 1.75rem 0 0.75rem;
    scroll-margin-top: 5rem;
}

.docs-content h4.docs-h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #e6edf3;
    margin: 1.25rem 0 0.5rem;
}

.docs-content p {
    margin-bottom: 1rem;
    color: var(--doc-text);
    max-width: 52rem;
}

.docs-hr {
    border: 0;
    border-top: 1px solid var(--doc-border);
    margin: 2rem 0;
}

.docs-link {
    color: var(--doc-accent);
    text-decoration: none;
}

.docs-link:hover {
    text-decoration: underline;
}

.docs-inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875em;
    background: rgba(110, 118, 129, 0.2);
    padding: 0.15em 0.4em;
    border-radius: 0.375rem;
    color: #f0883e;
}

.docs-list {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
    max-width: 52rem;
}

.docs-list li {
    margin-bottom: 0.35rem;
    color: var(--doc-text);
}

.docs-endpoint-card {
    margin: 2rem 0 1rem;
    scroll-margin-top: 5rem;
}

.docs-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
}

.docs-endpoint-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.125rem;
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: 0.625rem;
    border-left: 4px solid var(--doc-accent);
}

.docs-method {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
    font-family: ui-monospace, monospace;
}

.docs-method-post   { background: rgba(63, 185, 80, 0.15); color: #3fb950; }
.docs-method-get    { background: rgba(88, 166, 255, 0.15); color: #58a6ff; }
.docs-method-put    { background: rgba(210, 153, 34, 0.15); color: #d29922; }
.docs-method-delete { background: rgba(248, 81, 73, 0.15); color: #f85149; }
.docs-method-default { background: #21262d; color: var(--doc-muted); }

.docs-endpoint-path {
    font-size: 0.95rem;
    color: #fff;
    background: transparent;
}

.docs-code-block {
    margin: 1rem 0 1.5rem;
    border: 1px solid var(--doc-border);
    border-radius: 0.625rem;
    overflow: hidden;
    max-width: 52rem;
}

.docs-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.875rem;
    background: #21262d;
    border-bottom: 1px solid var(--doc-border);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--doc-muted);
}

.docs-copy-btn {
    background: transparent;
    border: 1px solid var(--doc-border);
    color: var(--doc-muted);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

.docs-copy-btn:hover {
    color: #fff;
    border-color: var(--doc-muted);
}

.docs-copy-btn.docs-copy-done {
    color: var(--doc-green);
    border-color: var(--doc-green);
}

.docs-code-block pre {
    margin: 0;
    padding: 1rem 1.125rem;
    background: #0d1117;
    overflow-x: auto;
}

.docs-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #e6edf3;
}

.docs-table-wrap {
    margin: 1rem 0 1.5rem;
    max-width: 52rem;
    border: 1px solid var(--doc-border);
    border-radius: 0.625rem;
    overflow: hidden;
}

.docs-table {
    margin: 0;
    color: var(--doc-text);
    font-size: 0.875rem;
}

.docs-table thead {
    background: #21262d;
}

.docs-table th {
    font-weight: 600;
    color: #fff;
    border-color: var(--doc-border);
    white-space: nowrap;
}

.docs-table td,
.docs-table th {
    padding: 0.65rem 1rem;
    border-color: var(--doc-border);
    vertical-align: top;
}

.docs-table tbody tr:hover {
    background: rgba(88, 166, 255, 0.04);
}

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

.docs-auth-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    border: 1px solid var(--doc-border);
    background: #21262d;
    color: var(--doc-muted);
}

.docs-footer {
    border-top: 1px solid var(--doc-border);
    padding: 1.5rem 2rem;
    color: var(--doc-muted);
    font-size: 0.875rem;
    text-align: center;
}

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

    .docs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--doc-border);
    }

    .docs-main {
        padding: 1.5rem 1rem 3rem;
    }
}
