/* Omnivery Documentation */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --bg:           #162228;
    --bg-elevated:  #1d2d35;
    --bg-hover:     #1a2830;
    --bg-border:    #243540;
    --highlight:    #fbb040;
    --highlight-dk: #e09a2a;
    --highlight-bg: rgba(251,176,64,0.12);
    --text:         #e2e7e9;
    --text-muted:   #8fa3ad;
    --text-dim:     #5e7a87;
    --white:        #ffffff;
    --font:         'Poppins', ui-sans-serif, system-ui, sans-serif;
    --font-mono:    'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
    --radius:       8px;
    --shadow:       0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:    0 4px 12px rgba(0,0,0,0.4);
    /* HTTP method colours (kept readable on dark bg) */
    --get:    #22c55e;
    --post:   #3b82f6;
    --put:    #f59e0b;
    --patch:  #a78bfa;
    --delete: #f87171;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--bg-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 2rem;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.logo-docs {
    font-size: 0.75rem;
    color: var(--highlight);
    font-weight: 600;
    background: var(--highlight-bg);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    border: 1px solid rgba(251,176,64,0.3);
}

.main-nav {
    display: flex;
    gap: 0.125rem;
    align-items: center;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.15s;
}

.main-nav a:hover {
    color: var(--white);
    background: var(--bg-hover);
}

.main-nav a.active {
    color: var(--highlight);
    background: var(--highlight-bg);
}

.header-login-btn {
    flex-shrink: 0;
    color: var(--white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    transition: all 0.15s;
    white-space: nowrap;
}
.header-login-btn:hover {
    background: var(--bg-hover);
    border-color: rgba(255,255,255,0.45);
    color: var(--white);
}

/* ===== HAMBURGER / MOBILE NAV ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
    transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--bg);
    border-top: 1px solid var(--bg-border);
    padding: 0.5rem 1.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.mobile-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.7rem 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--bg-border);
    transition: color 0.15s;
}
.mobile-nav a:last-child {
    border-bottom: none;
}
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--highlight);
}
.mobile-nav-login {
    margin-top: 0.5rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.25) !important;
    border-radius: var(--radius);
    padding: 0.5rem !important;
}

/* ===== LAYOUT ===== */
.page-layout {
    display: flex;
    align-items: stretch;
    width: 100%;        /* prevents content-driven width changes from shifting the sidebar */
    flex: 1;            /* fill remaining body height so footer stays at bottom */
}

/* ===== SIDEBAR ===== */
.sidebar-col {
    width: 256px;
    flex-shrink: 0;   /* never yields space to content */
    border-right: 1px solid var(--bg-border);
    background: var(--bg);
}

.sidebar {
    padding: 1.5rem 0;
    position: sticky;
    top: 64px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
}

.sidebar-section { padding: 0 0.75rem 1.5rem; }

.sidebar-section h3 {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
}

.nav-tree { list-style: none; }
.nav-subtree { padding-left: 1rem; margin-top: 0.25rem; }

.nav-section { margin-top: 0.5rem; }
.nav-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted) !important;
    padding: 0.5rem 0.75rem 0.25rem;
    text-decoration: none;
}
.nav-section-title:hover { color: var(--highlight) !important; }
.nav-section-title.active { color: var(--highlight) !important; }

.nav-item a {
    display: block;
    padding: 0.375rem 0.625rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: var(--radius);
    transition: all 0.12s;
}

.nav-item a:hover {
    color: var(--white);
    background: var(--bg-hover);
}

.nav-item a.active {
    color: var(--highlight);
    background: var(--highlight-bg);
    font-weight: 600;
}

/* ===== CONTENT ===== */
.content {
    flex: 1;
    min-width: 0;        /* prevents wide tables/code from blowing out the flex column */
    overflow-x: hidden;
    padding: 2rem 2.5rem;
}

/* ===== HOME PAGE ===== */
.hero {
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--bg-border);
    margin-bottom: 2.5rem;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
    font-weight: 400;
}

.ai-prompt-section {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    padding: 1.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-border);
    border-radius: var(--radius);
}

.ai-prompt-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.875rem;
}

.ai-prompt-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-prompt-box textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--bg-border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.15s;
}

.ai-prompt-box textarea:focus {
    border-color: var(--highlight);
}

.ai-prompt-btn {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--highlight);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.ai-prompt-btn:hover { background: #f5a623; }

.card-grid { margin-bottom: 2.5rem; }

.card-grid h2 {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.cards.cards-2col {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    display: block;
    text-decoration: none;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--bg-border);
    border-radius: var(--radius);
    transition: all 0.15s;
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
}

.card:hover {
    border-color: var(--highlight);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.card p {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.card-api { border-top: 3px solid var(--highlight); }

.card-desc { font-size: 0.825rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.5; }
.card-desc p { margin: 0; }
.card-desc p + p { margin-top: 0.3rem; }

.badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: var(--highlight-bg);
    color: var(--highlight);
    border: 1px solid rgba(251,176,64,0.3);
    border-radius: 20px;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ===== MARKDOWN CONTENT ===== */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    color: var(--white);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.markdown-body h1 { font-size: 1.875rem; margin: 0 0 1rem; }
.markdown-body h2 { font-size: 1.375rem; margin: 2rem 0 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--bg-border); }
.markdown-body h3 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; }
.markdown-body h4 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }

