:root {
  --bg: #020a04;
  --panel: #0d1a09;
  --panel-alt: #12300e;
  --panel-soft: #0b1808;
  --border: #4b8f17;
  --border-strong: #8ecb2f;
  --text: #edf6ea;
  --text-soft: #d4e6c7;
  --text-dim: #95b07f;
  --accent: #9cff2f;
  --accent-2: #d4ff4d;
  --accent-3: #f0ff8f;
  --warning: #f0ea6a;
  --danger: #ff6f7d;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
  --radius: 18px;
  --mono: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
  --sans: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(8, 42, 12, 0.22) 0%, rgba(0, 0, 0, 0.08) 38%, rgba(0, 0, 0, 0.62) 76%),
    radial-gradient(ellipse at left center, rgba(58, 255, 64, 0.14) 0%, transparent 44%),
    radial-gradient(ellipse at right center, rgba(88, 255, 70, 0.12) 0%, transparent 42%),
    linear-gradient(180deg, #010a03 0%, #021107 42%, #020d05 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  opacity: 0.34;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0 28%, rgba(111, 255, 76, 0.10) 29%, transparent 37%),
    radial-gradient(ellipse at 50% 50%, transparent 0 36%, rgba(111, 255, 76, 0.06) 37%, transparent 46%),
    radial-gradient(ellipse at 16% 50%, rgba(94, 255, 72, 0.10) 0%, transparent 32%),
    radial-gradient(ellipse at 84% 50%, rgba(94, 255, 72, 0.10) 0%, transparent 32%);
  mix-blend-mode: screen;
}

body::after {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(88, 255, 66, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 255, 66, 0.22) 1px, transparent 1px);
  background-size: 92px 92px, 92px 92px;
  mask-image: radial-gradient(circle at center, transparent 0 24%, rgba(0, 0, 0, 0.9) 56%, rgba(0, 0, 0, 1) 100%);
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  color: #d9ffb1;
}

code,
pre {
  font-family: var(--mono);
}

.wiki-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 280px;
  gap: 28px;
  max-width: 1800px;
  margin: 0 auto;
  padding: 28px;
}

.wiki-sidebar,
.wiki-content-card,
.wiki-panel {
  background:
    linear-gradient(180deg, rgba(19, 45, 12, 0.92), rgba(8, 18, 7, 0.97)),
    radial-gradient(circle at top, rgba(230, 255, 70, 0.10), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.wiki-sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wiki-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
}

.wiki-brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(212, 255, 77, 0.18);
}

.wiki-sidebar__tagline {
  margin: 14px 0 18px;
  color: var(--text-soft);
  line-height: 1.55;
}

.wiki-sidebar__credit {
  margin: -6px 0 18px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.wiki-sidebar__credit a {
  color: var(--accent-2);
  font-weight: 700;
}

.wiki-search {
  display: block;
  margin-bottom: 18px;
}

.wiki-search span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wiki-search input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(8, 18, 7, 0.94);
  color: var(--text);
  outline: none;
}

.wiki-search input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(126, 255, 88, 0.14);
}

.wiki-nav {
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 4px;
}

.wiki-nav__group {
  margin-bottom: 12px;
  border: 1px solid rgba(142, 203, 47, 0.34);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 34, 10, 0.74), rgba(7, 15, 6, 0.78));
}

.wiki-nav__group summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wiki-nav__group summary::-webkit-details-marker {
  display: none;
}

.wiki-nav__group summary::after {
  content: "▾";
  color: var(--accent);
  font-size: 0.9rem;
  transition: transform 0.18s ease;
}

.wiki-nav__group:not([open]) summary::after {
  transform: rotate(-90deg);
}

.wiki-nav__items {
  padding: 0 10px 12px;
}

