.wiki-page {
  --wiki-frame: 1240px;
  --wiki-side-gap: clamp(16px, 4vw, 56px);
  --wiki-surface: #fffcf5;
  --wiki-border: #dfd9c8;
  --wiki-muted: #46594b;
  --wiki-soft: #f2eddf;
  --wiki-moss: #274d3a;
  --wiki-pale: #f7f3e8;
  background: var(--wiki-pale);
  color: #273a2e;
  font-size: 17px;
}

.wiki-page .site-footer {
  overflow-wrap: anywhere;
}

.wiki-page [hidden] {
  display: none !important;
}

.wiki-page :focus-visible {
  outline: 3px solid #9a5419;
  outline-offset: 3px;
}

.wiki-page :where([id]) {
  scroll-margin-block-start: 96px;
}

.wiki-visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wiki-page .wiki-header {
  gap: clamp(12px, 3vw, 32px);
  min-block-size: 67px;
  padding-block: max(9px, env(safe-area-inset-top)) 9px;
  background: #243d31;
  backdrop-filter: none;
}

.wiki-header .site-nav {
  justify-content: center;
}

.wiki-header .header-tools {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

.wiki-header .language-switch select {
  min-block-size: 44px;
  max-inline-size: 100%;
  padding-inline: 9px;
}

.wiki-header .menu-toggle {
  min-inline-size: 44px;
  min-block-size: 44px;
}

.wiki-header :focus-visible {
  outline-color: #f7cb80;
}

.wiki-page .wiki-hero {
  padding-block: 0;
  border-block-end: 1px solid var(--wiki-border);
  background: #f1ebdc;
}

.wiki-page :is(.wiki-header, .wiki-hero, .wiki-shell) {
  padding-left: max(var(--wiki-side-gap), env(safe-area-inset-left));
  padding-right: max(var(--wiki-side-gap), env(safe-area-inset-right));
}

.wiki-page .wiki-hero-inner {
  max-inline-size: var(--wiki-frame);
  margin-inline: auto;
  padding-block: 15px;
  gap: clamp(20px, 4vw, 72px);
}

.wiki-page[data-wiki-view="overview"] .wiki-hero {
  background: #f0ead9;
}

.wiki-page[data-wiki-view="overview"] .wiki-hero-inner {
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  padding-block: clamp(30px, 4.5vw, 64px);
}

.wiki-hero .wiki-hero-copy {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 410px);
  gap: 8px 24px;
}

.wiki-page[data-wiki-view="search"] .wiki-hero-copy,
.wiki-page[data-wiki-view="overview"] .wiki-hero-copy {
  display: block;
}

.wiki-welcome h1 {
  max-inline-size: 17ch;
  margin: 0;
  color: #273d30;
  font: 700 clamp(38px, 5.1vw, 72px)/1.02 Georgia, serif;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

html[dir="rtl"] .wiki-welcome h1 {
  letter-spacing: normal;
}

.wiki-page .wiki-hero-lead {
  max-inline-size: 52ch;
  margin: 15px 0 0;
  color: var(--wiki-muted);
  font-size: clamp(16px, 1.65vw, 20px);
  line-height: 1.6;
}

.wiki-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-block: 21px 19px;
}

.wiki-page .button.dark {
  background: var(--wiki-moss);
  color: #fffdf5;
}

.wiki-page .button.dark:hover {
  background: #1b3c2a;
}

.wiki-page .wiki-hero-actions .button {
  min-block-size: 46px;
  padding: 10px 18px;
}

.wiki-action-link {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  min-block-size: 44px;
  color: var(--wiki-moss);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .22em;
}

.wiki-action-link:hover {
  color: #814713;
}

.wiki-direction {
  display: inline-block;
  flex: none;
  font-family: system-ui, sans-serif;
  font-weight: 500;
}

html[dir="rtl"] .wiki-direction {
  transform: scaleX(-1);
}

.wiki-page .wiki-search {
  width: 100%;
  max-width: 520px;
  min-block-size: 47px;
  margin: 0;
  border-color: #aaa898;
  border-radius: 12px;
  background: var(--wiki-surface);
  box-shadow: none;
}

.wiki-page .wiki-search input {
  min-height: 45px;
  min-block-size: 45px;
  padding-block: 8px;
  font-size: 16px;
}

