:root {
    --bg: #0b0b0c;
    --surface: #141416;
    --surface-2: #1d1d20;
    --border: #26262a;
    --text: #f4f4f6;
    --muted: #9b9ba3;
    --accent: #f6d400;
    --accent-ink: #121212;
    --accent-text: #f6d400;
    --ok: #4ade80;
    --err: #f87171;
    --radius: 16px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="light"] {
    --bg: #f6f6f3;
    --surface: #ffffff;
    --surface-2: #eeeee9;
    --border: #e2e2dc;
    --text: #16181b;
    --muted: #686c73;
    --accent: #f6d400;
    --accent-ink: #121212;
    --accent-text: #8f7500;
    --ok: #15803d;
    --err: #dc2626;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    transition: background-color .2s ease, color .2s ease;
}

.icon { display: inline-flex; width: 20px; height: 20px; flex: none; }
.icon svg { width: 100%; height: 100%; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand-icon { width: 28px; height: 28px; border-radius: 8px; }
.crumb-sep { color: var(--border); }
.crumb { color: var(--muted); font-size: 14px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); }

.icon-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.view { max-width: 1080px; margin: 0 auto; padding: 28px 20px 110px; }
.view-enter { animation: fade-up .18s ease; }
@keyframes fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.dot { display: inline-block; width: .16em; height: .16em; background: var(--accent); margin-left: 8px; }
.hero p { margin: 0 0 30px; color: var(--muted); }

.searchbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 26px;
    transition: border-color .15s ease;
}
.searchbar:focus-within { border-color: var(--accent-text); }
.searchbar .icon { color: var(--accent-text); }
.searchbar input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: 0;
    color: var(--text);
    font: inherit;
}
.searchbar input::placeholder { color: var(--muted); }

.section-title { display: flex; align-items: center; gap: 8px; margin: 30px 0 14px; font-size: 20px; font-weight: 700; }
.section-title:first-child { margin-top: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

.ep-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease;
}
.ep-card:hover { transform: translateY(-2px); border-color: var(--muted); }
.ep-thumb {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--accent-text);
    flex: none;
}
.ep-card .t { font-weight: 600; }
.ep-card .s { color: var(--muted); font-size: 13px; }
.ep-card .grow { flex: 1; min-width: 0; }

.method-chip {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--surface-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    flex: none;
}
.method-GET { color: var(--ok); }
.method-POST { color: var(--accent-text); }
.method-PUT, .method-PATCH { color: var(--accent-text); }
.method-DELETE { color: var(--err); }

.cat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease;
}
.cat-tile:hover { transform: translateY(-2px); border-color: var(--muted); }
.cat-circle {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--accent-text);
}
.cat-circle .icon { width: 26px; height: 26px; }
.cat-tile .label { font-weight: 600; }
.cat-tile .count { color: var(--muted); font-size: 12px; }

.bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 4px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color .15s ease, color .15s ease;
}
.nav-item .nav-label { display: none; }
.nav-item.active { background: var(--accent); color: var(--accent-ink); }
.nav-item.active .nav-label { display: inline; }
.nav-item:not(.active):hover { background: var(--surface-2); color: var(--text); }

