/* smply.gg/soulverse/wiki: the wiki's layout on top of soulverse.css (its colours, boxes, buttons and pixel fonts).
   As there, text is 16 or 32 px and line heights whole pixels, so the pixel fonts stay sharp. */

.wiki { padding: 32px 0 80px; }
.wiki-wrap { max-width: 1184px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 40px; align-items: start; }
.wiki-body { min-width: 0; }
.wiki-content > :last-child { margin-bottom: 0; }
.wiki-content p, .wiki-content li { color: var(--sv-description); }
.wiki-content p code, .wiki-content li code, .wiki-content td code { white-space: normal; overflow-wrap: anywhere; }
.wiki .title { margin-bottom: 24px; overflow-wrap: anywhere; }
.wh2 { position: relative; margin: 48px 0 16px; padding-top: 8px; font: 16px/24px var(--mono); color: var(--sv-selected); text-shadow: 1px 1px 0 #404040; text-transform: uppercase; }
.wh2::before { content: ""; position: absolute; left: 0; top: 0; width: min(100%, 360px); height: 1px; background: var(--sv-divider); }
.wh3 { margin: 32px 0 8px; font: 16px/24px var(--mono); color: var(--sv-label); }
.wh4 { margin: 24px 0 8px; font: 16px/24px var(--mono); color: var(--q-faint); }
.wiki-content > .wh2:first-child, .wiki-content > section:first-child > .wh2:first-child { margin-top: 0; }
.wiki-content .hearts-list li, .wiki-content .steps-list li { margin-bottom: 8px; }
.sub-list { list-style: none; margin: 8px 0 0; padding: 0 0 0 16px; }
.sub-list li { position: relative; padding-left: 16px; margin-bottom: 4px; color: var(--q-faint); }
.sub-list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 2px; background: var(--sv-hint-key); }
.wiki-content kbd { display: inline-block; padding: 0 6px; background: rgba(0, 0, 0, .5); border: 1px solid var(--sv-outline); line-height: 22px; color: var(--sv-selected); }
.wiki-content .code { margin-bottom: 16px; }
.wiki-content .path { margin: 0 0 4px; }
.wiki-content mark, .wresults mark { background: none; color: var(--sv-selected); text-decoration: underline; text-underline-offset: 4px; }
.wnote { margin: 0 0 24px; }
.wnote p { margin: 0; color: var(--q-text); }
.small { font-size: 16px; }

/* the side: search, then the pages (the one you're on lit, its parts under it) */
.wiki-side { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; padding-right: 4px; }
.side-fold summary { list-style: none; cursor: pointer; font: 16px/24px var(--mono); color: var(--sv-label); padding: 4px 0; }
.side-fold summary::-webkit-details-marker { display: none; }
.side-fold summary::after { content: " +"; color: var(--sv-hint-key); }
.side-fold[open] summary::after { content: " -"; }
.side-nav, .side-sub { list-style: none; margin: 0; padding: 0; }
.side-nav > li > a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid transparent; font: 16px/24px var(--mono); color: var(--sv-unselected); text-decoration: none; text-shadow: 1px 1px 0 #222327; }
.side-nav a:hover { color: var(--sv-selected); }
.side-nav > li > a.here, .side-nav > li > a.in { color: var(--sv-selected); border-left-color: var(--soul); text-shadow: 1px 1px 0 #404040; }
.side-sub { margin: 0 0 8px 14px; border-left: 1px solid var(--sv-divider); }
.side-sub a { display: flex; align-items: center; gap: 8px; padding: 2px 0 2px 12px; color: var(--sv-hint-key); text-decoration: none; }
.side-sub a.here { color: var(--sv-selected); }
.side-sub .wheart.mini { flex: none; }

/* search: the menus' text field, results in a popup under it */
.wsearch { position: relative; margin: 0 0 16px; }
.wsearch .field, .qfilter .field {
  width: 100%; height: 36px; padding: 0 10px; font: 16px/24px var(--sans); color: var(--sv-selected);
  background: color-mix(in srgb, var(--sv-panel) 85%, transparent); border: 1px solid var(--sv-outline); border-radius: 0; outline: none;
}
.wsearch .field:focus, .qfilter .field:focus { border-color: var(--sv-outline-hi); }
.wsearch.big { max-width: 720px; margin: 24px 0 32px; }
.wsearch.big .field { height: 48px; padding: 0 14px; }
.wresults { background: #05050f; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; min-width: min(420px, 90vw); }
.wresults a { display: block; padding: 6px 8px; text-decoration: none; border: 1px solid transparent; }
.wresults a.on, .wresults a:hover { background: var(--sv-panel-hi); border-color: var(--sv-outline); }
.wresults .r-title { font: 16px/24px var(--mono); color: var(--sv-selected); }
.wresults .r-where { margin-left: 8px; color: var(--sv-hint-key); }
.wresults .r-text { display: block; color: var(--q-faint); }
.wresults .none { padding: 6px 8px; color: var(--q-faint); }

/* where you are, and the way to the pages either side */
.crumbs { margin: 0 0 8px; font: 16px/24px var(--mono); color: var(--sv-hint-key); }
.crumbs a { color: var(--sv-hint-key); text-decoration: none; }
.crumbs a:hover { color: var(--sv-selected); }
.crumbs span { color: var(--sv-unselected); }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--sv-divider); font: 16px/24px var(--mono); }
.pager a { color: var(--sv-unselected); text-decoration: none; }
.pager a:hover { color: var(--sv-selected); }

