/* RWC Classic Wiki layout */
body.wiki-route {
  background: #081424;
  color: #d8e3f1;
}

body.wiki-route main.container.page {
  width: min(1500px, calc(100vw - 72px));
  max-width: none;
  margin: 20px auto;
  padding: 0;
}

body.wiki-route footer {
  display: none;
}

.wiki-shell {
  color: #d8e3f1;
}

.wiki-app {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: calc(100vh - 110px);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 22px;
  overflow: hidden;
  background: #0b1627;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.wiki-sidebar {
  background: #0b1728;
  border-right: 1px solid rgba(148, 163, 184, .15);
  min-width: 0;
}

.wiki-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 68px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(148, 163, 184, .15);
  font-weight: 900;
  letter-spacing: .02em;
}

.wiki-brand-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #60a5fa;
  background: rgba(37, 99, 235, .22);
  border: 1px solid rgba(96, 165, 250, .25);
}

.wiki-brand-title {
  color: #e5edf7;
  font-size: 1rem;
}

.wiki-mobile-tools {
  display: none;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.wiki-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: #101d31;
  color: #e5edf7;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
}

.wiki-sidebar-inner {
  height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 18px 14px 26px;
  scrollbar-color: #314766 transparent;
  scrollbar-width: thin;
}

.wiki-sidebar-label,
.wiki-eyebrow,
.wiki-toc-title {
  margin: 0 0 14px;
  color: #b8c7d9;
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.wiki-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wiki-nav-group {
  border-radius: 10px;
}

.wiki-nav-group-row,
.wiki-nav-single {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border-radius: 10px;
}

.wiki-nav-group-link,
.wiki-nav-single {
  min-width: 0;
  flex: 1 1 auto;
  color: #aab8ca;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 10px 12px;
}

.wiki-nav-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wiki-nav-main > span:last-child,
.wiki-nav-link {
  overflow-wrap: anywhere;
}

.wiki-nav-single.is-active,
.wiki-nav-group-row.is-active,
.wiki-nav-group-row.is-section-active {
  background: #12305b;
}

.wiki-nav-single.is-active,
.wiki-nav-group-row.is-active .wiki-nav-group-link,
.wiki-nav-group-row.is-section-active .wiki-nav-group-link,
.wiki-nav-link.is-active {
  color: #6bb6ff;
}

.wiki-nav-group-link:hover,
.wiki-nav-single:hover,
.wiki-nav-link:hover {
  color: #dcecff;
  background: rgba(37, 99, 235, .14);
}

.wiki-nav-toggle {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  color: #aab8ca;
  border-radius: 10px;
  background: rgba(21, 34, 53, .95);
  cursor: pointer;
}

.wiki-nav-toggle i {
  transition: transform .16s ease;
}

.wiki-nav-toggle.is-open i {
  transform: rotate(90deg);
}

.wiki-nav-children {
  margin: 2px 0 8px 20px;
  padding-left: 15px;
  border-left: 1px solid rgba(148, 163, 184, .14);
}

.wiki-nav-link {
  display: block;
  color: #aab8ca;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.18;
  padding: 8px 10px;
  border-radius: 8px;
}

.wiki-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #081424;
}

.wiki-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(148, 163, 184, .15);
  background: #0a1526;
}

.wiki-search {
  position: relative;
  width: min(520px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #93a4ba;
  background: #0c1729;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  padding: 0 12px;
  height: 44px;
}

.wiki-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #d8e3f1;
  outline: none;
}

.wiki-search kbd {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 6px;
  color: #8fa4bd;
  background: #121f33;
  padding: 2px 7px;
  font-size: .72rem;
}

.wiki-search-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  background: #0d192b;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
  overflow: hidden;
}

.wiki-search-results a,
.wiki-search-empty {
  display: flex;
  gap: 9px;
  padding: 10px 12px;
  color: #d8e3f1;
  text-decoration: none;
}

.wiki-search-results a:hover {
  background: rgba(37, 99, 235, .18);
}

.wiki-home-link,
.btn.ghost.wiki-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: #0d1728;
  color: #f3f7fb;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.wiki-article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  min-height: 0;
}

.wiki-content {
  min-width: 0;
  max-width: 860px;
  width: 100%;
  padding: 34px 34px 70px;
}

.wiki-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 26px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, .17);
}

.wiki-page-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #60a5fa;
  background: rgba(37, 99, 235, .22);
}

.wiki-content h1 {
  margin: 0;
  color: #e8f0fb;
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  line-height: 1.08;
}

