/* ============================================================
   ONY WIKI — STYLES
   Colors: #c9a227 (gold), #0a1628 (navy), #0d2137 (panel)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:          #060e1d;
    --bg-panel:    #0a1628;
    --bg-card:     #0d2137;
    --bg-code:     #071120;
    --accent:      #c9a227;
    --accent-dim:  #a07e1a;
    --accent-glow: rgba(201,162,39,.18);
    --text:        #d8e4f0;
    --text-muted:  #6b8299;
    --text-dim:    #4a6175;
    --border:      rgba(201,162,39,.14);
    --border-dim:  rgba(255,255,255,.06);
    --sidebar-w:   260px;
    --topbar-h:    56px;
    --radius:      10px;
    --radius-sm:   6px;
    --shadow:      0 4px 24px rgba(0,0,0,.45);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: #e5bc42; }
code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: .875em;
    background: var(--bg-code);
    color: var(--accent);
    padding: .12em .4em;
    border-radius: 4px;
}

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,162,39,.3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,162,39,.55); }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.sidebar-header {
    padding: 20px 16px 14px;
    border-bottom: 1px solid var(--border-dim);
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.logo-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--text);
}

/* Search */
.search-wrap {
    position: relative;
    padding: 12px 12px 8px;
    flex-shrink: 0;
}

.search-wrap input {
    width: 100%;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 32px 7px 30px;
    color: var(--text);
    font-size: .8rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}

.search-wrap input:focus { border-color: var(--accent); }
.search-wrap input::placeholder { color: var(--text-dim); }

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1rem;
    pointer-events: none;
    margin-top: 2px;
}

.search-kbd {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: .65rem;
    padding: 1px 5px;
    border-radius: 4px;
    pointer-events: none;
}

/* Nav */
.nav {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0 12px;
}

.nav-section {
    padding: 10px 0 2px;
}

.nav-label {
    display: block;
    padding: 0 16px 4px;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.nav-link {
    display: block;
    padding: 5px 16px;
    font-size: .82rem;
    color: var(--text-muted);
    border-radius: 0;
    transition: color .15s, background .15s;
    border-left: 2px solid transparent;
    margin-left: 0;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(201,162,39,.07);
    text-decoration: none;
}

.nav-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-glow);
    font-weight: 500;
}

/* ── NAV ACCORDION CATEGORIES ────────────────────────────── */
.nav-category {
    border: none;
    margin: 2px 0;
}

.nav-cat-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 6px 16px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
    transition: color .15s, background .15s;
    border-radius: 0;
}

.nav-cat-summary::-webkit-details-marker { display: none; }
.nav-cat-summary::marker { display: none; }

.nav-cat-summary:hover {
    color: var(--text-muted);
    background: rgba(201,162,39,.05);
}

.nav-cat-arrow {
    flex-shrink: 0;
    transition: transform .2s ease;
    color: var(--text-dim);
}

.nav-category[open] > .nav-cat-summary .nav-cat-arrow {
    transform: rotate(90deg);
}

.nav-cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cat-dot-general { background: #4f8aff; }
.cat-dot-fun     { background: #ff69b4; }
.cat-dot-mod     { background: #e05c5c; }
.cat-dot-admin   { background: var(--accent); }
.cat-dot-owner   { background: #9b59b6; }

.nav-cat-count {
    margin-left: auto;
    font-size: .63rem;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    padding: 1px 7px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text-dim);
}

.nav-cat-items {
    padding-bottom: 4px;
}

.nav-cat-items .nav-link {
    padding-left: 30px;
    font-size: .8rem;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-dim);
    font-size: .7rem;
    color: var(--text-dim);
    flex-shrink: 0;
}

/* ── TOPBAR (mobile) ─────────────────────────────────────── */
.topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    z-index: 200;
    align-items: center;
    padding: 0 14px;
    gap: 12px;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
}

.menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: .25s;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: .95rem;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}

.topbar-img { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); }

.topbar-search { flex: 1; }
.topbar-search input {
    width: 100%;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    color: var(--text);
    font-size: .8rem;
    font-family: inherit;
    outline: none;
}