p { padding-bottom: 0.5rem; }
.mermaid { color: #000 !important; background-color: #ffffff; margin: 1.5em 0; }
.mermaid svg text { fill: #000 !important; }
.mermaid p { color: #000 !important; padding-bottom: 0 !important; }
.markdown-body p { margin-bottom: 1rem; padding-bottom: 0.5rem; color: var(--text); line-height: 1.7; }
.markdown-body img { max-width: 100%; height: auto; }

.markdown-body ul,
.markdown-body ol { margin-bottom: 1rem; padding-left: 1.5rem; color: var(--text); }
.markdown-body li { margin-bottom: 0.35rem; }

.markdown-body a { color: var(--highlight); text-decoration: none; font-weight: 500; }
.content a:not(.card):not(.btn) { color: var(--highlight); }
.markdown-body a:hover { text-decoration: underline; }

.markdown-body code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--bg-border);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--highlight);
}

.markdown-body pre {
    background: #0d1a20;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--bg-border);
}

.markdown-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.65;
}

.markdown-body blockquote {
    border-left: 4px solid var(--text-dim);
    padding: 0.75rem 1rem;
    margin: 1.25rem 0;
    background: rgba(255,255,255,0.04);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
}
.markdown-body blockquote.callout-warning {
    border-left-color: #f59e0b;
    background: rgba(245,158,11,0.1);
    color: #fcd47a;
}
.markdown-body blockquote.callout-notice {
    border-left-color: #3b82f6;
    background: rgba(59,130,246,0.1);
    color: #93c5fd;
}
.markdown-body blockquote.callout-success {
    border-left-color: #22c55e;
    background: rgba(34,197,94,0.1);
    color: #86efac;
}
.markdown-body blockquote.callout-danger {
    border-left-color: #f87171;
    background: rgba(248,113,113,0.1);
    color: #fca5a5;
}

.markdown-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.markdown-body th,
.markdown-body td { border: 1px solid var(--bg-border); padding: 0.6rem 0.875rem; text-align: left; font-size: 0.875rem; }
.markdown-body th { background: rgba(255,255,255,0.04); font-weight: 600; color: var(--white); }
.markdown-body td { color: var(--text); }
.markdown-body tr:hover td { background: rgba(255,255,255,0.03); }

.markdown-body hr { border: none; border-top: 1px solid var(--bg-border); margin: 1.5rem 0; }

/* ===== API REF HEADER ===== */
.api-ref-content { padding-bottom: 4rem; }

.api-header {
    border-bottom: 1px solid var(--bg-border);
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
}

.api-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.api-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.version-badge {
    background: var(--highlight);
    color: #0e1c23;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.base-url { color: var(--text-muted); font-size: 0.875rem; }

.base-url code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--bg-border);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    color: var(--text);
}

.api-description { color: var(--text); margin-top: 0.75rem; font-size: 0.925rem; line-height: 1.7; }

.auth-section {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--highlight-bg);
    border-radius: var(--radius);
    border: 1px solid rgba(251,176,64,0.25);
}

.auth-section h3 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--highlight);
    margin-bottom: 0.5rem;
}

.auth-list { list-style: none; font-size: 0.875rem; color: var(--text-muted); }
.auth-list li { margin-bottom: 0.25rem; }
.auth-list code {
    font-family: var(--font-mono);
    font-size: 0.83em;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--bg-border);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    color: var(--highlight);
}

/* ===== ENDPOINT GROUP ===== */
.endpoint-group { margin-bottom: 3rem; }

.group-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
    padding-bottom: 0.625rem;
    border-bottom: 2px solid var(--highlight);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