.pg-grid { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.pg-side {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 170px);
    overflow: auto;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pg-side h2 { margin: 4px 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pg-cat-label { margin: 12px 4px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pg-ep-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.pg-ep-btn .method-chip { margin-left: 0; }
.pg-ep-btn:hover { background: var(--surface-2); color: var(--text); }
.pg-ep-btn.active { background: var(--surface-2); color: var(--text); }

.pg-main { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.pg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-head .method-chip { margin-left: 0; font-size: 12px; }
code.path { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-family: var(--mono); font-size: 13px; }
.resp-chip { padding: 4px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 600; }
.pg-desc { margin: 12px 0 18px; color: var(--muted); }

.field { margin-bottom: 14px; }
.field-label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.req { color: var(--err); }
.in-chip { padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.field input, .field select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease;
}
.field input:focus, .field select:focus { border-color: var(--accent-text); }
.field input.invalid { border-color: var(--err); }
.field-help { margin-top: 4px; color: var(--muted); font-size: 12px; }

.pg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent); }
.btn-small { padding: 6px 12px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: default; }

.resp { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.resp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.status-chip { padding: 4px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.status-ok { color: var(--ok); }
.status-err { color: var(--err); }
.resp-stat { color: var(--muted); font-size: 12px; }
pre.json {
    margin: 0;
    padding: 14px;
    max-height: 420px;
    overflow: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.code-example { margin-top: 16px; }
.code-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.code-title { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.code-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.code-tab {
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.code-tab:hover { background: var(--surface-2); color: var(--text); }
.code-tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
pre.code-block {
    margin: 0;
    padding: 14px;
    max-height: 320px;
    overflow: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.resp-img { display: block; max-width: 100%; max-height: 360px; border: 1px solid var(--border); border-radius: 12px; }

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 32px 20px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
}
.empty .icon { width: 28px; height: 28px; }

.doc-cat { margin-bottom: 30px; }
.doc-cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.doc-cat-head .cat-circle { width: 44px; height: 44px; }
.doc-cat-head .cat-circle .icon { width: 20px; height: 20px; }
.doc-cat-head h2 { margin: 0; font-size: 18px; }
.doc-cat-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.doc-endpoint { margin-bottom: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.doc-endpoint-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.doc-endpoint-head .method-chip { margin-left: 0; }
.doc-endpoint-head .btn { margin-left: auto; }
.doc-endpoint > p { margin: 0; color: var(--muted); font-size: 14px; }
.table-wrap { overflow-x: auto; }
table.params { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 13px; }
.params th { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.params td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.params tr:last-child td { border-bottom: 0; }
.params code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font-family: var(--mono); font-size: 12px; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.person-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.person-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 18px;
    font-weight: 800;
    flex: none;
}
.person-card .t { font-weight: 700; }
.person-card .s { color: var(--muted); font-size: 13px; }
.person-card .btn { margin-left: auto; }

.support-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.support-card .icon-wrap { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--accent-text); }
.support-card h3 { margin: 0; font-size: 16px; }
.support-card p { flex: 1; margin: 0; color: var(--muted); font-size: 13px; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-card { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

.skel { background: var(--surface); border-radius: 12px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}
.skel-hero { width: min(420px, 80%); height: 64px; margin-bottom: 12px; }
.skel-line { width: min(320px, 60%); height: 16px; margin-bottom: 26px; }
.skel-search { height: 52px; margin-bottom: 26px; }
.skel-card { height: 70px; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    z-index: 40;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: 260px;
    padding: 16px;
    overflow: auto;
    background: var(--surface);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform .2s ease;
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-overlay { opacity: 1; pointer-events: auto; }
.drawer a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none; }
.drawer a:hover { background: var(--surface-2); color: var(--text); }
.drawer h3 { margin: 18px 4px 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 860px) {
    .pg-grid { grid-template-columns: 1fr; }
    .pg-side { position: static; max-height: 260px; }
}

@media (max-width: 560px) {
    .crumb, .crumb-sep { display: none; }
    .view { padding: 20px 14px 110px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}


/* XivenApis refresh — restrained contrast, warm signal yellow, clearer hierarchy. */
:root {
    --bg: #090b10;
    --surface: #10141b;
    --surface-2: #171d27;
    --border: #252d39;
    --text: #f3f5f8;
    --muted: #9aa4b2;
    --accent: #f6d84d;
    --accent-ink: #11130d;
    --accent-text: #f6d84d;
    --ok: #79df9b;
    --err: #ff8585;
    --radius: 18px;
}

[data-theme="light"] {
    --bg: #f5f6f7;
    --surface: #ffffff;
    --surface-2: #edf0f2;
    --border: #dce1e7;
    --text: #111820;
    --muted: #626e7c;
    --accent: #d7ae00;
    --accent-ink: #10130c;
    --accent-text: #8a7200;
    --ok: #167744;
    --err: #c53838;
}

html { scroll-behavior: smooth; }
body {
    background:
        radial-gradient(ellipse at 50% -24rem, rgba(246, 216, 77, .09), transparent 60rem),
        var(--bg);
    font-size: 15px;
}
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

.topbar {
    gap: 14px;
    padding: 12px clamp(16px, 4vw, 54px);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(18px);
    border-color: color-mix(in srgb, var(--border) 80%, transparent);
}
.brand { gap: 10px; letter-spacing: -.02em; }
.brand-icon { width: 32px; height: 32px; border-radius: 10px; }
.brand-name { font-size: 15px; }
.brand-version {
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font: 700 10px/1 var(--mono);
    letter-spacing: .02em;
}
.crumb-sep { color: var(--border); }
.top-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.top-links a {
    padding: 8px 12px;
    border-radius: 9px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    transition: background .15s ease, color .15s ease;
}
.top-links a:hover, .top-links a.active { background: var(--surface-2); color: var(--text); }
.top-links a.active { box-shadow: inset 0 -2px var(--accent); }
.topbar-actions { margin-left: 6px; gap: 8px; }
.avatar { width: 34px; height: 34px; }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 11px; }
#menu-btn { display: none; }

.view { max-width: 1240px; padding: 36px 26px 100px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 18px; align-items: stretch; }
.hero-copy {
    position: relative;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 4% 0%, rgba(246, 216, 77, .12), transparent 50%),
        linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, var(--accent) 6%), var(--surface));
}
.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.live-dot, .response-indicator {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 13%, transparent);
}
.hero h1 {
    max-width: 720px;
    margin: 22px 0 15px;
    font-size: clamp(42px, 5.2vw, 68px);
    font-weight: 820;
    letter-spacing: -.065em;
    line-height: .99;
}
.accent-word { color: var(--accent-text); }
.hero p { max-width: 550px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.home-actions .btn { padding: 11px 16px; }
.btn-primary { box-shadow: 0 7px 20px color-mix(in srgb, var(--accent) 15%, transparent); }
.btn-quiet { background: transparent; }
.hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); }
.hero-metrics > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hero-metrics strong { color: var(--text); font-size: 19px; font-weight: 800; letter-spacing: -.04em; }
.hero-metrics span { color: var(--muted); font-size: 11px; line-height: 1.4; }

.hero-console {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(155deg, var(--surface-2), var(--surface) 38%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .17);
}
.console-top { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.console-lights { display: flex; gap: 5px; }
.console-lights i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #fa7777; }
.console-lights i:nth-child(2) { background: #f7c958; }
.console-lights i:nth-child(3) { background: #61d78b; }
.console-title { color: var(--muted); font-size: 12px; font-weight: 650; }
.console-version { margin-left: auto; padding: 4px 7px; border-radius: 6px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); font: 800 10px/1 var(--mono); }
.console-label, .console-response-title { margin-top: 18px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.hero-console pre.hero-code, .hero-console pre.hero-response {
    max-height: 150px;
    margin-top: 9px;
    padding: 14px;
    border-color: var(--border);
    background: #0b0e13;
    color: #e7edf5;
    font-size: 12px;
    line-height: 1.65;
}
[data-theme="light"] .hero-console pre.hero-code, [data-theme="light"] .hero-console pre.hero-response { background: #f5f7f8; color: #1d2732; }
.console-response-title { display: flex; align-items: center; gap: 9px; }
.response-indicator { width: 6px; height: 6px; }
.hero-console pre.hero-response { max-height: 240px; margin-top: 8px; color: #b8d4b8; }
.console-copy {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.console-copy:hover { border-color: var(--accent-text); color: var(--text); }
.console-copy .icon { width: 15px; height: 15px; }

.directory-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 58px 0 19px; }
.directory-head .eyebrow { margin-bottom: 9px; color: var(--accent-text); }
.directory-head h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 780; letter-spacing: -.045em; }
.directory-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.directory-count { padding: 8px 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.directory-search { margin-bottom: 25px; padding: 13px 16px; background: var(--surface); border-color: var(--border); }
.directory-search input { font-size: 14px; }
.section-title { font-size: 17px; letter-spacing: -.02em; }
.section-hint { margin: -6px 0 14px; color: var(--muted); font-size: 12px; }
.directory-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 33px 0 14px; }
.directory-title .section-title { margin: 0 0 10px; }
.text-link { color: var(--accent-text); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.ep-card { padding: 13px; background: color-mix(in srgb, var(--surface) 96%, white 4%); border-color: var(--border); }
.ep-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 10px 26px rgba(0, 0, 0, .12); }
.ep-thumb { width: 42px; height: 42px; border: 1px solid var(--border); }
.ep-card .t { font-size: 13px; }
.ep-card .s { margin-top: 2px; font-size: 11px; }
.method-chip { padding: 4px 7px; font-family: var(--mono); }
.cat-row { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; }
.cat-tile { padding: 16px 12px; border-radius: 15px; background: var(--surface); }
.cat-tile:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.cat-circle { width: 46px; height: 46px; border: 1px solid var(--border); }
.cat-circle .icon { width: 21px; height: 21px; }
.cat-tile .label { font-size: 13px; }
.cat-tile .count { font-size: 11px; }

.pg-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }
.pg-side, .pg-main, .doc-endpoint, .support-card, .person-card, .stat-card { border-color: var(--border); box-shadow: 0 10px 35px rgba(0, 0, 0, .06); }
.pg-main { padding: clamp(16px, 3vw, 26px); }
.doc-endpoint { padding: clamp(14px, 3vw, 20px); }
.doc-cat-head .cat-circle { border: 1px solid var(--border); }
.bottomnav { display: none; }
.toast { bottom: 24px; }

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-copy { min-height: 385px; }
    .hero-console { min-height: 360px; }
    .pg-grid { grid-template-columns: 1fr; }
    .pg-side { position: static; max-height: 245px; }
    .top-links { margin-left: auto; }
    .topbar-actions { margin-left: 0; }
}

@media (max-width: 640px) {
    .topbar { gap: 9px; padding: 10px 14px; }
    #menu-btn { display: grid; width: 34px; height: 34px; }
    .top-links, .crumb, .crumb-sep, .avatar, #support-btn { display: none; }
    .brand { gap: 8px; }
    .brand-icon { width: 29px; height: 29px; }
    .brand-name { font-size: 14px; }
    .topbar-actions { margin-left: auto; }
    .view { padding: 20px 14px 100px; }
    .hero-copy { min-height: 0; padding: 27px 22px; border-radius: 19px; }
    .hero h1 { margin: 20px 0 13px; font-size: clamp(40px, 11vw, 56px); }
    .hero p { font-size: 14px; }
    .hero-metrics { gap: 8px; margin-top: 27px; padding-top: 17px; }
    .hero-metrics strong { font-size: 17px; }
    .hero-metrics span { font-size: 10px; }
    .hero-console { min-height: 0; padding: 15px; border-radius: 19px; }
    .hero-console pre.hero-response { max-height: 180px; }
    .directory-head { align-items: start; flex-direction: column; margin: 42px 0 16px; }
    .directory-count { align-self: flex-start; }
    .directory-title { align-items: start; }
    .directory-title .text-link { margin-top: 5px; }
    .cat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-tile { padding: 14px 8px; }
    .card-grid { grid-template-columns: 1fr; }
    .bottomnav {
        display: flex;
        gap: 3px;
        padding: 7px 9px calc(7px + env(safe-area-inset-bottom));
        background: color-mix(in srgb, var(--surface) 93%, transparent);
        backdrop-filter: blur(16px);
    }
    .nav-item { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 10px; }
    .nav-item .nav-label, .nav-item.active .nav-label { display: inline; }
    .nav-item .icon { width: 18px; height: 18px; }
    .nav-item.active { background: color-mix(in srgb, var(--accent) 15%, var(--surface-2)); color: var(--accent-text); }
    .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
    .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-metrics > div:last-child { display: none; }
    .home-actions .btn { flex: 1; justify-content: center; padding-inline: 10px; font-size: 12px; }
    .directory-title { flex-direction: column; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}


/* XivenApis · violet identity, responsive details, and NoxCoreDev footer */
:root {
    --bg: #080810;
    --surface: #10101a;
    --surface-2: #191827;
    --border: #2a2840;
    --text: #f4f1ff;
    --muted: #a7a2ba;
    --accent: #9567ff;
    --accent-ink: #10091f;
    --accent-text: #bd9eff;
    --ok: #69e4b0;
    --err: #ff8298;
    --radius: 18px;
}

[data-theme="light"] {
    --bg: #f7f5fc;
    --surface: #ffffff;
    --surface-2: #f0ecf8;
    --border: #e1d9f1;
    --text: #191326;
    --muted: #696278;
    --accent: #7540df;
    --accent-ink: #ffffff;
    --accent-text: #6734cf;
    --ok: #147a58;
    --err: #c93659;
}

body {
    background:
        radial-gradient(ellipse at 70% -22rem, rgba(149, 103, 255, .15), transparent 52rem),
        radial-gradient(ellipse at 4% 34rem, rgba(54, 90, 196, .055), transparent 40rem),
        var(--bg);
}

.topbar {
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    border-color: color-mix(in srgb, var(--border) 82%, transparent);
}
.brand-icon, .avatar { object-fit: cover; }
.brand-icon { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 5px 18px rgba(106, 65, 222, .2); }
.avatar { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
.top-links a.active { box-shadow: inset 0 -2px var(--accent); }
.icon-btn:hover { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); }

.hero-copy {
    background:
        radial-gradient(ellipse at 10% 0%, rgba(149, 103, 255, .22), transparent 53%),
        radial-gradient(ellipse at 100% 100%, rgba(55, 82, 183, .12), transparent 52%),
        linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, #4d2a9e 12%), var(--surface));
    box-shadow: inset 0 1px rgba(255,255,255,.025), 0 22px 70px rgba(0,0,0,.12);
}
.hero-copy::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -115px;
    bottom: -130px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
    border-radius: 50%;
    box-shadow: 0 0 0 24px color-mix(in srgb, var(--accent) 5%, transparent), 0 0 0 48px color-mix(in srgb, var(--accent) 3%, transparent);
    pointer-events: none;
}
.hero-copy > * { position: relative; z-index: 1; }
.eyebrow { letter-spacing: .14em; }
.live-dot, .response-indicator { background: var(--ok); }
.accent-word { color: var(--accent-text); }
.hero-console { border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.console-version { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }

.feature-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.feature-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}
.feature-item > .icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    border-radius: 11px;
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    color: var(--accent-text);
}
.feature-item > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-item strong { font-size: 12px; font-weight: 750; }
.feature-item small { color: var(--muted); font-size: 10px; line-height: 1.4; }

.directory-head .eyebrow { color: var(--accent-text); }
.directory-count { border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.searchbar:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.ep-card:hover, .cat-tile:hover { border-color: color-mix(in srgb, var(--accent) 56%, var(--border)); }
.ep-thumb, .cat-circle { color: var(--accent-text); }
.method-POST, .method-PUT, .method-PATCH { color: var(--accent-text); }
.btn-primary { background: linear-gradient(135deg, #a378ff, #8050ed); border-color: #9164f2; color: #10091f; }
.btn-primary:hover { border-color: #ba9bff; filter: brightness(1.06); }
.code-tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.site-footer {
    position: relative;
    overflow: hidden;
    margin-top: 30px;
    padding: 52px clamp(20px, 5vw, 64px) 18px;
    border-top: 1px solid var(--border);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 86%, #301d62 14%), var(--bg));
}
.footer-glow {
    position: absolute;
    top: -140px;
    left: 46%;
    width: 480px;
    height: 220px;
    border-radius: 50%;
    background: rgba(131, 82, 255, .12);
    filter: blur(70px);
    pointer-events: none;
}
.footer-inner, .footer-bottom { position: relative; max-width: 1240px; margin: 0 auto; }
.footer-inner {
    display: grid;
    grid-template-columns: minmax(230px, 1.2fr) minmax(140px, .55fr) minmax(350px, 1.5fr);
    gap: clamp(28px, 5vw, 70px);
    padding-bottom: 38px;
}
.footer-brand-block { max-width: 370px; }
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}
.footer-logo {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
    border-radius: 14px;
    box-shadow: 0 7px 25px rgba(96, 54, 199, .2);
}
.footer-brand strong { display: block; font-size: 16px; letter-spacing: -.03em; }
.footer-brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.footer-brand-block > p { max-width: 310px; margin: 18px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.footer-domain {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font: 600 11px/1.2 var(--mono);
    text-decoration: none;
}
.footer-domain:hover { border-color: var(--accent-text); color: var(--accent-text); }
.footer-domain-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 12%, transparent); }
.footer-column h2 { margin: 3px 0 15px; color: var(--text); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.footer-column > a {
    display: block;
    width: fit-content;
    margin: 0 0 11px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    transition: color .15s ease, transform .15s ease;
}
.footer-column > a:hover { color: var(--accent-text); transform: translateX(2px); }
.footer-links { display: grid; grid-template-columns: repeat(4, 44px); gap: 10px; }
.footer-links a {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-2) 74%, transparent);
    color: var(--muted);
    text-decoration: none;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.footer-links a:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); }
.footer-links a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.footer-links svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}
.footer-bottom a { color: var(--accent-text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.footer-bottom a:hover { text-decoration: underline; }
.footer-credit { color: var(--accent-text); font-weight: 750; text-align: center; }

@media (max-width: 900px) {
    .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .footer-brand-block { grid-column: 1 / -1; max-width: 520px; }
    .footer-connect { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .feature-rail { grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
    .feature-item { padding: 11px 13px; }
    .feature-item > .icon { width: 33px; height: 33px; }
    .feature-item strong { font-size: 12px; }
    .feature-item small { font-size: 10px; }
    .site-footer { margin-top: 12px; padding: 36px 18px calc(92px + env(safe-area-inset-bottom)); }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px 18px; padding-bottom: 28px; }
    .footer-brand-block { grid-column: 1 / -1; }
    .footer-connect { grid-column: 1 / -1; }
    .footer-links { gap: 8px; }
    .footer-bottom { align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; }
    .footer-credit { order: 3; flex-basis: 100%; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .footer-column > a, .footer-links a { transition: none; }
}


/* Prominent XivenApis identity in the first viewport */
.hero-brand-lockup {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 17px;
    margin: 0 0 8px;
}
.hero-logo-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    flex: none;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border));
    border-radius: 30px;
    background: #090711;
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 7%, transparent), 0 16px 45px rgba(92, 48, 194, .28);
}
.hero-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-brand-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hero-brand-copy strong {
    color: var(--text);
    font-size: clamp(25px, 3vw, 35px);
    font-weight: 820;
    letter-spacing: -.055em;
    line-height: 1.05;
}
.hero-brand-copy > span {
    color: var(--accent-text);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
}
.hero-copy > .hero-brand-lockup + h1 { margin-top: 15px; }
.hero-copy > p { max-width: 570px; }

@media (max-width: 640px) {
    .hero-brand-lockup { gap: 14px; margin-bottom: 3px; }
    .hero-logo-frame { width: 90px; height: 90px; border-radius: 23px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 7%, transparent), 0 12px 32px rgba(92, 48, 194, .25); }
    .hero-brand-copy strong { font-size: 26px; }
    .hero-brand-copy > span { font-size: 9px; letter-spacing: .09em; }
    .hero-copy > .hero-brand-lockup + h1 { margin-top: 16px; font-size: clamp(37px, 10vw, 48px); }
}