/* hearts and quirk pictures */
.wheart { display: inline-block; flex: none; vertical-align: middle; image-rendering: pixelated; }
.wq { position: relative; display: block; flex: none; width: calc(17px * var(--s) + 2px); height: calc(17px * var(--s) + 2px); background: rgba(16, 16, 24, .75); border: 1px solid rgba(255, 255, 255, .31); }
.wq i { display: block; width: calc(17px * var(--s)); height: calc(17px * var(--s)); background-repeat: no-repeat; background-position: 0 0; image-rendering: pixelated; }
.wq.ph { --s: 3; display: grid; place-items: center; }
.qcard:hover .wq, .wcard:hover .wq { background: rgba(24, 24, 38, .88); border-color: var(--q-text); }
.soul-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 12px 4px 0; text-decoration: none; font: 16px/24px var(--mono); white-space: nowrap; }
.soul-chip:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* cards: quirks, SOULs, the landing page's sections, trials */
.qcards, .soulcards, .wcards, .trialcards { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.qcard, .soulcard, .wcard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; height: 100%; text-decoration: none; padding-top: 13px; padding-bottom: 13px; }
.qc-text { display: flex; flex-direction: column; }
.qc-name, .sc-name { font: 16px/24px var(--mono); color: var(--q-text); text-shadow: 1px 1px 0 #3c3c3e; }
.qc-short, .sc-desc { color: var(--q-faint); }
.qcard .kind { font-size: 16px; }
.qc-souls { display: flex; gap: 4px; margin-top: 6px; }
.qcard:hover .qc-name, .wcard:hover .qc-name { color: var(--sv-selected); }
.soulcard { grid-template-columns: 36px minmax(0, 1fr); }
.soulcard .wheart { margin-top: 4px; }
.soulcard > span, .wcard > span { display: flex; flex-direction: column; }
.soulcard:hover .sc-name { text-decoration: underline; text-underline-offset: 4px; }
.wcards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.trialcard { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; }
.trialcard > span { display: flex; flex-direction: column; }
.trialcard .flavour { margin-top: 4px; color: var(--q-text); }
.emblem, .pix { image-rendering: pixelated; vertical-align: middle; }
.soul-strip { display: flex; flex-wrap: wrap; gap: 4px 0; }

/* a SOUL's page: its heart big, its words beside it */
.soul-hero { display: flex; align-items: center; gap: 32px; margin: 0 0 24px; }
.soul-desc-big { margin: 0; font: 32px/40px var(--sans); color: var(--sv-selected); max-width: 640px; }
.facts thead { display: none; }
.facts td:first-child { width: 220px; color: var(--sv-label); font-family: var(--mono); }
.swatch-dot { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border: 1px solid rgba(255, 255, 255, .4); }

/* a quirk's page: its picture big, its kind, who gives it; the words and its preview side by side */
.quirk-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; margin: 0 0 32px; }
.qh-text .kind { display: block; margin-bottom: 4px; }
.qh-short { margin: 0 0 8px; font: 16px/24px var(--sans); color: var(--q-text); }
.qh-who { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.qh-who .small { margin-right: 4px; }
.quirk-hero p.small { margin: 0; }
.quirk-main { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 32px; align-items: start; }
.quirk-main .wh2:first-child { margin-top: 0; }
.glance { list-style: none; margin: 0 0 16px; }
.glance li { position: relative; padding-left: 20px; margin-bottom: 6px; color: var(--q-text); }
.glance li:last-child { margin-bottom: 0; }
.glance li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; background: var(--sv-hint-key); }
.glance li.wait::before { background: var(--q-active); }
.glance li.cost { color: var(--q-cost); }
.glance li.cost::before { background: var(--q-cost); }

