:root {
    --bg: #0f172a;
    --bg-elevated: #020617;
    --bg-soft: #111827;
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.1);
    --accent-border: rgba(56, 189, 248, 0.4);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #1f2937;
    --radius-lg: 14px;
    --radius-full: 999px;
    --shadow-soft: 0 18px 35px rgba(15, 23, 42, 0.85);
    --shadow-subtle: 0 10px 30px rgba(15, 23, 42, 0.6);
    --transition-fast: 0.18s ease-out;

    --page-bg: radial-gradient(circle at top, #1e293b 0, #020617 45%, #000 100%);
    --sidebar-bg: linear-gradient(180deg, #020617 0%, #020617 45%, #020617ee 100%);
    --main-bg: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95) 0, #020617 40%, #020617 100%);

    --surface-1: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98)); /* cards */
    --surface-2: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), #020617 55%);   /* sections */

    --border-strong: rgba(31, 41, 55, 0.95);
    --border-soft: rgba(148, 163, 184, 0.18);

    --hover-bg: rgba(15, 23, 42, 0.9);
    --hover-border: rgba(148, 163, 184, 0.35);

    --chip-bg: rgba(15, 23, 42, 0.9);

    --code-bg: #020617;
    --table-head-bg: rgba(15, 23, 42, 0.9);

    --panel-bg: rgba(2, 6, 23, 0.72);

    --get-text-color: rgba(31, 41, 55, 0.95);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    background: var(--page-bg);
    color: var(--text);
    height: 100%;
}

/* Layout */

.layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: transparent;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }
}

/* Sidebar */

.sidebar {
    border-right: 1px solid var(--border-soft);
    background: var(--sidebar-bg);
    padding: 20px 18px;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 0, #e5e7eb 0, #38bdf8 30%, #0ea5e9 55%, #0369a1 100%);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8), 0 14px 30px rgba(15, 118, 110, 0.4);
}

.brand-text-main {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.brand-text-sub {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
}

/* Sidebar sections */

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin: 18px 0 8px;
}

.nav-sublist {
    padding-left: 10px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform 0.1s ease-out;
}

.nav-link span.icon {
    font-size: 1.05rem;
}

.nav-link:hover {
    background: var(--hover-bg);
    border-color: var(--hover-border);
    color: var(--text);
    transform: translateX(2px);
}

.nav-link.active {
    background: var(--accent-soft);
    color: var(--text);
    border-color: var(--accent-border);
}

/* "Tag" badges in nav */

.nav-tag {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--muted);
}

/* Sidebar footer */

.sidebar-footer {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(55, 65, 81, 0.6);
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.82rem;
}

.sidebar-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }
}

/* Content area */

.main {
    padding: 22px 28px 32px;
    background: var(--main-bg);
}

@media (max-width: 900px) {
    .main {
        padding: 18px 16px 26px;
    }
}

/* Top header inside main */

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.main-title-group h1 {
    font-size: 1.25rem;
    margin: 0;
}

.main-title-group p {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.main-chip {
    padding: 4px 9px;
    font-size: 0.78rem;
    border-radius: var(--radius-full);
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
}

/* Search input (optional) */

.search-wrapper {
    margin-bottom: 18px;
}

.search-input {
    width: 100%;
    padding: 8px 11px;
    border-radius: var(--radius-full);
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
    font-size: 0.85rem;
}

.search-input::placeholder {
    color: #6b7280;
}

/* Cards & content */

.card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 18px;
}

@media (max-width: 1000px) {
    .card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.card {
    border-radius: var(--radius-lg);border: 1px solid var(--border-strong);
    background: var(--surface-1);
    box-shadow: var(--shadow-soft);
    padding: 16px 16px 18px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.card-title {
    font-size: 0.93rem;
    font-weight: 500;
}

.card-pill {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(56, 189, 248, 0.5);
    background: rgba(8, 47, 73, 0.85);
    color: #e0f2fe;
}

.card-body {
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.55;
}

.card-body strong {
    color: var(--text);
}

/* Section blocks */

.section {
    margin-bottom: 24px;
    padding: 14px 14px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    box-shadow: var(--shadow-subtle);
}

.section h2 {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 8px;
}

.section p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0;
}

.section ul, .section ol{
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 0.9rem;
    color: var(--muted);
}

/* Inline label style */

.label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
    font-size: 0.72rem;
}