/* ===== ENDPOINT ===== */
.endpoint {
    border: 1px solid var(--bg-border);
    border-radius: var(--radius);
    margin-bottom: 0.625rem;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.endpoint:hover { border-color: rgba(251,176,64,0.35); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    cursor: pointer;
    background: var(--bg-elevated);
    transition: background 0.12s;
    user-select: none;
}

.endpoint-header:hover { background: var(--bg-hover); }

.method-badge {
    display: inline-block;
    min-width: 68px;
    text-align: center;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.method-badge.get     { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.method-badge.post    { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.method-badge.put     { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.method-badge.patch   { background: rgba(167,139,250,0.15);color: #a78bfa; border: 1px solid rgba(167,139,250,0.3); }
.method-badge.delete  { background: rgba(248,113,113,0.15);color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.method-badge.head,
.method-badge.options { background: rgba(255,255,255,0.06);color: var(--text-muted); border: 1px solid var(--bg-border); }

.endpoint-path {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--white);
    font-weight: 500;
    flex-shrink: 0;
}

.endpoint-summary {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex: 1;
}

.toggle-icon {
    color: var(--text-dim);
    font-size: 0.7rem;
    transition: transform 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

.endpoint-header.open .toggle-icon { transform: rotate(180deg); }

.endpoint-body {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--bg-border);
    background: var(--bg);
}

.endpoint-description {
    color: var(--text);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ===== PARAMS TABLE ===== */
.params-section,
.request-body-section,
.responses-section { margin-bottom: 1.5rem; }

.params-section h4,
.request-body-section h4,
.responses-section h4,
.code-samples h4 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-dim);
    margin-bottom: 0.625rem;
}

.content-type {
    font-family: var(--font-mono);
    font-size: 0.78em;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--bg-border);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-weight: 400;
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.params-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.params-table th {
    text-align: left;
    padding: 0.5rem 0.875rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--bg-border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.params-table td {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--bg-border);
    color: var(--text);
    vertical-align: top;
}

.params-table tr:hover td { background: rgba(255,255,255,0.03); }

.params-table code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--bg-border);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    color: var(--highlight);
}

/* Nested schema tables — span type+required+description columns */
.schema-nested-row:hover td { background: transparent; }
.schema-nested-row .schema-nested-spacer {
    padding: 0;
    border-top: none;
    border-right: none;
    width: 1.5rem;
}
.schema-nested-row > td:last-child {
    padding: 0 0 0.5rem 0;
    border-top: none;
}
.schema-nested-row .params-table {
    border-left: 2px solid var(--bg-border);
    font-size: 0.93em;
}
.schema-nested-row .params-table th {
    background: rgba(255,255,255,0.02);
}

.param-in {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    font-size: 0.78em;
    color: var(--text-muted);
    font-family: var(--font-mono);
    border: 1px solid var(--bg-border);
}

.required { color: #f87171; font-weight: 600; }

/* ===== RESPONSES ===== */
.response-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.875rem;
}

.response-item-header {
    display: flex;
    align-items: baseline;
    gap: 0.875rem;
}

.status-code {
    display: inline-block;
    min-width: 54px;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
}

.status-code[data-status^="2"] { background: rgba(34,197,94,0.15);  color: #4ade80; }
.status-code[data-status^="4"] { background: rgba(248,113,113,0.15);color: #f87171; }
.status-code[data-status^="5"] { background: rgba(245,158,11,0.15); color: #fbbf24; }

.response-desc { color: var(--text-muted); line-height: 1.5; }

.response-example {
    margin: 0;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-muted);
    overflow-x: auto;
    white-space: pre;
}

/* ===== CODE SAMPLES ===== */
.code-samples { margin-bottom: 1.5rem; }

.code-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--bg-border);
}

.tab-btn {
    padding: 0.45rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    background: none;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.12s;
    font-family: var(--font);
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
    color: var(--highlight);
    border-bottom-color: var(--highlight);
}

.code-tab-contents { position: relative; }

.code-block {
    display: none;
    margin: 0;
    background: #0d1a20;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1.125rem 1.375rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.65;
    border: 1px solid var(--bg-border);
    border-top: none;
}

.code-block.active { display: block; }

.code-block code {
    color: var(--text);
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

/* ===== TRY IT ===== */
.try-it-section { margin-top: 1rem; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
    font-family: var(--font);
}

.btn-primary { background: var(--highlight); color: #0e1c23; }
.btn-primary:hover { background: var(--highlight-dk); }

.btn-outline {
    background: none;
    color: var(--highlight);
    border: 1.5px solid var(--highlight);
}
.btn-outline:hover { background: var(--highlight-bg); }

.try-it-pane {
    margin-top: 0.875rem;
    padding: 1.125rem;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--bg-border);
}

.form-group { margin-bottom: 0.875rem; }

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--bg-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(251,176,64,0.15);
}

.form-group textarea {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    resize: vertical;
}

.try-it-response {
    margin-top: 1rem;
    border-top: 1px solid var(--bg-border);
    padding-top: 0.875rem;
}

.try-it-response h5 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.response-status { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }
.response-status.ok  { color: #4ade80; }
.response-status.err { color: #f87171; }

.response-body {
    background: #0d1a20;
    color: var(--text);
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid var(--bg-border);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--bg-border);
    color: var(--text-dim);
    padding: 1.25rem 0;
    font-size: 0.825rem;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-copy { margin: 0; }

.site-footer a { color: var(--text-muted); text-decoration: none; transition: color 0.12s; }
.site-footer a:hover { color: var(--highlight); }

/* ===== ERROR PAGES ===== */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 0 2rem;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--highlight);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.error-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.75rem;
}

.error-message {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0 0 2rem;
    max-width: 480px;
    line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar-col { width: 220px; }
    .content { padding: 1.75rem 2rem; }
}

@media (max-width: 768px) {
    .sidebar-col { display: none; }
    .content { padding: 1.5rem 1rem; }
    .hero h1 { font-size: 1.625rem; }
    .cards, .cards.cards-2col { grid-template-columns: 1fr; }
    .endpoint-path { display: none; }
    .header-inner { height: 56px; }
    .main-nav { display: none; }
    .header-login-btn { display: none; }
    .nav-toggle { display: flex; }
    .mobile-nav.open { display: flex; }
}