.wiki-nav__link {
  display: block;
  margin: 4px 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.wiki-nav__link:hover {
  background: linear-gradient(90deg, rgba(156, 255, 47, 0.14), rgba(212, 255, 77, 0.08));
  color: var(--text);
  transform: translateX(2px);
}

.wiki-nav__link.is-current {
  background: linear-gradient(90deg, rgba(164, 255, 48, 0.42), rgba(215, 255, 86, 0.24));
  color: #122105;
  border: 1px solid rgba(232, 255, 117, 0.30);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 180, 0.18);
}

.wiki-sidebar__meta {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(142, 203, 47, 0.28);
}

.wiki-sidebar__meta a {
  color: var(--text-dim);
}

.wiki-main {
  min-width: 0;
}

.wiki-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.wiki-breadcrumbs {
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wiki-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.85rem);
  line-height: 1.08;
}

.wiki-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wiki-actions a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: #132105;
  background: linear-gradient(180deg, rgba(154, 255, 57, 0.92), rgba(112, 194, 32, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.wiki-actions a:hover {
  border-color: #e7ff93;
  color: #091403;
}

.wiki-content-card {
  padding: 32px 36px;
}

.wiki-rightbar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.wiki-panel {
  padding: 20px;
}

.wiki-panel h2 {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wiki-panel__list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.65;
}

.wiki-support {
  overflow: hidden;
}

.wiki-support__text {
  margin: 0 0 12px;
  color: var(--text-soft);
  line-height: 1.5;
  text-align: center;
}

.wiki-support__button {
  margin: 0;
  text-align: center;
}

.wiki-support__button a {
  display: inline-block;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.wiki-support__button a:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.wiki-support__button img {
  width: 180px;
  max-width: 100%;
  height: auto;
}

.wiki-toc {
  display: grid;
  gap: 8px;
}

.wiki-toc a {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.wiki-toc a[data-level="3"] {
  margin-left: 14px;
  color: var(--text-dim);
}

.markdown-body {
  color: var(--text);
  line-height: 1.72;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: var(--text);
  line-height: 1.2;
  scroll-margin-top: 24px;
}

.markdown-body h1 {
  font-size: 2.2rem;
}

.markdown-body h2 {
  margin-top: 2.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(142, 203, 47, 0.42);
  font-size: 1.45rem;
  color: var(--accent-3);
}

.markdown-body h3 {
  margin-top: 1.8rem;
  font-size: 1.1rem;
  color: #ffffff;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body table,
.markdown-body pre,
.markdown-body blockquote {
  margin-top: 0;
  margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.45rem;
}

.markdown-body li + li {
  margin-top: 0.3rem;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(142, 203, 47, 0.38);
}

.markdown-body th,
.markdown-body td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(142, 203, 47, 0.22);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: linear-gradient(180deg, rgba(78, 132, 22, 0.88), rgba(41, 87, 15, 0.88));
  color: #f7ffe4;
}

.markdown-body tr:nth-child(even) td {
  background: rgba(15, 34, 11, 0.42);
}

.markdown-body code {
  padding: 0.16rem 0.4rem;
  border-radius: 8px;
  background: rgba(13, 33, 9, 0.92);
  color: #e3ff93;
  border: 1px solid rgba(142, 203, 47, 0.34);
}

.markdown-body pre {
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: #020a04;
  border: 1px solid rgba(142, 203, 47, 0.34);
}

.markdown-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: #e4f3df;
}

.markdown-body blockquote {
  margin-left: 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: rgba(176, 255, 63, 0.09);
  color: var(--text-soft);
}

.markdown-body img {
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(142, 203, 47, 0.32);
}

@media (max-width: 1480px) {
  .wiki-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .wiki-rightbar {
    display: none;
  }
}

@media (max-width: 1024px) {
  .wiki-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .wiki-sidebar,
  .wiki-rightbar {
    position: static;
    height: auto;
  }

  .wiki-topbar {
    flex-direction: column;
  }

  .wiki-content-card {
    padding: 22px;
  }
}