.wiki-page .wiki-search button {
  min-inline-size: 42px;
  min-block-size: 42px;
}

.wiki-page .wiki-breadcrumbs {
  min-inline-size: 0;
  margin: 0;
  color: var(--wiki-muted);
  overflow-wrap: anywhere;
}

.wiki-page .wiki-breadcrumbs a {
  color: var(--wiki-moss);
  text-underline-offset: 3px;
}

.wiki-hero-loop {
  align-self: center;
  min-inline-size: 0;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #d9cfb8;
  border-radius: 20px;
  background: #fbf7ec;
}

.wiki-hero-loop h2,
.wiki-quick-answers h2,
.wiki-topic-explorer h2,
.wiki-guide-choices h2 {
  margin: 0 0 14px;
  color: #273d30;
  font: 700 clamp(24px, 3vw, 32px)/1.2 Georgia, serif;
}

.wiki-hero-loop ol,
.wiki-entry-grid,
.wiki-topic-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wiki-hero-loop a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-block-size: 58px;
  padding: 6px 9px;
  border-radius: 10px;
  color: #344638;
  font-weight: 720;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wiki-hero-loop li + li {
  border-block-start: 1px solid var(--wiki-border);
}

.wiki-hero-loop a:hover {
  background: #ebeede;
}

.wiki-loop-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.wiki-page .wiki-shell {
  grid-template-areas: "index content toc";
  grid-template-columns: 215px minmax(0, 1fr) 180px;
  align-items: start;
  gap: clamp(18px, 2.6vw, 36px);
  max-inline-size: calc(var(--wiki-frame) + 2 * var(--wiki-side-gap));
  padding-block: clamp(20px, 3.4vw, 42px) 74px;
}

.wiki-page[data-wiki-view="overview"] .wiki-shell,
.wiki-page[data-wiki-view="search"] .wiki-shell,
.wiki-page[data-wiki-view="loading"] .wiki-shell {
  grid-template-areas: "content";
  grid-template-columns: minmax(0, 1fr);
}

.wiki-page .wiki-content :is(h2, h3, h4) {
  overflow-wrap: anywhere;
}

.wiki-content .wiki-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-block-end: clamp(29px, 4vw, 46px);
}

.wiki-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-block-size: 174px;
  padding: 17px 17px 18px;
  border: 1px solid var(--wiki-border);
  border-radius: 15px;
  background: var(--wiki-surface);
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wiki-entry:hover,
.wiki-choice-grid a:hover {
  border-color: #8d9d85;
  background: #fffef9;
}

.wiki-entry-icon {
  display: grid;
  place-items: center;
  inline-size: 60px;
  block-size: 60px;
  margin-block-end: 13px;
  border-radius: 13px;
  background: #ece9d6;
}