/* Code blocks */

pre {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--code-bg);
    font-size: 0.83rem;
    overflow-x: auto;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Links inside content */

a {
    color: var(--accent);
}

a:hover {
    text-decoration: underline;
}

/* Table style (for future API docs, etc.) */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.85rem;
}

th,
td {
    padding: 6px 8px;
    border: 1px solid rgba(31, 41, 55, 0.95);
}

th {
    background: var(--table-head-bg);
    text-align: left;
}

/* Tiny utility */

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

/* Language switch */

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    border-radius: 999px;
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    padding: 4px 9px;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), transform 0.1s ease-out;
}

.lang-btn:hover {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
    transform: translateY(-1px);
}

.lang-btn-active {
    background: var(--accent-soft);
    color: var(--text);
}

/* Language visibility */

body.lang-en .text-cz {
    display: none;
}

body.lang-cz .text-en {
    display: none;
}

/* Command type badges */

.command-type {
    margin-left: auto;
}

.command-header {
    margin-top: 12px;
}

.command-type-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

.command-type-slash .command-type-dot {
    background: rgba(45, 212, 191, 0.85); /* slash = teal-ish */
}

.command-type-prefix .command-type-dot {
    background: rgba(248, 113, 113, 0.9); /* !prefix = red-ish */
}

/* Command list layout */

.command-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.command-item {
    display: grid;
    grid-template-columns: 1fr 180px; /* left content + right preview */
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    box-shadow: var(--shadow-subtle);
}

.command-item > *:not(.command-preview) {
    grid-column: 1;
}

.command-preview {
    grid-column: 2;
    grid-row: 1 / span 4; /* keep it aligned to the top beside the header area */
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.command-name-header {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    line-height: 1.2;
}

.command-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: var(--text);
}

.command-name-header {
    justify-content: space-between;
}

.command-name pre {
    margin: 0;
}

.command-params {
    margin: 12px 0 0;
    padding-left: 16px;
    color: var(--text);
}

.command-params > li {
    margin: 6px 0;
    color: var(--muted);
}

/* Nested lists (required/optional items) */
.command-params ul {
    margin: 6px 0 10px;
    padding-left: 16px;
    color: var(--text);
}

.command-params ul li {
    margin: 4px 0;
    color: var(--text);
}

/* Make "Required parameters:" and "Optional parameters:" stand out */
.command-params > li:first-child,
.command-params > li:has(+ ul) {
    font-weight: 600;
    color: var(--text);
}

/* Additional info */
.command-additional-info {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Preview thumb on the right */
.command-preview .preview-thumb {
    width: 160px;
    height: auto;
    border-radius: 10px;
}

/* Responsive: on small screens move preview below */
@media (max-width: 820px) {
    .command-item {
        grid-template-columns: 1fr;
    }

    .command-preview {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
    }

    .command-preview .preview-thumb {
        width: 220px;
    }
}

.command-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.supported-servers-table {
    margin-top: 10px;
    font-size: 0.85rem;
}

.supported-servers-table th:nth-child(1),
.supported-servers-table td:nth-child(1) {
    width: 10%;
    text-align: center;
}

.supported-servers-table th:nth-child(2),
.supported-servers-table td:nth-child(2) {
    width: 30%;
}

.supported-servers-table th:nth-child(3),
.supported-servers-table td:nth-child(3) {
    width: 60%;
}

/* Disabled / WIP navigation entries */

.nav-link-disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
    border-style: dashed;
    border-color: rgba(75, 85, 99, 0.6);
    background: transparent;
}

.nav-tag-wip {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    border: 1px dashed rgba(148, 163, 184, 0.5);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.8);
}

.preview-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.preview-thumb {
    width: 160px;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--border-soft);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.preview-thumb:hover {
    transform: translateY(-1px);
    border-color: var(--hover-border);
}


.preview-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.preview-modal-backdrop.active {
    display: flex;
}

.preview-modal-img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text);
}

.lang-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: var(--chip-bg);
}

.lang-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--text);
    transition: transform var(--transition-fast);
}

/* This is the key: move thumb when Czech is active */
body.lang-cz .lang-thumb {
    transform: translateX(20px);
}

.lang-labels {
    display: inline-flex;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--muted);
}