/* ── OVERLAY (mobile) ────────────────────────────────────── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99;
    opacity: 0;
    transition: opacity .3s;
}

/* ── MAIN ────────────────────────────────────────────────── */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
}

.content-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 40px 80px;
}

/* Pages */
.page { display: none; }
.page.active { display: block; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 60px 40px;
    border-bottom: 1px solid var(--border-dim);
}

.hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(201,162,39,.13) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e5bc42 0%, #c9a227 50%, #a07e1a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -.02em;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 420px;
}

.hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
}

.badge-gold {
    background: var(--accent);
    color: #0a1628;
}

.badge-outline {
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
}

.hero-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    font-family: inherit;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #0a1628;
}
.btn-primary:hover { background: #e5bc42; color: #060e1d; transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.btn-discord {
    background: #5865f2;
    color: #fff;
    border: none;
}
.btn-discord:hover { background: #4752c4; color: #fff; transform: translateY(-1px); }

/* ── FEATURE GRID ────────────────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 40px 0;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: border-color .2s, transform .2s;
}

.feature-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
}

.feature-icon { font-size: 1.6rem; margin-bottom: 10px; }
.feature-card h3 { font-size: .92rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.feature-card p { font-size: .8rem; color: var(--text-muted); line-height: 1.55; }

/* Category overview */
.category-overview { margin: 10px 0 0; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 18px 12px;
    text-align: center;
    transition: border-color .2s, transform .2s;
}

.cat-card:hover { border-color: var(--border); transform: translateY(-2px); }
.cat-icon { font-size: 1.5rem; }
.cat-card strong { font-size: .82rem; color: var(--text); white-space: nowrap; }
.cat-count { font-size: .72rem; color: var(--text-dim); }

@media (max-width: 600px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Category accent borders */
.cat-general { border-top: 3px solid #4f8aff; }
.cat-fun     { border-top: 3px solid #ff69b4; }
.cat-mod     { border-top: 3px solid #e05c5c; }
.cat-admin   { border-top: 3px solid var(--accent); }
.cat-owner   { border-top: 3px solid #9b59b6; }

/* ── STEPS ───────────────────────────────────────────────── */
.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 28px 0;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--border);
}

.step {
    display: flex;
    gap: 18px;
    padding: 0 0 28px;
    position: relative;
}

.step:last-child { padding-bottom: 0; }

.step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.step-body h3 { font-size: .95rem; font-weight: 600; margin-bottom: 6px; padding-top: 7px; }
.step-body p { font-size: .83rem; color: var(--text-muted); line-height: 1.6; }

/* ── DISCORD COMMAND PREVIEW ─────────────────────────────── */
.dc-preview {
    background: #1e1f22;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 28px;
    font-family: var(--font-mono);
}

.dc-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.dc-slash {
    font-size: 1.4rem;
    font-weight: 900;
    color: #5865f2;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.dc-cmd-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dc-cmd-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
}

.dc-cmd-desc {
    font-size: .78rem;
    color: #b5bac1;
    font-family: var(--font-sans);
    font-weight: 400;
}

/* Options list */
.dc-opts {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.dc-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px;
    transition: background .1s;
}

.dc-opt:hover { background: rgba(255,255,255,.03); }

.dc-opt-type {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    min-width: 28px;
    text-align: center;
}

.dc-t-user { background: rgba(88,101,242,.25); color: #8891f5; }
.dc-t-str  { background: rgba(87,242,135,.15); color: #57f287; }
.dc-t-int  { background: rgba(254,231,92,.15); color: #fee75c; }
.dc-t-bool { background: rgba(235,87,87,.15);  color: #eb5757; }
.dc-t-ch   { background: rgba(88,101,242,.2);  color: #a0a8f9; }
.dc-t-sub  { background: rgba(201,162,39,.2);  color: var(--accent); }

.dc-opt-name {
    font-size: .82rem;
    font-weight: 600;
    color: #e3e5e8;
    min-width: 100px;
}

.dc-opt-req {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #ed4245;
    background: rgba(237,66,69,.12);
    border-radius: 3px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.dc-opt-opt {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #72767d;
    flex-shrink: 0;
}

.dc-opt-desc {
    font-size: .78rem;
    color: #72767d;
    font-family: var(--font-sans);
}

/* Footer badges */
.dc-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    flex-wrap: wrap;
}

.dc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .7rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border-radius: 4px;
    padding: 3px 8px;
}

.dc-badge-perm {
    background: rgba(237,66,69,.13);
    color: #f5888a;
    border: 1px solid rgba(237,66,69,.2);
}

.dc-badge-none {
    background: rgba(87,242,135,.1);
    color: #57f287;
    border: 1px solid rgba(87,242,135,.18);
}

.dc-badge-eph {
    background: rgba(88,101,242,.14);
    color: #8891f5;
    border: 1px solid rgba(88,101,242,.22);
}

/* ── COMMAND PAGES ───────────────────────────────────────── */
.page-header { margin-bottom: 32px; }

.cmd-header {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-dim);
    margin-bottom: 24px;
}

.cmd-category {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 99px;
    margin-bottom: 10px;
}

.cmd-category.cat-general { background: rgba(79,138,255,.15); color: #6ea8ff; border: 1px solid rgba(79,138,255,.25); }
.cmd-category.cat-fun { background: rgba(255,105,180,.12); color: #ff8ec7; border: 1px solid rgba(255,105,180,.22); }
.cmd-category.cat-mod { background: rgba(224,92,92,.12); color: #f08080; border: 1px solid rgba(224,92,92,.22); }
.cmd-category.cat-admin { background: rgba(201,162,39,.14); color: var(--accent); border: 1px solid var(--border); }
.cmd-category.cat-owner { background: rgba(155,89,182,.12); color: #be83e6; border: 1px solid rgba(155,89,182,.22); }

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em;
    margin-bottom: 8px;
}

.page-desc {
    font-size: .92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Command meta row */
.cmd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    padding: 7px 13px;
    font-size: .78rem;
}

.meta-label { color: var(--text-dim); }
.meta-val { font-weight: 600; color: var(--text); }
.meta-val.perm { color: #f08080; }
.meta-val.log { color: var(--accent); }

/* Section titles */
.section-title {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 28px 0 12px;
}

/* Code blocks */
.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border-dim);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    overflow-x: auto;
    margin-bottom: 10px;
}

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

/* Options table */
.opts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    margin: 4px 0 16px;
}

.opts-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-code);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.opts-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-dim);
    color: var(--text-muted);
    vertical-align: top;
}

.opts-table tr:last-child td { border-bottom: none; }
.opts-table tr:hover td { background: rgba(255,255,255,.02); }
.opts-table td:first-child code { font-size: .82rem; }

/* Pills */
.pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 600;
}

.pill-yes { background: rgba(46,204,113,.15); color: #5de68a; border: 1px solid rgba(46,204,113,.25); }
.pill-no  { background: rgba(107,130,153,.1); color: var(--text-dim); border: 1px solid var(--border-dim); }

/* Info boxes */
.info-box {
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: .83rem;
    line-height: 1.6;
    margin: 16px 0;
}

.info-box strong { display: block; margin-bottom: 4px; }

.info-gold {
    background: rgba(201,162,39,.1);
    border: 1px solid rgba(201,162,39,.3);
    color: #d4b03a;
}

.info-muted {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    color: var(--text-muted);
}

/* Subcommand blocks */
.subcmd {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    transition: border-color .2s;
}

.subcmd:hover { border-color: var(--border); }
.subcmd h3 { font-size: .9rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.subcmd p { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; }
.subcmd p:last-child { margin-bottom: 0; }

/* ── CHANGELOG / NEW UPDATES ─────────────────────────────── */
.changelog {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cl-entry {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-dim);
    position: relative;
}
.cl-entry:last-child { border-bottom: none; }

.cl-date {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
    align-items: flex-start;
}

.cl-tag {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
}
.cl-tag-new     { background: rgba(88,166,255,.15); color: #58a6ff; border: 1px solid rgba(88,166,255,.3); }
.cl-tag-old     { background: rgba(120,120,120,.12); color: #888; border: 1px solid rgba(120,120,120,.25); }
.cl-tag-improve { background: rgba(201,162,39,.12); color: #c9a227; border: 1px solid rgba(201,162,39,.3); }
.cl-tag-fix     { background: rgba(46,204,113,.12); color: #5de68a; border: 1px solid rgba(46,204,113,.25); }

.cl-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.cl-tab {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-dim);
    background: transparent;
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.cl-tab:hover {
    background: rgba(201,162,39,.08);
    color: #c9a227;
    border-color: rgba(201,162,39,.3);
}
.cl-tab.active {
    background: rgba(201,162,39,.15);
    color: #c9a227;
    border-color: rgba(201,162,39,.5);
}

.cl-when {
    font-size: .75rem;
    color: var(--text-dim);
}

.cl-body { min-width: 0; }

.cl-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.cl-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cl-list li {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.55;
    padding-left: 14px;
    position: relative;
}
.cl-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-dim);
    font-size: .75rem;
}

@media (max-width: 600px) {
    .cl-entry { grid-template-columns: 1fr; gap: 8px; }
}

/* ── BADGES PAGE ─────────────────────────────────────────── */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.badge-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: border-color .2s, transform .2s;
}

.badge-card:hover { border-color: var(--border); transform: translateY(-2px); }

.badge-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.badge-rarity-exclusive { background: rgba(155,89,182,.2);  border: 2px solid rgba(155,89,182,.5); }
.badge-rarity-rare      { background: rgba(201,162,39,.15); border: 2px solid rgba(201,162,39,.4); }
.badge-rarity-uncommon  { background: rgba(88,166,255,.15); border: 2px solid rgba(88,166,255,.35); }
.badge-rarity-common    { background: rgba(255,105,180,.12); border: 2px solid rgba(255,105,180,.3); }

.badge-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.badge-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

.badge-rarity {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    width: fit-content;
}

.rarity-exclusive { background: rgba(155,89,182,.2);  color: #be83e6;  border: 1px solid rgba(155,89,182,.35); }
.rarity-rare      { background: rgba(201,162,39,.14); color: var(--accent); border: 1px solid var(--border); }
.rarity-uncommon  { background: rgba(88,166,255,.14); color: #6ea8ff;  border: 1px solid rgba(88,166,255,.28); }
.rarity-common    { background: rgba(255,105,180,.12); color: #ff8ec7; border: 1px solid rgba(255,105,180,.25); }

.badge-img { width: 34px; height: 34px; object-fit: contain; }

.badge-how { font-size: .78rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.badge-how strong { color: var(--text); }

/* ── SEARCH RESULTS ──────────────────────────────────────── */
.search-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 14px 18px;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
    text-align: left;
    color: var(--text);
    font-family: inherit;
    font-size: .88rem;
}

.search-item:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}

.search-item-name { font-weight: 600; }
.search-item-desc { color: var(--text-muted); font-size: .8rem; margin-top: 2px; }

.no-results {
    color: var(--text-dim);
    padding: 20px 0;
    font-size: .88rem;
}

/* ── NOT FOUND ───────────────────────────────────────────── */
.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.not-found {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.not-found-num {
    font-size: 6rem;
    font-weight: 700;
    color: var(--border);
    line-height: 1;
}

.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: #e5bc42; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .topbar { display: flex; }

    .sidebar {
        transform: translateX(-100%);
        top: 0;
        z-index: 300;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow);
    }

    .overlay.visible {
        display: block;
        opacity: 1;
    }

    .main {
        margin-left: 0;
        padding-top: var(--topbar-h);
    }

    .content-wrap { padding: 32px 20px 60px; }
    .hero { padding: 40px 20px; }
    .hero-title { font-size: 2.2rem; }

    .search-kbd { display: none; }
}

@media (max-width: 560px) {
    .feature-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.8rem; }
    .page-title { font-size: 1.5rem; }
    .opts-table { font-size: .76rem; }
    .opts-table th, .opts-table td { padding: 8px 10px; }
    .cmd-meta { gap: 8px; }
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page.active { animation: fadeIn .2s ease forwards; }
.search-results { animation: fadeIn .15s ease forwards; }
