@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --text: #202122;
  --muted: #54595d;
  --line: #c8ccd1;
  --soft-line: #eaecf0;
  --panel: #f8f9fa;
  --chrome: #f6f6f6;
  --link: #3366cc;
  --visited: #6b4ba1;
  --stub: #d73333;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--chrome); }
body {
  margin: 0;
  color: var(--text);
  background: var(--chrome);
  font: 15px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--visited); }
a:hover { text-decoration: underline; }
a.stub, a.stub:visited { color: var(--stub); }
a.ext::after { content: "↗"; font-size: 0.8em; margin-left: 2px; color: var(--muted); }
img { image-rendering: pixelated; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------------------------------------- top bar */

.top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 160px; }
.logo:visited { color: var(--text); }
.logo:hover { text-decoration: none; }
.logo img { width: 36px; height: 36px; }
.logo img { width: 40px; height: 40px; image-rendering: auto; }
.wordmark { display: flex; flex-direction: column; gap: 3px; }
.wordmark b { font: 600 20px/1 var(--serif); letter-spacing: -0.01em; }
.wordmark small { font-size: 12px; line-height: 1; color: var(--muted); }
.menu { display: none; }

.search { position: relative; flex: 1; max-width: 520px; display: flex; }
.search input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #a2a9b1;
  border-right: 0;
  border-radius: 2px 0 0 2px;
  font: 15px var(--sans);
  color: var(--text);
  background: #fff;
}
.search input:focus { outline: none; border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.search button {
  width: 40px;
  height: 34px;
  border: 1px solid #a2a9b1;
  border-radius: 0 2px 2px 0;
  background: var(--panel) no-repeat center / 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%23202122' stroke-width='2'/%3E%3Cpath d='M12.5 12.5 18 18' stroke='%23202122' stroke-width='2'/%3E%3C/svg%3E");
  cursor: pointer;
}
.search button:hover { background-color: #fff; }
.results {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 10;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #a2a9b1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.results li a {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0 10px;
  padding: 7px 10px;
  color: var(--text);
}
.results li a:hover, .results li a[aria-selected="true"] { background: var(--soft-line); text-decoration: none; }
.results img, .results .blank { width: 32px; height: 32px; grid-row: span 2; }
.results .t { font-weight: 600; }
.results .t.stub { color: var(--stub); }
.results .x { grid-column: 2; color: var(--muted); font-size: 13px; line-height: 1.4; }
.results mark { background: none; color: var(--text); font-weight: 600; }
.results .none { padding: 10px; color: var(--muted); }

.user { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; white-space: nowrap; }
.user .me { color: var(--muted); }
.user form { margin: 0; }
.linklike { padding: 0; border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* ------------------------------------------------------------------------------------------------- layout */

.layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); max-width: 1500px; }
.side { padding: 18px 10px 40px 20px; font-size: 14px; }
.portlet { margin-bottom: 20px; }
.portlet h3 {
  margin: 0 0 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  font: 600 12px var(--sans);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.portlet ul { margin: 0; padding: 0; list-style: none; }
.portlet li { margin: 0; line-height: 1.35; }
.portlet li a { display: block; padding: 3px 0; }
.portlet a[aria-current="page"] { color: var(--text); font-weight: 600; }
.contents ul ul { padding-left: 12px; border-left: 1px solid var(--soft-line); margin: 2px 0 4px 2px; }

.page { min-width: 0; padding: 14px 24px 0 0; }
.tabs { display: flex; justify-content: space-between; align-items: flex-end; font-size: 14px; }
.tabs > div { display: flex; }
.tabs a {
  display: block;
  padding: 7px 12px 6px;
  margin-right: -1px;
  background: linear-gradient(#fff, #f3f4f6);
  border: 1px solid var(--line);
  border-bottom: 0;
}
.tabs a.sel { background: #fff; color: var(--text); position: relative; top: 1px; }
.tabs a:hover { text-decoration: none; background: #fff; }

.content {
  display: block;
  padding: 20px 28px 36px;
  background: #fff;
  border: 1px solid var(--line);
  min-height: 60vh;
}
.title {
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font: 400 32px/1.25 var(--serif);
}
.tagline { margin: 6px 0 16px; font-size: 13px; color: var(--muted); }
.foot { padding: 14px 4px 40px; font-size: 12px; color: var(--muted); }
.foot p { margin: 0 0 4px; }

/* ----------------------------------------------------------------------------------------------- the text */

.body { max-width: 1100px; }
.body::after { content: ""; display: table; clear: both; }
.body p, .body ul, .body ol { margin: 0 0 12px; }
.body ul, .body ol { padding-left: 1.6em; }
.body li { margin: 2px 0; }
.body h2 {
  margin: 26px 0 10px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  font: 400 24px/1.3 var(--serif);
  overflow: hidden;
}
.body h3 { margin: 20px 0 6px; font: 600 17px/1.4 var(--sans); }
.body h4 { margin: 16px 0 4px; font: 600 15px/1.4 var(--sans); }
.body blockquote { margin: 0 0 12px; padding: 4px 16px; border-left: 4px solid var(--soft-line); color: var(--muted); }
.body code { font: 13px var(--mono); padding: 1px 4px; background: var(--panel); border: 1px solid var(--soft-line); border-radius: 2px; }
.body pre { padding: 12px; background: var(--panel); border: 1px solid var(--soft-line); overflow-x: auto; }
.body pre code { padding: 0; border: 0; background: none; }
.body kbd { font: 12px var(--mono); padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; background: var(--panel); }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.body img:not(.ico) { max-width: 100%; }

.body table:not(.infobox) {
  margin: 8px 0 16px;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid #a2a9b1;
  font-size: 14px;
}
.body table:not(.infobox) th, .body table:not(.infobox) td { padding: 5px 10px; border: 1px solid #a2a9b1; text-align: left; vertical-align: top; }
.body table:not(.infobox) th { background: var(--soft-line); }
.body td[align="right"], .body th[align="right"] { text-align: right; }

/* Items in the text: the icon and the name. */
.item { white-space: nowrap; }
.item .ico { width: 20px; height: 20px; vertical-align: -4px; margin-right: 3px; }
ul.items { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0; }

/* The contents box, before the first section. */
.toc {
  display: inline-block;
  min-width: 220px;
  margin: 4px 0 12px;
  padding: 8px 14px 10px;
  background: var(--panel);
  border: 1px solid #a2a9b1;
  font-size: 14px;
}
#toc-title { margin: 0 0 4px; font-weight: 600; text-align: center; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 1px 0; }
.toc li.sub { padding-left: 18px; }
.toc .tn { color: var(--text); margin-right: 6px; }

/* The infobox: an item page's picture and facts, down the right. */
.infobox {
  float: right;
  clear: right;
  width: 280px;
  margin: 0 0 16px 20px;
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 13px;
  line-height: 1.45;
}
.infobox caption {
  padding: 6px 8px;
  border: 1px solid #a2a9b1;
  border-bottom: 0;
  background: #dfe4ea;
  font: 600 16px var(--sans);
}
.infobox .images { padding: 12px 8px; text-align: center; background: #fff; border-bottom: 1px solid #a2a9b1; }
.infobox figure { display: inline-block; margin: 4px 8px; vertical-align: top; }
.infobox figure img { width: 96px; height: 96px; }
.infobox td:only-child figure:only-child img { width: 128px; height: 128px; }
.infobox figcaption { font-size: 12px; color: var(--muted); max-width: 110px; }
.infobox th, .infobox td { padding: 4px 8px; text-align: left; vertical-align: top; border-top: 1px solid var(--soft-line); }
.infobox th { width: 38%; font-weight: 600; }
.infobox tr.sub th { background: var(--soft-line); text-align: center; width: auto; }
.infobox code { font-size: 12px; background: none; border: 0; padding: 0; word-break: break-all; }

/* "Not written yet" and other notices. */
.ambox {
  margin: 0 0 16px;
  padding: 8px 12px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-left: 8px solid #e8a33d;
}
.ambox p { margin: 0; }
.note {
  margin: 12px 0 16px;
  padding: 10px 14px 2px;
  background: #eaf3ff;
  border: 1px solid #a3c4ee;
}
.note .label { margin: 0 0 6px; font-weight: 600; }

/* Lists of pages, and the main page's portals. */
ul.pages { list-style: none; padding: 0; columns: 2 260px; column-gap: 32px; }
ul.pages li { break-inside: avoid; margin: 0 0 6px; }
ul.pages .ico { width: 22px; height: 22px; vertical-align: -6px; margin-right: 6px; }
ul.pages .sum { display: block; margin-left: 28px; color: var(--muted); font-size: 13px; }

.welcome {
  margin: 4px 0 18px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: center;
}
.welcome p { margin: 0; color: var(--muted); }
.welcome .hello { font: 400 26px/1.3 var(--serif); color: var(--text); margin-bottom: 4px; }
.welcome .hello b { font-weight: 600; }
.portals { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.portal { border: 1px solid var(--line); background: #fff; }
.body .portal h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  background: var(--soft-line);
  border-bottom: 1px solid var(--line);
  font: 600 17px var(--sans);
}
.portal h2 .ico { width: 24px; height: 24px; }
.body .portal ul { margin: 0; padding: 10px 14px 12px 30px; }

/* ------------------------------------------------- recipes and guides, in the game's own inventory colours */

.recipes { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 18px; }
.recipe { margin: 0; font-size: 13px; }
.recipe figcaption { margin-bottom: 4px; font-weight: 600; color: var(--muted); }
.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #c6c6c6;
  border: 2px solid;
  border-color: #fff #555 #555 #fff;
  box-shadow: 0 0 0 1px #000;
  border-radius: 3px;
}
.ins, .outs { display: flex; gap: 2px; }
.grid { display: grid; grid-template-columns: repeat(var(--w), 36px); gap: 0; }
.slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #8b8b8b;
  border: 2px solid;
  border-color: #373737 #fff #fff #373737;
}
.outs .slot { width: 44px; height: 44px; }
a.slot:hover { background: #a0a0a0; text-decoration: none; }
.slot img { width: 32px; height: 32px; }
.slot em { font: 9px/1.1 var(--sans); font-style: normal; color: #fff; text-align: center; padding: 1px; overflow: hidden; }
.slot b, .slot i {
  position: absolute;
  right: 1px;
  bottom: -1px;
  font: 700 14px var(--sans);
  font-style: normal;
  color: #fff;
  text-shadow: 2px 2px 0 #3f3f3f;
}
.slot i { top: -1px; bottom: auto; font-size: 11px; }
.slot.tag::before { content: ""; position: absolute; left: 2px; top: 2px; width: 5px; height: 5px; background: #e8a33d; }
.arrow {
  position: relative;
  width: 30px;
  height: 8px;
  margin: 0 12px 0 2px;
  background: #8b8b8b;
  flex: none;
}
.arrow::after {
  content: "";
  position: absolute;
  right: -10px;
  top: -7px;
  border-left: 12px solid #8b8b8b;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}
.meta { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 4px; color: var(--muted); }

.guide { margin: 12px 0 18px; border: 1px solid var(--line); background: var(--panel); }
.guide figcaption { padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--soft-line); font-weight: 600; }
.guide figcaption span { margin-right: 6px; padding: 0 6px; border-radius: 2px; background: #e8a33d; color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; vertical-align: 1px; }
.guide ol { margin: 10px 0; padding-left: 2.4em; }
.ingame { margin: 0; padding: 6px 12px 8px; border-top: 1px solid var(--soft-line); font-size: 13px; color: var(--muted); }

/* Writers only: the page's writing notes, fetched when signed in. */
.writer-notes {
  margin: 0 0 16px;
  padding: 8px 12px;
  background: #fef6e7;
  border: 1px solid #e8c37d;
  font-size: 14px;
}
.writer-notes .label { margin: 0 0 4px; font-weight: 600; }
.writer-notes .label a { margin-left: 8px; font-weight: 400; }
.writer-notes div { white-space: pre-wrap; }

/* ------------------------------------------------------------------------------------------------- smaller */

@media (max-width: 1000px) {
  .infobox { width: 240px; }
}

@media (max-width: 860px) {
  .top { gap: 12px; padding: 0 12px; height: 56px; }
  .menu {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
  }
  .menu span, .menu span::before, .menu span::after { display: block; width: 18px; height: 2px; background: var(--text); position: relative; }
  .menu span::before, .menu span::after { content: ""; position: absolute; left: 0; }
  .menu span::before { top: -6px; }
  .menu span::after { top: 6px; }
  .logo { min-width: 0; }
  .wordmark small { display: none; }
  .search { max-width: none; }
  .user { font-size: 13px; gap: 10px; }
  .user .me { display: none; }
  .layout { display: block; }
  .side {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    z-index: 20;
    width: 260px;
    overflow-y: auto;
    padding: 16px;
    background: #fff;
    border-right: 1px solid var(--line);
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.12);
    transform: translateX(-105%);
    transition: transform 0.15s;
  }
  body.menu-open .side { transform: none; }
  .page { padding: 10px 0 0; }
  .tabs { padding: 0 8px; overflow-x: auto; }
  .content { padding: 16px 16px 28px; border-left: 0; border-right: 0; }
  .title { font-size: 27px; }
  .infobox { float: none; width: 100%; margin: 0 0 16px; }
  .foot { padding: 12px 16px 32px; }
  .body table:not(.infobox) { display: block; overflow-x: auto; }
  .flow { flex-wrap: wrap; }
}

/* Boxes in the text sit beside the infobox rather than running under it. */
.guide, .note, .ambox, .writer-notes, .welcome { display: flow-root; }