body.lang-en .lang-labels span:first-child,
body.lang-cz .lang-labels span:last-child {
    color: var(--text);
    font-weight: 700;
}


/* Theme toggle */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}

.theme-label {
    opacity: 0.7;
}

.theme-switch {
    position: relative;
    width: 44px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
    padding: 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    transition: background 0.18s ease-out, border-color 0.18s ease-out;
}

.theme-switch-thumb {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #e5e7eb;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.6);
    transform: translateX(0);
    transition: transform 0.18s ease-out;
}

body.theme-light .theme-switch {
    background: #fef3c7;
    border-color: rgba(180, 83, 9, 0.7);
}

body.theme-light .theme-switch-thumb {
    transform: translateX(20px);
}

/* Light theme (Ikariam-ish) */

body.theme-light {
    background: radial-gradient(circle at top, #fdf6e3 0, #f6e8c8 45%, #f1ddba 100%);
    color: var(--text);
}

/* override main color variables in light mode */
body.theme-light {
    --text: #1f2933;
    --muted: #52606d;

    /* Optional: links */
    --link: #2b7bb9;
    --page-bg: radial-gradient(circle at top, #fdf6e3 0, #f6e8c8 45%, #f1ddba 100%);
    --sidebar-bg: linear-gradient(180deg, #f6e3b9 0%, #fbeed0 45%, #f5e0b8 100%);
    --main-bg: radial-gradient(circle at top left, #fffaf0 0, #f7ebcd 40%, #f2dfb5 100%);

    --surface-1: linear-gradient(145deg, #fff7e5, #fcecd0);
    --surface-2: radial-gradient(circle at top left, #fff7e5, #f5e2bb 70%);

    --border-strong: rgba(184, 134, 11, 0.45);
    --border-soft: rgba(184, 134, 11, 0.25);

    --hover-bg: rgba(255, 255, 255, 0.55);
    --hover-border: rgba(184, 134, 11, 0.35);

    --chip-bg: rgba(255, 250, 240, 0.85);

    --code-bg: #faf5e2;
    --table-head-bg: #f4e3c0;

    --panel-bg: rgba(255, 250, 240, 0.78);
}

/* main layout overrides */

body.theme-light .main {
    background: radial-gradient(circle at top left, #fffaf0 0, #f7ebcd 40%, #f2dfb5 100%);
}

body.theme-light .sidebar {
    background: linear-gradient(180deg, #f6e3b9 0%, #fbeed0 45%, #f5e0b8 100%);
    border-right-color: rgba(184, 134, 11, 0.35);
}

/* cards and sections */

body.theme-light .card,
body.theme-light .section {
    background: linear-gradient(145deg, #fff7e5, #fcecd0);
    border-color: rgba(184, 134, 11, 0.45);
    box-shadow: 0 10px 24px rgba(148, 81, 18, 0.18);
}

body.theme-light pre {
    background: #faf5e2;
    border-color: rgba(184, 134, 11, 0.4);
}

body.theme-light table th {
    background: #f4e3c0;
}

/* links */

body.theme-light a {
    color: #2b7bb9;
}

/* sidebar footer muted text contrast fix */

body.theme-light .sidebar-footer,
body.theme-light .muted {
    color: #6b7280;
}

body.theme-light .http-get {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(21, 128, 61, 0.55);
    color: #065f46; /* readable dark green */
}

body.theme-light .http-post {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(30, 64, 175, 0.55);
    color: #1e3a8a; /* readable dark blue */
}

.type-index {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.type-index a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
    font-size: 0.82rem;
}

.type-index a:hover {
    background: var(--hover-bg);
    border-color: var(--accent-border);
}

.type-section {
    scroll-margin-top: 16px;
}

.type-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.type-name {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.type-badges {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.type-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
}

.type-signature {
    margin: 8px 0 10px;
}

.type-signature code {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(31, 41, 55, 0.95);
    background: var(--code-bg);
    overflow-x: auto;
    font-size: 0.83rem;
}

.type-props table {
    margin-top: 8px;
}

.type-props th:nth-child(1) { width: 22%; }
.type-props th:nth-child(2) { width: 18%; }
.type-props th:nth-child(3) { width: 12%; }
.type-props th:nth-child(4) { width: 48%; }

.type-usedby {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--muted);
}

.http-method {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
    letter-spacing: 0.06em;
}

.http-get {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.12);
    color: rgba(187, 247, 208, 0.95);
}

.http-post {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.12);
    color: rgba(191, 219, 254, 0.95);
}

/* Right-side "On this page" navigation */

.toc {
    position: fixed;
    top: 20px;
    right: 18px;
    width: 260px;
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-subtle);
    z-index: 1200;
}

.toc-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-bottom: 8px;
}

.toc-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-link {
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--muted);
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.toc-link:hover {
    background: var(--hover-bg);
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.25);
}

.toc-link.active {
    background: var(--accent-soft);
    color: var(--text);
    border-color: var(--accent-border);
}

/* Hide TOC on small screens */

@media (max-width: 1100px) {
    .toc {
        display: none;
    }
}

.endpoint {
    scroll-margin-top: 18px;
}

.api-nav-group-title {
    margin: 10px 0 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    opacity: 0.9;
}

.api-nav-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.api-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--muted);
    font-size: 0.82rem;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.api-nav-link:hover {
    background: var(--hover-bg);
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.25);
}

.api-nav-link.active {
    background: var(--accent-soft);
    color: var(--text);
    border-color: var(--accent-border);
}

.api-method-pill {
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--chip-bg);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
    letter-spacing: 0.06em;
}

.nav-method-group {
    margin-top: 8px;
    
}

.nav-method-summary {
    cursor: pointer;
    user-select: none;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

/* Remove default triangle in WebKit */
.nav-method-summary::-webkit-details-marker {
    display: none;
}

.nav-method-summary:hover {
    background: var(--hover-bg);
    border-color: rgba(148, 163, 184, 0.18);
    color: var(--text);
}

.nav-method-group[open] .nav-method-summary {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.22);
    color: var(--text);
}

.nav-method-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0 0 0 10px;
    border-left: 1px solid rgba(148, 163, 184, 0.14);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-footer {
    margin-top: 26px;
    padding: 18px 18px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    box-shadow: var(--shadow-subtle);
}

.footer-top {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}

.footer-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 260px;
}

