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

:root {
    --bg:         #0d0d0d;
    --bg2:        #141414;
    --bg3:        #1a1a1a;
    --border:     #222;
    --border2:    #2a2a2a;
    --text:       #ebebeb;
    --text2:      #999;
    --text3:      #555;
    --accent:     #22c55e;
    --accent-bg:  rgba(34,197,94,.1);
    --blue:       #60a5fa;
    --orange:     #fbbf24;
    --mono:       'JetBrains Mono', monospace;
    --sans:       'Figtree', sans-serif;
    --nav:        52px;
    --sb:         252px;
    --toc:        216px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.72; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p { color: var(--text2); margin-bottom: 10px; }
p:last-child { margin-bottom: 0; }

/* NAV */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    height: var(--nav); display: flex; align-items: center;
    padding: 0 20px; gap: 28px;
    background: rgba(13,13,13,.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-logo img { height: 20px; opacity: .85; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text3); padding: 5px 10px; border-radius: 6px; transition: color .14s, background .14s; }
.nav-links a:hover { color: var(--text2); background: var(--bg3); }
.nav-links a.active { color: var(--text); }
.nav-right { margin-left: auto; }
.nav-btn { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text3); background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; transition: color .14s, border-color .14s; }
.nav-btn:hover { color: var(--text2); border-color: var(--border2); }
.nav-btn .mi { font-size: 14px; font-family: 'Material Symbols Outlined', sans-serif; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20; }

/* LAYOUT */
.wiki-layout { display: grid; grid-template-columns: var(--sb) 1fr var(--toc); margin-top: var(--nav); min-height: calc(100vh - var(--nav)); }

/* SIDEBAR */
.sidebar { position: sticky; top: var(--nav); height: calc(100vh - var(--nav)); overflow-y: auto; border-right: 1px solid var(--border); padding: 20px 0 48px; }
.sidebar::-webkit-scrollbar { width: 0; }

.sb-banner { width: 100%; height: 120px; object-fit: cover; object-position: center; display: block; background: var(--bg3); }
.sb-name { font-size: 13.5px; font-weight: 600; padding: 12px 16px 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }

.sb-section { padding: 0 8px; margin-bottom: 4px; }
.sb-label { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text3); padding: 6px 8px 3px; }
.sb-link { display: flex; align-items: center; gap: 7px; padding: 5.5px 8px; border-radius: 5px; font-size: 13px; color: var(--text2); transition: color .12s, background .12s; }
.sb-link:hover { color: var(--text); background: var(--bg2); }
.sb-link.active { color: var(--accent); background: var(--accent-bg); }
.sb-link .mi { font-size: 14px; opacity: .55; font-family: 'Material Symbols Outlined', sans-serif; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20; }

/* CONTENT */
.content { padding: 0 48px 80px; min-width: 0; }

/* PLUGIN BANNER COVER */
.plugin-cover { position: relative; margin: 0 -48px 36px; height: 280px; overflow: hidden; background: var(--bg2); }
.plugin-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.plugin-cover-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 10%, rgba(13,13,13,.7) 60%, rgba(13,13,13,.95) 100%); }
.plugin-cover-meta { position: absolute; bottom: 18px; left: 32px; right: 32px; }
.plugin-cover-meta h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.8); margin-bottom: 6px; }
.plugin-cover-meta .tags { display: flex; gap: 5px; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text3); margin-top: 24px; margin-bottom: 0; }
.breadcrumb a:hover { color: var(--text2); }
.breadcrumb .mi { font-size: 13px; font-family: 'Material Symbols Outlined', sans-serif; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20; }

.lead { font-size: 14.5px; color: var(--text2); line-height: 1.65; margin-bottom: 32px; max-width: 620px; }

