/* Insanum Wiki: the structure of a game wiki (owner, 28/09): a top bar with the
   search and the menu and theme switches; the pages in groups on the left; the article with its path, title and parts;
   the index of the page and the invitation card on the right. Dark by default, light by choice; the Insanum gold marks
   links and the brand. */
:root {
  --bg: #0f1012; --side: #0f1012; --surface: #16171a; --surface-2: #1c1e22; --surface-3: #23262b; --line: #2a2d32; --line-soft: #202226;
  --text: #ececec; --text-soft: #c9ccd1; --muted: #9aa0a6; --link: #e2c06a; --link-hover: #f3d98f; --gold: #d4b25e;
  --btn-bg: #f2f2f2; --btn-text: #111214; --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --top: 64px; --side-w: 244px; --aside-w: 248px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; --mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ffffff; --side: #fafafa; --surface: #ffffff; --surface-2: #f4f4f5; --surface-3: #ececee; --line: #e3e3e6; --line-soft: #efeff1;
  --text: #17181b; --text-soft: #34363b; --muted: #62666d; --link: #8a6414; --link-hover: #6b4d0c; --gold: #a07a24;
  --btn-bg: #17181b; --btn-text: #ffffff; --shadow: 0 10px 30px rgba(0, 0, 0, .12);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); }
body.wk { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 var(--font); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
code { font: 13px var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; }
kbd { font: 600 10.5px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: var(--surface); }
.wk-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wk-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #111; padding: 8px 12px; border-radius: 6px; }
.wk-skip:focus { left: 8px; }
.wk-icon { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; flex: none; }
.wk-icon.big { width: 32px; height: 32px; }

/* buttons */
.wk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); color: var(--text); font: 600 13.5px var(--font); cursor: pointer; text-decoration: none; }
.wk-btn:hover { border-color: var(--gold); color: var(--text); text-decoration: none; }
.wk-btn.light { background: var(--btn-bg); color: var(--btn-text); border-color: transparent; }
.wk-btn.light:hover { filter: brightness(.92); color: var(--btn-text); }
.wk-btn.gold { background: linear-gradient(180deg, #e9cd7e, #b88a3b); color: #17130a; border-color: #d6b35f; }
.wk-btn.gold:hover { filter: brightness(1.06); color: #17130a; }
.wk-iconbtn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: var(--text-soft); cursor: pointer; }
.wk-iconbtn:hover { background: var(--surface-2); color: var(--text); }
.wk-iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* top bar */
.wk-top { position: sticky; top: 0; z-index: 40; height: var(--top);
  background: var(--bg); border-bottom: 1px solid var(--line); }
.wk-top-inner { display: flex; align-items: center; gap: 44px; width: 100%; max-width: 1480px; height: 100%; margin: 0 auto; padding: 0 24px; }
.wk-brand { display: flex; align-items: center; gap: 9px; color: var(--gold); text-decoration: none; flex: none; min-width: var(--side-w); }
.wk-brand:hover { text-decoration: none; color: var(--gold); }
.wk-brand img { display: block; width: 32px; height: 32px; }
.wk-name { font: 800 19px/1 var(--font); letter-spacing: .06em; }
.wk-name small { font-weight: 600; font-size: 11px; letter-spacing: .24em; color: var(--muted); margin-left: 6px; }
.wk-find { display: flex; align-items: center; gap: 10px; flex: 0 1 460px; min-width: 0; height: 38px; margin: 0; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--muted); font: 14px var(--font); cursor: pointer; text-align: left; }
.wk-find:hover { color: var(--text-soft); background: var(--surface-2); }
.wk-find span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wk-find svg, .wk-search form svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.wk-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.wk-burger { display: none; }

/* the frame */
.wk-shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--aside-w); gap: 0 44px; max-width: 1480px; margin: 0 auto; padding: 0 24px; }
body.wk-side-closed .wk-shell { grid-template-columns: 0 minmax(0, 1fr) var(--aside-w); }
body.wk-side-closed .wk-side { visibility: hidden; }
.wk-side { position: static; align-self: start; min-width: 0; background: var(--side); }
.wk-side-inner { padding: 22px 0 40px; }
.wk-toplinks { list-style: none; margin: 0 0 12px; padding: 0; }
.wk-toplinks a { display: flex; align-items: center; justify-content: space-between; padding: 5px 8px; border-radius: 6px; color: var(--text); font-size: 14px; }
.wk-toplinks a:hover { background: var(--surface-2); text-decoration: none; }
.wk-toplinks a[aria-current="page"] { color: var(--gold); }
.wk-group { margin: 0 0 8px; }
.wk-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 5px 4px 5px 0; font: 700 14px var(--font); color: var(--text); }
.wk-group summary::-webkit-details-marker { display: none; }
.wk-group summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-135deg); margin: 3px 6px 0 0; }
.wk-group:not([open]) summary::after { transform: rotate(45deg); margin-top: -3px; }
.wk-group ul { list-style: none; margin: 2px 0 6px 6px; padding: 0 0 0 10px; border-left: 1px solid var(--line); }
.wk-group a { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; color: var(--text-soft); font-size: 14px; line-height: 1.3; }
.wk-group a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.wk-group a[aria-current="page"] { color: var(--gold); background: var(--surface-2); font-weight: 600; }
.wk-group .wk-icon { width: 18px; height: 18px; }
.wk-out::after { content: "\2197"; font-size: 12px; color: var(--muted); margin-left: auto; }
.wk-backdrop { display: none; }
.wk-main { min-width: 0; padding: 26px 0 72px; }
.wk-aside { position: sticky; top: calc(var(--top) + 26px); align-self: start; padding-top: 26px; display: grid; gap: 22px; max-height: calc(100vh - var(--top) - 26px); overflow-y: auto; }
.wk-toc > p { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.wk-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.wk-toc li { counter-increment: toc; }
.wk-toc a { display: block; padding: 4px 0; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.wk-toc a::before { content: counter(toc) ". "; }
.wk-toc a:hover { color: var(--text); text-decoration: none; }
.wk-toc a.active { color: var(--gold); }
.wk-cta { display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: var(--surface-2); }
.wk-cta strong { font-size: 15px; line-height: 1.35; }
.wk-cta p { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.5; }
.wk-cta .wk-btn { justify-self: start; }

/* the article */
.wk-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.wk-crumbs > * + *::before { content: "\203A"; margin-right: 8px; color: var(--muted); }
.wk-crumbs a { color: var(--muted); }
.wk-crumbs [aria-current] { color: var(--text); }
.wk-article { max-width: 920px; }
.wk-head { margin: 0 0 22px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.wk-head h1 { margin: 0 0 8px; font: 800 clamp(28px, 3.6vw, 36px)/1.15 var(--font); letter-spacing: -.01em; }
.wk-lead { margin: 0; font-size: 16px; color: var(--text-soft); }
.wk-article section { margin: 0 0 30px; }
.wk-article h2 { margin: 0 0 14px; padding: 0 0 8px; font: 800 22px/1.25 var(--font); border-bottom: 1px solid var(--line); }
.wk-article h3 { margin: 18px 0 8px; font: 700 17px var(--font); }
.wk-article p { margin: 0 0 12px; color: var(--text-soft); }
.wk-article ul, .wk-article ol { margin: 0 0 12px; padding-left: 22px; color: var(--text-soft); }
.wk-article li { margin: 0 0 6px; }
.wk-article li::marker { color: var(--gold); }
.wk-article strong, .wk-article b { color: var(--text); }
.wk-relacionados { padding: 16px 18px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.wk-relacionados h2 { border: 0; padding: 0; font-size: 17px; }
.wk-note { padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: var(--surface-2); color: var(--text-soft); font-size: 14px; }
.wk-meta { margin: 26px 0 0; font-size: 12.5px; color: var(--muted) !important; }
.wk-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 0; }
.wk-pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-weight: 600; }
.wk-pager a:hover { border-color: var(--gold); text-decoration: none; }
.wk-pager a small { font-size: 12px; font-weight: 500; color: var(--muted); }
.wk-pager .next { text-align: right; }

/* tables */
.wk-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 16px; }
.wk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wk-table th { padding: 11px 12px; background: var(--surface-2); color: var(--text); font-weight: 700; text-align: center; white-space: nowrap; }
.wk-table th[data-sort] { cursor: pointer; user-select: none; }
.wk-table th[data-sort]::after { content: " \21C5"; color: var(--muted); font-weight: 400; }
.wk-table th[aria-sort="ascending"]::after { content: " \2191"; color: var(--gold); }
.wk-table th[aria-sort="descending"]::after { content: " \2193"; color: var(--gold); }
.wk-table td { padding: 10px 12px; border-top: 1px solid var(--line); color: var(--text-soft); text-align: center; vertical-align: middle; }
.wk-table td.left, .wk-table th.left { text-align: left; }
.wk-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk-table tbody tr:hover td { background: var(--surface); }
.wk-table tr.wk-rowlink { cursor: pointer; }
.wk-kv th[scope="row"] { width: 30%; text-align: left; background: var(--surface-2); font-weight: 600; border-top: 1px solid var(--line); }
.wk-kv td { text-align: left; }
.wk-pic { width: 64px; }
.wk-pic .sprite, .wk-pic .sprite-item { margin: 0 auto; }

/* forms of the tools and of the lists */
.wk-tool { padding: 18px 20px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.wk-tool h2 { border: 0; padding: 0; }
.wk-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin: 0 0 16px; }
.wk-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.wk-form label.wide { flex: 1 1 220px; }
.wk-form input, .wk-form select { height: 38px; min-width: 130px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: 14px var(--font); }
.wk-form input:focus, .wk-form select:focus { border-color: var(--gold); outline: none; }
.wk-answer { font-weight: 700; color: var(--text) !important; }
.wk-count { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.wk-more { display: flex; justify-content: center; margin: 4px 0 16px; }

.wk-back { font-size: 13.5px; }

/* the game's pictures (served by the game host, sprites.js) */
.sprite { display: inline-block; vertical-align: middle; overflow: hidden; image-rendering: pixelated; flex: none; }
.sprite > i { display: block; height: 100%; width: calc(var(--frames, 1) * 100%); background-repeat: no-repeat; background-size: 100% 100%; }
.sprite-item { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes wk-walk { to { transform: translateX(-100%); } }
  .sprite > i { animation: wk-walk calc(var(--frames, 1) * 105ms) steps(var(--frames, 1)) infinite; }
}

/* the home */
.wk-home { grid-column: 2 / -1; max-width: 1040px; width: 100%; margin: 0 auto; padding-top: 34px; }
.wk-welcome { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; }
.wk-welcome img { width: 76px; height: 76px; }
.wk-welcome h1 { margin: 0 0 4px; font: 800 24px var(--font); }
.wk-welcome p { margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.5; max-width: 520px; }
.wk-social { display: flex; gap: 2px; margin-left: auto; }
.wk-find.big { width: 100%; max-width: none; height: 46px; margin: 0 0 30px; font-size: 15px; border-radius: 12px; }
.wk-label { margin: 0 0 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wk-highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 26px; }
.wk-highlight { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14.5px; }
.wk-highlight::after { content: "\2192"; margin-left: auto; color: var(--muted); }
.wk-highlight:hover { border-color: var(--gold); text-decoration: none; color: var(--text); }
.wk-homegrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.wk-homecol { display: grid; gap: 16px; }
.wk-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.wk-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.wk-card-head span.count { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; }
.wk-card ul { list-style: none; margin: 0; padding: 12px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.wk-card li a { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--text-soft); font-size: 14px; line-height: 1.3; }
.wk-card li a:hover { color: var(--text); text-decoration: none; }
.wk-card .wk-table { font-size: 14.5px; }
.wk-table-wrap.flat { border: 0; border-radius: 0; margin: 0; }
.wk-card .wk-table td { border-top: 1px solid var(--line-soft); }
.wk-boosted { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px 16px; }
.wk-boosted > div { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border-radius: 10px; background: var(--surface-2); color: var(--text); text-align: center; font-size: 13.5px; font-weight: 600; }
.wk-boosted small { color: var(--muted); font-weight: 500; font-size: 12px; }
.wk-boosted .stage { display: grid; place-items: end center; width: 72px; height: 72px; }
.wk-status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fbf6e; margin-right: 6px; vertical-align: middle; }
.wk-status-dot.off { background: #d9534f; }
.wk-kind { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.wk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13.5px; color: var(--text-soft); }
.wk-pvp { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); font-size: 12px; font-weight: 600; }

/* a creature, a spell, an item */
.wk-sheet { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 20px; align-items: start; margin: 0 0 22px; }
.wk-stage { display: grid; place-items: end center; width: 148px; height: 132px; border-radius: 12px; background: var(--surface-2); }
.wk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.wk-tag { padding: 2px 9px; border-radius: 999px; background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--text-soft); }
.wk-tag.gold { background: rgba(212, 178, 94, .18); color: var(--gold); }