.wiki-entry--guide .wiki-entry-icon { background: #e9edda; }
.wiki-entry--map .wiki-entry-icon { background: #e1efeb; }
.wiki-entry--army .wiki-entry-icon { background: #f4e7d4; }

.wiki-entry-icon img {
  width: 52px;
  height: 52px;
}

.wiki-entry h2,
.wiki-choice-grid h3 {
  margin: 0;
  color: #283e31;
  font: 700 clamp(18px, 2vw, 23px)/1.22 Georgia, serif;
}

.wiki-entry p,
.wiki-choice-grid p {
  margin: 7px 0 0;
  color: var(--wiki-muted);
  font-size: 17px;
  line-height: 1.5;
}

.wiki-entry > .wiki-direction {
  position: absolute;
  inset-block-start: 22px;
  inset-inline-end: 17px;
  color: var(--wiki-moss);
}

.wiki-page .wiki-topic-explorer {
  margin-block-end: clamp(28px, 4vw, 46px);
}

.wiki-page .wiki-topic-tabs {
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-color: var(--wiki-border);
  background: var(--wiki-soft);
}

.wiki-page .wiki-topic-tabs button {
  flex: 1 1 auto;
  min-block-size: 44px;
  padding-inline: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.wiki-page .wiki-topic-tabs button[aria-selected="true"] {
  border-color: var(--wiki-moss);
  background: var(--wiki-moss);
  box-shadow: none;
}

.wiki-page .wiki-topic-panels {
  padding: 14px;
  border-color: var(--wiki-border);
}

.wiki-topic-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
}

.wiki-topic-links a {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-block-size: 49px;
  padding: 7px 11px;
  border-radius: 9px;
  color: var(--wiki-moss);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wiki-topic-links a:hover {
  background: #edf0e3;
}

.wiki-quick-answers details {
  padding-inline: 16px;
  border-block-start: 1px solid var(--wiki-border);
}

.wiki-quick-answers details:last-child {
  border-block-end: 1px solid var(--wiki-border);
}

.wiki-quick-answers summary,
.wiki-step-details summary {
  padding-block: 12px;
  color: var(--wiki-moss);
  font-weight: 720;
  cursor: pointer;
}

.wiki-quick-answers details p {
  margin: 0 0 13px;
  color: var(--wiki-muted);
  line-height: 1.6;
}

.wiki-quick-answers > .wiki-action-link,
.wiki-guide-choices > .wiki-action-link {
  margin-block-start: 10px;
}

.wiki-page :is(.wiki-mobile-index, .wiki-local-toc) {
  position: sticky;
  top: 86px;
  max-block-size: calc(100dvh - 104px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--wiki-border);
  border-radius: 13px;
  background: var(--wiki-surface);
  scrollbar-width: thin;
}

.wiki-page .wiki-sidebar-inner {
  position: static;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.wiki-page :is(.wiki-sidebar-title, .wiki-local-toc-title) {
  display: list-item;
  margin: 0;
  padding: 13px;
  border: 0;
  color: #334b3c;
  font: 740 14px/1.45 system-ui, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

.wiki-page :is(.wiki-sidebar nav, .wiki-local-toc-list) {
  display: grid;
  gap: 2px;
  padding: 0 7px 8px;
}

.wiki-page :is(.wiki-sidebar nav a, .wiki-local-toc a) {
  min-block-size: 44px;
  padding: 7px 8px;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transform: none;
}

.wiki-page .wiki-sidebar nav a[aria-current="page"] {
  background: #e4ecdd;
  color: #1b3c28;
}

.wiki-page .wiki-section-head {
  align-items: flex-start;
  margin-block-end: 22px;
  padding: 0 0 20px;
  border: 0;
  border-block-end: 1px solid var(--wiki-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wiki-section-head h1,
.wiki-section-head h2 {
  margin: 0;
  color: #273d30;
  font: 700 clamp(29px, 4.4vw, 52px)/1.08 Georgia, serif;
  overflow-wrap: anywhere;
}

.wiki-page .wiki-section-head p {
  margin: 9px 0 0;
  color: var(--wiki-muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
}

.wiki-page .wiki-section-emblem {
  display: grid;
  flex: none;
  width: clamp(49px, 6vw, 72px);
  height: clamp(49px, 6vw, 72px);
  place-items: center;
  border: 1px solid #e0d4bc;
  border-radius: 13px;
  background: #f0e6d1;
  box-shadow: none;
}

.wiki-section-emblem img {
  inline-size: 78%;
  block-size: auto;
  object-fit: contain;
}

.wiki-page .wiki-start-timeline > .wiki-guide-step {
  display: grid;
  grid-template-columns: clamp(35px, 5vw, 50px) minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  max-width: none;
  padding: 17px 16px;
  border: 1px solid var(--wiki-border);
  border-radius: 13px;
  background: var(--wiki-surface);
}

.wiki-page .wiki-start-timeline {
  max-width: none;
  margin-inline-start: 31px;
}

.wiki-page .wiki-guide-step::before {
  display: none;
}

.wiki-page .wiki-start-marker {
  inset: 13px auto auto -32px;
  inline-size: 34px;
  block-size: 34px;
  border-width: 3px;
  border-color: var(--wiki-pale);
  background: var(--wiki-moss);
}

html[dir="rtl"] .wiki-page .wiki-start-marker {
  inset: 13px -32px auto auto;
}

.wiki-guide-icon,
.wiki-choice-grid img {
  width: 100%;
  max-width: 50px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.wiki-guide-step h2 {
  margin: 0;
  font: 700 clamp(19px, 2.2vw, 24px)/1.25 Georgia, serif;
}

.wiki-guide-step p {
  margin: 5px 0 0;
  color: var(--wiki-muted);
  line-height: 1.58;
}

.wiki-page .wiki-start-timeline .wiki-action-link {
  display: inline-flex;
  gap: .55em;
  margin: 1px 0 -8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 14px;
  transform: none;
}

.wiki-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
}

.wiki-choice-grid a {
  display: block;
  padding: 14px;
  border: 1px solid var(--wiki-border);
  border-radius: 12px;
  background: var(--wiki-surface);
  color: var(--wiki-moss);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wiki-choice-grid img {
  margin-block-end: 5px;
}

.wiki-choice-grid .wiki-direction {
  margin-block-start: 6px;
}

.wiki-page .wiki-roadmap article {
  background: var(--wiki-surface);
}

.wiki-roadmap article h2 {
  margin: 0;
  font: 700 clamp(21px, 3vw, 31px)/1.2 Georgia, serif;
}

.wiki-roadmap article > p {
  color: var(--wiki-muted);
  line-height: 1.6;
}

.wiki-step-details {
  margin-block: 10px;
  border-block: 1px solid var(--wiki-border);
}

.wiki-page .wiki-search-summary {
  margin-block-start: 0;
}

@media (max-width: 1239px) {
  .wiki-page .wiki-shell {
    grid-template-areas: "index toc" "index content";
    grid-template-columns: 210px minmax(0, 1fr);
    row-gap: 12px;
  }

  .wiki-page .wiki-local-toc {
    position: static;
    display: block;
    max-block-size: none;
  }
}

@media (max-width: 1050px) {
  .wiki-header .site-nav {
    inset-block-start: 100%;
  }
}

@media (max-width: 999px) {
  .wiki-page .wiki-shell {
    grid-template-areas: "index" "toc" "content";
    grid-template-columns: minmax(0, 1fr);
  }

  .wiki-page .wiki-mobile-index {
    position: static;
    max-block-size: none;
  }

  .wiki-page .wiki-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
}

@media (max-width: 670px) {
  .wiki-page[data-wiki-view="overview"] .wiki-hero-inner,
  .wiki-hero .wiki-hero-copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .wiki-page[data-wiki-view="overview"] .wiki-hero-inner {
    padding-block: 22px 17px;
  }

  .wiki-hero-actions {
    margin-block: 12px;
  }

  .wiki-hero-loop {
    padding: 12px;
    border-radius: 13px;
  }

  .wiki-hero-loop h2 {
    margin-block-end: 6px;
    font-size: 20px;
  }

  .wiki-hero-loop ol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .wiki-hero-loop li + li {
    border: 0;
  }

  .wiki-hero-loop a {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 4px;
    padding-inline: 3px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
  }

  .wiki-hero-loop .wiki-direction {
    display: none;
  }

  .wiki-loop-icon {
    width: 32px;
    height: 32px;
  }

  .wiki-content .wiki-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .wiki-entry {
    min-block-size: 146px;
    padding: 10px;
  }

  .wiki-entry-icon {
    inline-size: 47px;
    block-size: 47px;
    margin-block-end: 8px;
  }

  .wiki-entry-icon img {
    width: 36px;
    height: 36px;
  }

  .wiki-entry > .wiki-direction {
    inset-block-start: 14px;
    inset-inline-end: 10px;
  }

  .wiki-topic-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .wiki-page .wiki-section-head {
    display: flex;
    gap: 11px;
  }
}

@media (max-width: 480px) {
  .wiki-page .wiki-header {
    gap: 7px;
  }

  .wiki-header .header-tools {
    gap: 6px;
    min-inline-size: 0;
  }

  .wiki-header .language-switch {
    padding: 2px;
    min-inline-size: 0;
  }

  .wiki-header .language-switch select {
    width: min(112px, 31vw);
    padding: 5px 5px 5px 8px;
    font-size: 13px;
  }

  .wiki-header .brand {
    gap: 8px;
    font-size: 17px;
  }
}

@media (max-width: 285px) {
  .wiki-header .brand span {
    display: none;
  }

  .wiki-header .language-switch select {
    width: 102px;
  }

  .wiki-welcome h1 {
    font-size: 31px;
  }

  .wiki-page .wiki-section-head {
    display: grid;
    gap: 8px;
  }

  .wiki-page .wiki-section-head h1 {
    font-size: 26px;
  }

  .wiki-page .wiki-section-emblem {
    width: 40px;
    height: 40px;
  }

  .wiki-calculator-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wiki-field :is(input, select) {
    min-inline-size: 0;
  }

  .wiki-content .wiki-entry-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
