:root {
  color-scheme: dark;
  --bg: #0d1618;
  --panel: #122024;
  --panel-soft: #18292e;
  --paper: #f1f3ef;
  --muted: #a7aea9;
  --line: rgba(241, 243, 239, 0.13);
  --lime: #80d4d2;
  --cyan: #66cbd0;
  --coral: #ef7962;
  --focus: #ffd667;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 90px; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--paper); background: var(--bg); font-family: Inter, system-ui, sans-serif; line-height: 1.65; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button,
input { font: inherit; letter-spacing: 0; }

a:focus-visible,
input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.state-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(239, 121, 98, 0.18); }
.state-dot.is-up { background: var(--lime); box-shadow: 0 0 0 4px rgba(205, 234, 83, 0.18); }

.content-header,
.wiki-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 17, 21, 0.97);
  backdrop-filter: blur(14px);
  display: grid;
  align-items: center;
}

.content-header {
  padding: 0 max(22px, calc((100vw - var(--max)) / 2));
  grid-template-columns: auto auto 1fr auto;
  gap: 24px;
}
body[data-page="rankings"] .content-header { grid-template-columns: auto 1fr auto; }

.content-brand img,
.wiki-brand img { width: 112px; height: auto; }
.content-online { min-height: 36px; padding: 7px 11px; border: 1px solid rgba(102, 203, 208, 0.34); border-radius: 4px; display: flex; align-items: center; gap: 7px; color: #d7e7e5; font-size: 11px; }
.content-online strong { color: var(--cyan); font-size: 13px; }
.content-header nav { display: flex; justify-content: center; gap: 28px; }
.content-header nav a { font-size: 13px; font-weight: 800; }
.content-header nav a:hover,
.content-header nav a.active { color: var(--lime); }
.content-login { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; }

.rankings-page {
  width: min(var(--max), calc(100% - 44px));
  margin: 0 auto;
  padding: 90px 0 110px;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
  gap: 90px;
  align-items: start;
}

.rankings-summary { position: sticky; top: 102px; }
.content-kicker { margin: 0; color: var(--cyan); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.rankings-summary h1 { margin: 10px 0 17px; font: 700 42px/1.14 Cinzel, serif; }
.rankings-summary > p:last-of-type { margin: 0; color: var(--muted); font-size: 15px; }
.rankings-summary dl { margin: 30px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }
.rankings-summary dl div { padding: 19px 0; border-bottom: 1px solid var(--line); }
.rankings-summary dl div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.rankings-summary dt { font: 700 24px Cinzel, serif; }
.rankings-summary dd { margin: 3px 0 0; color: #899a98; font-size: 10px; font-weight: 800; text-transform: uppercase; }

.ranking-table h2 { margin: 0 0 20px; font: 700 27px Cinzel, serif; }
.ranking-head,
.ranking-table li { display: grid; grid-template-columns: 70px minmax(0, 1fr) 90px; gap: 18px; align-items: center; }
.ranking-head { min-height: 48px; border-top: 1px solid var(--line); color: #778987; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ranking-head span:last-child { text-align: right; }
.ranking-table ol { margin: 0; padding: 0; list-style: none; }
.ranking-table li { min-height: 70px; border-top: 1px solid var(--line); }
.ranking-position { color: var(--cyan); font-weight: 800; }
.ranking-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.ranking-avatar { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid rgba(102, 203, 208, 0.42); border-radius: 50%; display: grid; place-items: center; color: var(--cyan); background: rgba(102, 203, 208, 0.08); font-size: 12px; font-weight: 800; }
.ranking-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Cinzel, serif; }
.ranking-level { text-align: right; font-size: 13px; font-weight: 700; }
.ranking-empty { display: block !important; padding: 24px 0; color: var(--muted); }
.content-footer { min-height: 88px; padding: 20px max(22px, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--line); background: #0c100e; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: var(--muted); font-size: 10px; }
.content-footer span { color: var(--paper); font: 700 12px Cinzel, serif; }

.wiki-header {
  height: 70px;
  padding: 0 22px;
  grid-template-columns: 270px minmax(260px, 520px) 1fr;
  gap: 28px;
}

.wiki-search { height: 42px; position: relative; }
.wiki-search input { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 0 14px; background: #202321; color: var(--paper); }
.wiki-search input::placeholder { color: #818984; }
.wiki-header nav { justify-self: end; display: flex; gap: 24px; color: #c2c8c4; font-size: 12px; font-weight: 700; }
.wiki-header nav a:hover { color: var(--lime); }

.wiki-layout { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 280px minmax(0, 780px) 220px; justify-content: center; }
.wiki-sidebar { position: sticky; top: 70px; height: calc(100vh - 70px); padding: 34px 24px 24px; border-right: 1px solid var(--line); background: #171a19; display: flex; flex-direction: column; }
.wiki-nav { display: grid; gap: 4px; }
.wiki-nav p { margin: 17px 10px 6px; color: #777f7a; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.wiki-nav p:first-child { margin-top: 0; }
.wiki-nav a { min-height: 38px; padding: 9px 11px; border-radius: 4px; color: #adb4af; font-size: 13px; font-weight: 650; }
.wiki-nav a:hover { background: #202522; color: var(--paper); }
.wiki-nav a.active { background: rgba(205, 234, 83, 0.08); color: var(--lime); }
.wiki-powered { margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: 5px; color: #89918c; font-size: 10px; }

.wiki-content { min-width: 0; padding: 52px 64px 100px; }
.wiki-content article { max-width: 720px; }
.wiki-breadcrumb { margin: 0 0 14px; color: var(--lime); font-size: 11px; font-weight: 700; }
.wiki-content h1 { margin: 0 0 20px; font-size: 42px; line-height: 1.15; letter-spacing: 0; }
.wiki-lead { margin: 0; color: #c2c8c4; font-size: 17px; line-height: 1.75; }
.wiki-content hr { height: 1px; margin: 28px 0; border: 0; background: var(--line); }
.wiki-content h2 { margin: 42px 0 14px; padding-top: 4px; font-size: 24px; line-height: 1.3; letter-spacing: 0; }
.wiki-content h3 { margin: 0 0 8px; font-size: 17px; }
.wiki-content p { color: #c0c7c2; }
.wiki-content li { margin: 8px 0; color: #c0c7c2; }
.wiki-feature-list { margin: 18px 0 0; padding-left: 22px; }
.wiki-feature-list li { margin: 14px 0; }
.wiki-feature-list strong { color: var(--paper); }
.wiki-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wiki-columns section { padding: 19px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.wiki-columns p { margin: 0; font-size: 13px; }
.wiki-notice { margin: 28px 0; padding: 17px 19px; border-left: 3px solid var(--cyan); background: rgba(102, 203, 208, 0.08); color: #c8d2d0; font-size: 14px; }
.wiki-notice strong { display: block; margin-bottom: 4px; color: var(--paper); }
.wiki-notice.warning { border-color: var(--coral); background: rgba(239, 121, 98, 0.08); }
.progression-list { margin: 22px 0; padding: 0; list-style: none; counter-reset: step; }
.progression-list li { padding: 15px 0 15px 50px; border-top: 1px solid var(--line); position: relative; counter-increment: step; }
.progression-list li::before { content: counter(step); position: absolute; top: 14px; left: 0; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--lime); font-size: 12px; font-weight: 800; }
.progression-list strong { display: block; color: var(--paper); }
.progression-list span { color: var(--muted); font-size: 13px; }

.wiki-content table { width: 100%; margin: 22px 0; border-collapse: collapse; font-size: 13px; }
.wiki-content th,
.wiki-content td { padding: 13px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.wiki-content th { background: var(--panel-soft); color: var(--paper); }
.wiki-content td { color: #bdc5bf; }
.wiki-next { margin-top: 54px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; justify-content: space-between; }
.wiki-next span { color: #7f8782; font-size: 11px; }
.wiki-next a { color: var(--paper); font-weight: 800; }

.wiki-toc { position: sticky; top: 70px; height: calc(100vh - 70px); padding: 52px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.wiki-toc p { margin: 0 0 5px; color: #777f7a; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.wiki-toc a { color: #929b95; font-size: 11px; }
.wiki-toc a:hover { color: var(--lime); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.wiki-search-hit { outline: 2px solid var(--lime); outline-offset: 4px; }

/* Shared blue-teal shell, with a quiet documentation reading surface. */
[hidden] { display: none !important; }
button, summary, select { font: inherit; }
button:focus-visible, summary:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--panel); }
.skip-link:focus { top: 10px; }
.wiki-sidebar { overflow-y: auto; background: #0f1a1e; }
.wiki-search input { background: #122024; padding-right: 45px; }
.wiki-search button { position: absolute; right: 5px; top: 5px; width: 34px; height: 32px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.wiki-search button:hover { background: var(--panel-soft); color: var(--paper); }
.wiki-nav a:hover { background: var(--panel-soft); }
.wiki-nav a.active { background: #1a343b; }
.wiki-nav p { color: #8dabb2; letter-spacing: 0; }
.wiki-content { padding-inline: 48px; }
.wiki-content h1 { font-size: 38px; letter-spacing: 0; }
.wiki-content h2 { margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 24px; letter-spacing: 0; }
.wiki-content p, .wiki-content li { color: #c2cdd0; }
.wiki-content .wiki-breadcrumb, .wiki-content a { color: var(--cyan); }
.wiki-content .wiki-lead { color: #9eb3ba; }
.wiki-toc { border-left: 0; overflow-y: auto; }
.wiki-toc a { color: #99aeb5; }
.wiki-toc a[aria-current] { color: var(--cyan); }
.wiki-table-scroll { overflow-x: auto; margin: 20px 0; }
.wiki-table-scroll table { margin: 0; display: table; }
.wiki-mobile-nav summary { display: none; cursor: pointer; color: var(--paper); }
.wiki-powered { margin-top: 24px; }
.docs-languages { display: flex; gap: 8px; }
.docs-languages a { padding: 2px 5px; border-radius: 3px; }
.docs-languages a[aria-current] { color: var(--cyan); background: #1a343b; }
.wiki-result { display: block; position: relative; padding-right: 28px; }
.wiki-result span { position: absolute; right: 0; top: 30px; }
.wiki-result h2 { font-size: 20px; }
.wiki-result p { font-size: 14px; }
.ranking-table h2, .rankings-summary h1, .ranking-identity strong { font-family: inherit; }
.rankings-page { display: block; width: min(1000px, calc(100% - 44px)); padding: 60px 0 90px; }
.rankings-summary { position: static; margin-bottom: 32px; }
.rankings-summary h1 { font-size: 36px; }
.ranking-tabs, .world-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.ranking-tabs a, .world-tabs a { border: 1px solid var(--line); border-radius: 6px; padding: 9px 16px; font-size: 14px; }
.ranking-tabs a[aria-current], .world-tabs a[aria-current] { background: #19353c; border-color: #40868f; color: #a9e5e6; }
.ranking-table { padding: 0; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.ranking-table table { width: 100%; border-collapse: collapse; text-align: left; }
.ranking-table th, .ranking-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
.ranking-table th { color: #8ea7af; font-size: 12px; font-weight: 500; }
.ranking-table th:last-child, .ranking-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ranking-table .ranking-position { width: 60px; }
.ranking-caption { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1050px) {
  .wiki-layout { grid-template-columns: 240px minmax(0, 760px); }
  .wiki-toc { display: none; }
  .wiki-header { grid-template-columns: 200px minmax(220px, 1fr) auto; }
}

@media (max-width: 800px) {
  .content-header { grid-template-columns: auto auto 1fr; gap: 12px; padding: 0 16px; }
  .content-header nav { order: 4; grid-column: 1 / -1; min-height: 44px; }
  .content-header { padding-top: 8px; }
  .rankings-page { grid-template-columns: 1fr; gap: 48px; padding-top: 120px; }
  .rankings-summary { position: static; }
  .wiki-header { height: auto; min-height: 112px; padding: 10px 16px; grid-template-columns: 1fr auto; }
  .wiki-search { grid-column: 1 / -1; grid-row: 2; }
  .wiki-layout { display: block; }
  .wiki-sidebar { position: static; width: 100%; height: auto; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .wiki-nav { display: grid; gap: 4px; max-height: 55vh; overflow-y: auto; padding-top: 12px; }
  .wiki-powered { display: none; }
  .wiki-mobile-nav summary { display: list-item; }
  .wiki-nav a { flex: 0 0 auto; }
  .wiki-content { padding: 42px 22px 80px; }
  .rankings-page { padding-top: 40px; }
  .ranking-table { padding: 12px; }
}

@media (max-width: 560px) {
  .content-online > span:last-child { display: none; }
  .content-header nav { gap: 18px; }
  .content-brand img { width: 86px; }
  .rankings-page { width: calc(100% - 28px); }
  .rankings-summary h1 { font-size: 34px; }
  .ranking-head,
  .ranking-table li { grid-template-columns: 42px minmax(0, 1fr) 70px; gap: 9px; }
  .ranking-avatar { width: 31px; height: 31px; flex-basis: 31px; }
  .wiki-header nav { gap: 14px; }
  .wiki-content h1 { font-size: 34px; }
  .wiki-columns { grid-template-columns: 1fr; }
  .wiki-content { padding-inline: 18px; }
  .wiki-content table { display: block; overflow-x: auto; }
}