/* the search */
.wk-search { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 11vh 16px 16px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.wk-search-box { width: min(640px, 100%); max-height: 74vh; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.wk-search form { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.wk-search input { flex: 1; height: 54px; border: 0; background: none; color: var(--text); font: 17px var(--font); outline: none; }
.wk-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.wk-results a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 8px; color: var(--text-soft); font-size: 13.5px; line-height: 1.4; }
.wk-results a small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.wk-results a strong { font-size: 15px; color: var(--text); }
.wk-results a[aria-selected="true"], .wk-results a:hover { background: var(--surface-2); text-decoration: none; }
.wk-search-hint { margin: 0; padding: 11px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* the footer */
.wk-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 20px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.wk-foot div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wk-foot a { color: var(--text-soft); }

/* narrower screens */
@media (max-width: 1220px) {
  .wk-shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  body.wk-side-closed .wk-shell { grid-template-columns: 0 minmax(0, 1fr); }
  .wk-aside { display: none; }
  .wk-homegrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wk-homegrid > .wk-homecol:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .wk-top-inner { padding: 0 16px; gap: 8px; }
  .wk-brand { min-width: 0; }
  .wk-burger { display: grid; }
  .wk-sidebtn, .wk-find kbd, .wk-name small { display: none; }
  .wk-shell, body.wk-side-closed .wk-shell { display: block; padding: 0 16px; }
  body.wk-side-closed .wk-side { visibility: visible; }
  .wk-side { position: fixed; z-index: 50; top: var(--top); left: 0; width: min(84vw, 300px); height: calc(100dvh - var(--top)); overflow-y: auto; scrollbar-width: none; transform: translateX(-102%); transition: transform .2s ease; border-right: 1px solid var(--line); }
  .wk-side::-webkit-scrollbar { display: none; }
  .wk-side-inner { padding: 22px 16px 40px; }
  body.wk-menu-open .wk-side { transform: none; }
  body.wk-menu-open .wk-backdrop { display: block; position: fixed; inset: var(--top) 0 0 0; z-index: 45; background: rgba(0, 0, 0, .55); }
  .wk-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-homegrid { grid-template-columns: 1fr; }
  .wk-pager { grid-template-columns: 1fr; }
  .wk-sheet { grid-template-columns: 1fr; }
  .wk-form > * { flex: 1 1 140px; }
  .wk-form input, .wk-form select { min-width: 0; width: 100%; }
}
@media (max-width: 560px) {
  .wk-brand { gap: 6px; }
  .wk-name { font-size: 15px; }
  .wk-brand img { width: 26px; height: 26px; }
  .wk-top-inner > .wk-find { flex: 0 0 32px; width: 32px; padding: 0; justify-content: center; border: 0; background: none; }
  .wk-top-inner > .wk-find span { display: none; }
  .wk-find span { font-size: 13px; }
  .wk-card ul { grid-template-columns: 1fr; }
  .wk-welcome img { width: 56px; height: 56px; }
  .wk-social { display: none; }
}
@media (prefers-reduced-motion: reduce) { .wk-side { transition: none; } }