.footer-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.9), rgba(59, 130, 246, 0.5));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.footer-title {
    font-weight: 700;
    color: var(--text);
}

.footer-subtitle {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 2px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 16px;
    width: min(620px, 100%);
}

.footer-col-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 8px;
}

.footer-col a {
    display: block;
    font-size: 0.86rem;
    color: var(--text);
    text-decoration: none;
    padding: 4px 0;
    opacity: 0.9;
}

.footer-col a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--muted);
}

.footer-dot {
    margin: 0 6px;
    opacity: 0.6;
}

@media (max-width: 900px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
}

.footer-api-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.api-status-dot[data-status="ok"] {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.api-status-dot[data-status="degraded"] {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.api-status-dot[data-status="down"] {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}


.command-item.endpoint {
    display: block;
    padding: 18px;
}

.command-item.endpoint .command-name-header {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.command-item.endpoint .command-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.command-item.endpoint .command-path {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    word-break: break-word;
}

.command-item.endpoint .command-path::before {
    content: "URL ";
    display: inline-block;
    margin-right: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
}

.command-path-params-header,
.command-query-params-header,
.command-request-header,
.command-response-header {
    margin: 18px 0 10px;
    font-size: 0.98rem;
    font-weight: 650;
    color: var(--text);
}

.command-item.endpoint table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 6px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--surface-1);
}

.command-item.endpoint table th,
.command-item.endpoint table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: top;
    font-size: 0.9rem;
}

.command-item.endpoint table th {
    background: var(--table-head-bg);
    color: var(--text);
    font-weight: 650;
    font-size: 0.85rem;
}

.command-item.endpoint table tr:last-child td {
    border-bottom: none;
}

.command-item.endpoint table td:first-child {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: var(--text);
}

.command-request,
.command-response {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--code-bg);
    overflow-x: auto;
    white-space: pre;
    font-size: 0.88rem;
    line-height: 1.35;
}

.command-request {
    background: var(--surface-1);
}

.command-response {
    max-height: 420px;
    overflow: auto;
}

.command-item.endpoint + .command-item.endpoint {
    margin-top: 14px;
}

p {
    white-space: pre-line;
}