/* TAGS */
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.tag-green  { background: rgba(34,197,94,.12);  color: #4ade80; border: 1px solid rgba(34,197,94,.18); }
.tag-blue   { background: rgba(96,165,250,.12); color: #93c5fd; border: 1px solid rgba(96,165,250,.18); }
.tag-orange { background: rgba(251,191,36,.12); color: #fcd34d; border: 1px solid rgba(251,191,36,.18); }
.tag-gray   { background: rgba(120,120,120,.1); color: #9ca3af; border: 1px solid rgba(120,120,120,.15); font-family: var(--mono); font-size: 10.5px; }

/* SECTIONS */
.doc-section { margin-bottom: 44px; }
.doc-section h2 { font-size: 18px; font-weight: 700; letter-spacing: -.015em; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 9px; margin-bottom: 16px; }
.doc-section h3 { font-size: 14.5px; font-weight: 600; color: var(--text); margin: 20px 0 7px; }
.doc-section h4 { font-size: 13px; font-weight: 600; color: var(--text2); margin: 14px 0 5px; }
.doc-section ul, .doc-section ol { color: var(--text2); padding-left: 18px; }
.doc-section li { margin-bottom: 4px; }
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* CODE */
code { font-family: var(--mono); font-size: 12.5px; background: var(--bg3); border: 1px solid var(--border2); padding: 1px 5px; border-radius: 4px; color: #86efac; }
.code-block { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 10px 0 16px; }
.code-hdr { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; background: var(--bg3); border-bottom: 1px solid var(--border); }
.code-lang { font-family: var(--mono); font-size: 10.5px; color: var(--text3); letter-spacing: .05em; text-transform: uppercase; }
.code-copy { background: none; border: none; cursor: pointer; font-size: 11.5px; color: var(--text3); font-family: var(--sans); padding: 1px 6px; border-radius: 4px; transition: color .12s; }
.code-copy:hover { color: var(--text2); }
.code-block pre { padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.62; color: var(--text2); }
.code-block pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.yk { color: #93c5fd; }  /* yaml key */
.yv { color: #86efac; }  /* yaml value */
.ys { color: #fde68a; }  /* yaml string */
.yc { color: #444; font-style: italic; }  /* yaml comment */
.yp { color: #f9a8d4; }  /* yaml punctuation */

/* CALLOUTS */
.callout { display: flex; gap: 11px; padding: 12px 15px; border-radius: 8px; margin: 14px 0; }
.callout-tip  { background: rgba(34,197,94,.06);  border: 1px solid rgba(34,197,94,.15); }
.callout-info { background: rgba(96,165,250,.06); border: 1px solid rgba(96,165,250,.15); }
.callout-warn { background: rgba(251,191,36,.06); border: 1px solid rgba(251,191,36,.15); }
.callout-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.callout p { font-size: 13.5px; line-height: 1.6; margin: 0; }
.callout p strong { color: var(--text); }

/* COMMAND BLOCKS */
.cmd { background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; margin: 8px 0; overflow: hidden; }
.cmd-hdr { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: var(--bg3); border-bottom: 1px solid var(--border); gap: 12px; }
.cmd-name { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.cmd-perm { font-family: var(--mono); font-size: 11px; color: var(--text3); background: var(--bg); border: 1px solid var(--border); padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
.cmd-desc { padding: 10px 14px; font-size: 13.5px; color: var(--text2); }

/* PERMISSION TABLE */
.perm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 10px 0; }
.perm-table th { text-align: left; padding: 7px 11px; background: var(--bg3); color: var(--text3); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); }
.perm-table td { padding: 8px 11px; border-bottom: 1px solid var(--border); vertical-align: top; }
.perm-table tr:last-child td { border-bottom: none; }
.perm-table td:first-child { font-family: var(--mono); font-size: 12px; color: #86efac; }
.perm-table td:nth-child(2) { color: var(--text3); font-size: 12px; }
.perm-table td:last-child { color: var(--text2); }

/* TOC */
.toc { position: sticky; top: var(--nav); height: calc(100vh - var(--nav)); overflow-y: auto; padding: 28px 16px 40px 12px; }
.toc::-webkit-scrollbar { width: 0; }
.toc-label { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text3); padding-left: 8px; margin-bottom: 8px; }
.toc-link { display: block; padding: 4px 8px; border-left: 2px solid transparent; font-size: 12.5px; color: var(--text3); border-radius: 0 4px 4px 0; transition: color .12s, border-color .12s; }
.toc-link:hover { color: var(--text2); }
.toc-link.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-bg); }

/* WIKI INDEX */
.index-hero { text-align: center; padding: 56px 24px 0; max-width: 580px; margin: 0 auto 44px; }
.index-hero h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; margin-bottom: 10px; }
.index-hero p { font-size: 15px; }
.search-wrap { position: relative; margin: 22px auto 0; max-width: 380px; }
.search-wrap .mi-s { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 15px; font-family: 'Material Symbols Outlined', sans-serif; font-variation-settings: 'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 20; pointer-events: none; }
.search-input { width: 100%; background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; padding: 9px 14px 9px 36px; font-family: var(--sans); font-size: 13.5px; color: var(--text); outline: none; transition: border-color .14s; }
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text3); }

.index-main { max-width: 820px; margin: 0 auto; padding: 0 24px 80px; }
.section-label { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; margin-top: 28px; }

/* PLUGIN GRID CARDS */
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 10px; }
.pc { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; transition: border-color .14s, transform .14s; cursor: pointer; }
.pc:hover { border-color: var(--border2); transform: translateY(-1px); }
.pc.soon { opacity: .45; pointer-events: none; }
.pc-banner { width: 100%; height: 120px; object-fit: cover; object-position: center; display: block; background: var(--bg3); }
.pc-body { padding: 13px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.pc-body h3 { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; }
.pc-body p { font-size: 12.5px; color: var(--text3); line-height: 1.5; flex: 1; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.badge-soon { font-size: 10px; font-weight: 700; background: var(--bg3); color: var(--text3); border: 1px solid var(--border2); padding: 1px 6px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }

/* QUICK LINKS */
.quick-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.qcard { display: flex; align-items: center; gap: 7px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 7px 12px; font-size: 13px; color: var(--text2); transition: color .12s, border-color .12s; }
.qcard:hover { color: var(--text); border-color: var(--border2); }
.qcard .mi { font-size: 15px; color: var(--accent); font-family: 'Material Symbols Outlined', sans-serif; font-variation-settings: 'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 20; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

@media (max-width: 1100px) { .wiki-layout { grid-template-columns: var(--sb) 1fr; } .toc { display: none; } }
@media (max-width: 720px) { .wiki-layout { grid-template-columns: 1fr; } .sidebar { display: none; } .content { padding: 0 18px 60px; } .plugin-cover { margin: 0 -18px 28px; height: 160px; } }