/* pictures: screenshots and the quirks' previews, with a line under them */
.shot, .preview { margin: 0 0 24px; padding: 0; line-height: 0; }
.shot img { display: block; width: 100%; height: auto; image-rendering: auto; }
.preview { position: sticky; top: 72px; width: 322px; }
.preview img { display: block; width: 320px; height: 320px; image-rendering: auto; background: #000; }
.shot figcaption, .preview figcaption { padding: 8px 12px; font: 16px/24px var(--sans); color: var(--q-faint); line-height: 24px; }

/* the quirk list's filters */
.qfilter { display: grid; grid-template-columns: minmax(0, 1fr) auto 200px auto; gap: 8px 12px; align-items: center; margin: 0 0 24px; }
.qfilter select.field { padding: 0 6px; }
.qf-kinds { display: flex; gap: 4px; flex-wrap: wrap; }
.qg-title { display: flex; align-items: center; gap: 10px; }
.qgroup .wh2 { margin-top: 32px; }

.settings-table td:first-child { min-width: 220px; }
.settings-table td:nth-child(2), .settings-table td:nth-child(3) { white-space: nowrap; color: var(--q-text); }
.presets-table td:last-child { min-width: 260px; }
.compat-table td:first-child { min-width: 220px; color: var(--q-text); }
.items-table td:first-child { min-width: 240px; white-space: nowrap; color: var(--q-text); }
.items-table img { margin-right: 8px; }
.cl-version .wh3 { color: var(--q-active); }
.cl-version { margin-top: 2.6em; }
.cl-version:first-of-type { margin-top: 1.2em; }
.cl-version .cl-title { font-size: 2.1em; line-height: 1.15; margin: 0 0 .35em; padding-bottom: .3em; border-bottom: 2px solid var(--line, rgba(255,255,255,.18)); color: #fff; }

/* smaller screens */
@media (max-width: 1100px) {
  .quirk-main { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
}
@media (max-width: 980px) {
  .wiki-wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .wiki-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .side-fold { margin-bottom: 8px; padding: 4px 12px; border: 1px solid var(--sv-divider); background: color-mix(in srgb, var(--sv-panel) 70%, transparent); }
  .qfilter { grid-template-columns: minmax(0, 1fr) 200px; }
  .qf-kinds { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 600px) {
  .wiki { padding-top: 16px; }
  .qcards, .soulcards, .wcards, .trialcards { grid-template-columns: minmax(0, 1fr); }
  .soul-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .soul-desc-big { font: 16px/24px var(--sans); color: var(--q-text); }
  .quirk-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .quirk-hero .wq.big { --s: 3 !important; }
  .preview, .preview img { width: 100%; height: auto; max-width: 322px; }
  .preview img { aspect-ratio: 1; }
  .qfilter { grid-template-columns: minmax(0, 1fr); }
  .facts td:first-child { width: auto; min-width: 0; }
  .settings-table td:first-child, .items-table td:first-child, .compat-table td:first-child { min-width: 160px; }
  .wh2 { margin-top: 40px; }
}
.wq.ph img { width: 40px; height: 40px; image-rendering: pixelated; }

/* the Mythic SOULs' own hearts (moving pictures, drawn pixel for pixel) */
.mythic-heart { display: block; flex: none; image-rendering: pixelated; }
.soulcard.mythic { grid-template-columns: 64px minmax(0, 1fr); }
.soulcard.mythic .mythic-heart { justify-self: center; margin-top: 2px; }