.wiki-content h2,
.wiki-content h3,
.wiki-content h4 {
  color: #edf4ff;
  line-height: 1.25;
  margin: 28px 0 14px;
}

.wiki-content h2 {
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  font-size: 1.45rem;
}

.wiki-content h3 { font-size: 1.2rem; }
.wiki-content h4 { font-size: 1rem; }

.wiki-content p,
.wiki-content li {
  color: #d5dfeb;
  line-height: 1.72;
}

.wiki-content a {
  color: #77baff;
  text-decoration: none;
}

.wiki-content a:hover { text-decoration: underline; }

.wiki-content ul,
.wiki-content ol { padding-left: 1.35rem; }

.wiki-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.wiki-content figure {
  margin: 18px 0;
}

.wiki-content figure img,
.wiki-content > p > img:only-child {
  display: block;
  border: 1px solid rgba(148, 163, 184, .18);
  background: #101b2d;
  padding: 10px;
}

.wiki-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 9px;
  background: #121f33;
}

.wiki-content thead th {
  color: #ffed00;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .86rem;
  font-weight: 900;
  background: #101b2d;
}

.wiki-content th,
.wiki-content td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  border-right: 1px solid rgba(148, 163, 184, .10);
  text-align: left;
  vertical-align: middle;
  color: #dce7f3;
}

.wiki-content tr:last-child td { border-bottom: 0; }
.wiki-content th:last-child,
.wiki-content td:last-child { border-right: 0; }

.wiki-content blockquote,
.wiki-content pre {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  background: #101b2d;
  padding: 16px 18px;
}

.wiki-content pre {
  overflow-x: auto;
  color: #d8e3f1;
}

.wiki-toc {
  padding: 32px 20px;
  border-left: 1px solid rgba(148, 163, 184, .15);
  background: #0a1526;
  min-width: 0;
}

.wiki-toc a {
  display: block;
  color: #aab8ca;
  text-decoration: none;
  font-size: .83rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 14px;
}

.wiki-toc a:hover { color: #e8f0fb; }
.wiki-toc a.level-3 { padding-left: 8px; }
.wiki-toc a.level-4 { padding-left: 16px; }

.wiki-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 48px;
}

.wiki-page-card {
  display: block;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: #101b2d;
  color: #d8e3f1;
  text-decoration: none;
}

.wiki-page-card.is-next { text-align: right; }
.wiki-page-card span { display: block; color: #879ab3; font-size: .75rem; text-transform: uppercase; font-weight: 900; margin-bottom: 6px; }
.wiki-page-card strong { color: #e8f0fb; }

.wiki-icon::before { font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f02d"; }
.wiki-icon[data-icon="server"]::before { content: "\f233"; }
.wiki-icon[data-icon="download"]::before { content: "\f019"; }
.wiki-icon[data-icon="coin"]::before { content: "\f51e"; }
.wiki-icon[data-icon="crown"]::before { content: "\f521"; }
.wiki-icon[data-icon="cube"]::before { content: "\f1b2"; }
.wiki-icon[data-icon="hammer"]::before { content: "\f6e3"; }
.wiki-icon[data-icon="sword"]::before { content: "\f71c"; }
.wiki-icon[data-icon="shield"]::before { content: "\f132"; }
.wiki-icon[data-icon="book"]::before { content: "\f02d"; }
.wiki-icon[data-icon="music"]::before { content: "\f001"; }
.wiki-icon[data-icon="hat"]::before { content: "\f6e8"; }

@media (max-width: 1100px) {
  body.wiki-route main.container.page { width: min(100% - 24px, 100%); }
  .wiki-app { grid-template-columns: 1fr; }
  .wiki-sidebar { border-right: 0; border-bottom: 1px solid rgba(148, 163, 184, .15); }
  .wiki-mobile-tools { display: block; }
  .wiki-sidebar-inner { display: none; height: auto; max-height: 50vh; }
  .wiki-sidebar-inner.is-visible { display: block; }
  .wiki-article-wrap { grid-template-columns: 1fr; }
  .wiki-toc { display: none; }
}

@media (max-width: 720px) {
  body.wiki-route main.container.page { width: 100%; margin: 0; }
  .wiki-app { border-radius: 0; border-left: 0; border-right: 0; }
  .wiki-topbar { align-items: stretch; height: auto; flex-direction: column; padding: 16px; }
  .wiki-search { width: 100%; }
  .wiki-content { padding: 24px 18px 50px; }
  .wiki-page-header { align-items: flex-start; }
  .wiki-pagination { grid-template-columns: 1fr; }
}
