/* The game wiki (/wiki/, tools/build_wiki.py): the site's look for long reference pages. */
.wiki { padding: clamp(96px, 12vw, 128px) 0 clamp(48px, 7vw, 80px); }
.wiki-wrap { max-width: 1180px; }

.wiki-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
	padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.wiki-crumbs { font-size: 0.98rem; color: var(--muted); }
.wiki-crumbs a { color: var(--gilt-light); text-decoration: none; }
.wiki-crumbs a:hover { text-decoration: underline; }
.wiki-crumbs span[aria-hidden] { margin: 0 6px; color: var(--gilt-dark); }

.wiki-search { position: relative; width: min(340px, 100%); }
.wiki-search input { width: 100%; box-sizing: border-box; padding: 9px 12px; font: inherit; font-size: 1rem;
	color: var(--text); background: var(--black); border: 1px solid var(--line); border-radius: var(--radius); }
.wiki-search input:focus { outline: 2px solid var(--gilt-light); outline-offset: 1px; }
.wiki-hits { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0;
	list-style: none; background: var(--black); border: 1px solid var(--line); border-radius: var(--radius);
	max-height: 60vh; overflow-y: auto; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.wiki-hits a { display: block; padding: 6px 12px; text-decoration: none; color: var(--text); }
.wiki-hits a:hover, .wiki-hits a.is-on { background: var(--oxblood); color: var(--parchment); }
.wiki-hits small { color: var(--muted); margin-left: 8px; }

.wiki-layout { display: block; }
.wiki-layout.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 40px; align-items: start; }
.wiki-toc { position: sticky; top: 96px; font-size: 0.95rem; border-left: 1px solid var(--line); padding-left: 16px;
	max-height: calc(100vh - 120px); overflow-y: auto; }
.wiki-toc-title { font-family: var(--display); color: var(--parchment); font-size: 0.9rem; letter-spacing: 0.06em;
	margin: 0 0 8px; }
.wiki-toc ul { list-style: none; margin: 0; padding: 0; }
.wiki-toc li { margin: 4px 0; }
.wiki-toc li.lv3 { padding-left: 12px; font-size: 0.92em; }
.wiki-toc a { color: var(--muted); text-decoration: none; }
.wiki-toc a:hover { color: var(--gilt-light); }
@media (max-width: 960px) {
	.wiki-layout.has-toc { display: block; }
	.wiki-toc { display: none; }
}

.wiki-page { min-width: 0; overflow-wrap: break-word; }
.wiki-page h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 0.6em; }
.wiki-page h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 1.6em 0 0.5em; padding-bottom: 6px;
	border-bottom: 1px solid rgba(176, 138, 62, 0.25); }
.wiki-page h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; }
.wiki-page h4, .wiki-page h5, .wiki-page h6 { font-family: var(--display); color: var(--parchment); font-size: 1.05rem;
	letter-spacing: 0.03em; margin: 1.3em 0 0.4em; }
.wiki-page h2, .wiki-page h3, .wiki-page h4 { scroll-margin-top: 90px; }
.wiki-page p { margin: 0 0 0.9em; }
.wiki-page ul, .wiki-page ol { margin: 0 0 1em; padding-left: 1.4em; }
.wiki-page li { margin: 0.3em 0; }
.wiki-page li > ul, .wiki-page li > ol { margin: 0.3em 0 0.3em; }
.wiki-page li.task { list-style: none; margin-left: -1.3em; }
.wiki-page .task-box { color: var(--gilt); margin-right: 8px; }
.wiki-page li.task.done { color: var(--muted); }
.wiki-page hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.wiki-page code { font-size: 0.88em; background: var(--black); padding: 1px 5px; border-radius: 3px; }
.wiki-page pre { background: var(--black); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
	overflow-x: auto; font-size: 0.85rem; }
.wiki-page pre code { background: none; padding: 0; }
.wiki-page mark { background: rgba(176, 138, 62, 0.35); color: var(--parchment); }
.wiki-page .wl-plain { color: var(--parchment); }
.wiki-page a { color: var(--gilt-light); }

.wiki-pic { display: block; width: 100%; height: auto; margin: 12px 0 16px; border: 1px solid var(--line);
	border-radius: var(--radius); background: var(--black); }
li > .wiki-pic { margin: 10px 0; }

.wiki-table { overflow-x: auto; margin: 0 0 1.2em; }
.wiki-table table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.wiki-table th, .wiki-table td { padding: 7px 12px; border-bottom: 1px solid rgba(176, 138, 62, 0.22); text-align: left;
	vertical-align: top; }
.wiki-table th { font-family: var(--display); font-weight: 700; font-size: 0.92rem; letter-spacing: 0.03em;
	color: var(--parchment); background: var(--oxblood); }
.wiki-table tr:nth-child(even) td { background: rgba(42, 12, 18, 0.35); }

blockquote { margin: 0 0 1em; padding: 4px 0 4px 16px; border-left: 3px solid var(--gilt-dark); color: var(--muted); }
.callout { margin: 0 0 1.2em; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--gilt);
	border-radius: var(--radius); background: rgba(42, 12, 18, 0.45); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-family: var(--display); font-weight: 700; color: var(--parchment); margin: 0 0 6px; }
.callout-icon { margin-right: 8px; color: var(--gilt); }
.callout-warning, .callout-danger, .callout-caution { border-left-color: var(--crimson-lit); }
.callout-warning .callout-icon, .callout-danger .callout-icon { color: var(--crimson-lit); }
details.callout > summary { cursor: pointer; list-style: none; }
details.callout > summary::-webkit-details-marker { display: none; }
details.callout > summary::after { content: " ▾"; color: var(--gilt-dark); }
details.callout:not([open]) > summary { margin-bottom: 0; }

.wiki-spoiler { margin: 0 0 28px; padding: 18px 22px; border: 1px solid var(--crimson); border-left: 5px solid var(--crimson-lit);
	border-radius: var(--radius); background: rgba(79, 20, 32, 0.45); }
.wiki-spoiler-title { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--parchment);
	margin: 0 0 6px; letter-spacing: 0.04em; }
.wiki-spoiler p:last-child { margin: 0; }

/* > [!infobox]: the page's picture and its facts, beside the text on wide screens and on top on narrow ones. */
.wiki-infobox { float: right; clear: right; width: min(320px, 42%); margin: 0 0 1.2em 1.6em; padding: 10px;
	border: 1px solid var(--line); border-radius: var(--radius); background: rgba(42, 12, 18, 0.45); }
.wiki-infobox .wiki-pic { max-width: none !important; margin: 0; }
.wiki-infobox-pic + .wiki-infobox-pic { margin-top: 8px; }
.wiki-infobox dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 10px 4px 2px;
	font-size: 0.98rem; }
.wiki-infobox dt { font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--gilt-light);
	padding-top: 3px; }
.wiki-infobox dd { margin: 0; }
.wiki-infobox > p:last-child { margin-bottom: 0; }
.wiki-page h2, .wiki-page .callout { display: flow-root; }
.wiki-page .wiki-table { clear: right; }
@media (max-width: 700px) {
	.wiki-infobox { float: none; width: auto; margin: 0 0 1.2em; }
}

/* --- The game-guide look (2026-10-12): page headers, cards, steps, rarity ------------------------------------------ */

/* Section headings with a gilt rule that fades out. */
.wiki-page h2 { border-bottom: 0; padding-bottom: 8px;
	background: linear-gradient(90deg, var(--gilt) 0, rgba(176, 138, 62, 0.28) 45%, transparent) left bottom / 100% 1px no-repeat; }

/* The header: what the page is, its title, and for quests and places their screenshot behind it. */
.wiki-hero { position: relative; margin: 0 0 30px; }
.wiki-hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.08; margin: 0.12em 0 0.22em; color: var(--parchment); }
.wiki-eyebrow { font: 700 0.76rem/1.5 var(--display); letter-spacing: 0.18em; text-transform: uppercase;
	color: var(--gilt-light); margin: 0; }
.wiki-eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(226, 196, 117, 0.45); }
.wiki-eyebrow a:hover { border-bottom-color: var(--gilt-light); }
.wiki-eyebrow span { color: var(--gilt); margin: 0 0.3em; }
.wiki-lede { font-size: clamp(1.08rem, 1.7vw, 1.28rem); line-height: 1.5; font-style: italic; color: var(--text);
	margin: 0; max-width: 760px; }
.wiki-hero:not(.has-pic) { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.wiki-hero.has-pic { display: flex; align-items: flex-end; min-height: clamp(250px, 34vw, 420px); overflow: hidden;
	border: 1px solid var(--line); border-radius: 6px; background: var(--black); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.wiki-hero-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wiki-hero.has-pic::after { content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(12, 6, 7, 0) 22%, rgba(12, 6, 7, 0.84) 60%, rgba(12, 6, 7, 0.97)),
		linear-gradient(90deg, rgba(12, 6, 7, 0.55), rgba(12, 6, 7, 0) 60%); }
.wiki-hero-text { position: relative; z-index: 1; padding: clamp(18px, 3.2vw, 34px); }
.wiki-hero.has-pic h1, .wiki-hero.has-pic .wiki-lede, .wiki-hero.has-pic .wiki-eyebrow { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9); }
.wiki-hero-home { min-height: clamp(220px, 28vw, 340px); }
.wiki-hero-home .wiki-hero-pic { object-position: center 35%; }

/* The facts box. */
.wiki-infobox { padding: 12px; background: linear-gradient(180deg, rgba(79, 20, 32, 0.38), rgba(42, 12, 18, 0.5));
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
.wiki-infobox dt { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.12em; }
.wiki-infobox dd { font-size: 1rem; line-height: 1.4; }
.wiki-infobox dl > dd + dt, .wiki-infobox dl > dd + dt + dd { border-top: 1px solid rgba(176, 138, 62, 0.16); padding-top: 6px; }
.wiki-type-person .wiki-infobox-pic img, .wiki-type-creature .wiki-infobox-pic img { aspect-ratio: 1; object-fit: cover; }

/* Numbered steps: a walkthrough's "Step by step", and any list the page counts through. */
.wiki-page > ol:not(.wiki-cards) { list-style: none; counter-reset: step; padding-left: 0; display: flow-root; }
.wiki-page > ol:not(.wiki-cards) > li { counter-increment: step; position: relative; margin: 0 0 12px;
	padding: 13px 16px 13px 62px; border: 1px solid rgba(176, 138, 62, 0.22); border-radius: 6px; background: rgba(42, 12, 18, 0.35); }
.wiki-page > ol:not(.wiki-cards) > li::before { content: counter(step); position: absolute; left: 14px; top: 12px;
	width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem/1 var(--display);
	color: var(--ink); background: linear-gradient(180deg, var(--gilt-light), var(--gilt)); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.wiki-page > ol:not(.wiki-cards) > li > .wiki-pic { max-width: 100% !important; }

/* A check's difficulty. */
.wiki-dc { display: inline-block; padding: 0 6px; border-radius: 3px; font: 700 0.74em/1.65 var(--display);
	letter-spacing: 0.05em; color: var(--ink); background: var(--gilt); vertical-align: 1px; white-space: nowrap; }

/* Folded detail (journal, fight variants, lore). */
details.callout { padding: 0; }
details.callout > summary { padding: 11px 16px; }
details.callout > summary:hover { color: var(--gilt-light); }
details.callout[open] > summary { border-bottom: 1px solid rgba(176, 138, 62, 0.22); margin-bottom: 10px; }
details.callout > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.callout > :last-child { margin-bottom: 12px; }

/* Picture cards: the index pages' lists of places, quests and people. */
.wiki-cards { list-style: none; margin: 0 0 1.5em; padding: 0; display: grid; gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.wiki-page .wiki-card { margin: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 6px;
	border: 1px solid rgba(176, 138, 62, 0.25); background: rgba(42, 12, 18, 0.42); transition: border-color 0.2s, transform 0.2s; }
.wiki-card:hover { border-color: var(--gilt); transform: translateY(-2px); }
.wiki-card-pic { display: block; aspect-ratio: 16 / 9; background: var(--black); border-bottom: 1px solid rgba(176, 138, 62, 0.2); }
.wiki-card-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wiki-card-pic img.is-portrait { object-fit: contain; background: radial-gradient(circle at 50% 40%, #3a2d44, #1a1220); }
.wiki-card-text { padding: 12px 14px 14px; }
.wiki-page .wiki-card-title { font: 700 1.04rem/1.25 var(--display); color: var(--parchment); text-decoration: none; }
.wiki-page .wiki-card-title:hover { color: var(--gilt-light); }
.wiki-page .wiki-card-note { margin: 4px 0 0; font-size: 0.9rem; color: var(--muted); }
.wiki-page .wiki-card-desc { margin: 6px 0 0; font-size: 0.98rem; line-height: 1.45; }
ol.wiki-cards { counter-reset: card; }
ol.wiki-cards > .wiki-card { counter-increment: card; position: relative; }
ol.wiki-cards > .wiki-card::before { content: counter(card); position: absolute; z-index: 1; top: 10px; left: 10px;
	width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 0.95rem/1 var(--display);
	color: var(--ink); background: linear-gradient(180deg, var(--gilt-light), var(--gilt)); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }

/* Thumbnails on table rows (people, creatures, quests, places). */
.wiki-thumb { display: inline-block; vertical-align: middle; width: 64px; height: 36px; object-fit: cover; margin: -2px 10px 0 0;
	border-radius: 3px; border: 1px solid rgba(176, 138, 62, 0.3); background: var(--black); }
.wiki-thumb.is-portrait { width: 34px; height: 34px; border-radius: 50%; }

/* Items, in the colour of their rarity. */
.r-common { --r: #d3cab7; }
.r-uncommon { --r: #74d27f; }
.r-rare { --r: #6fadff; }
.r-very-rare { --r: #c493ff; }
.r-legendary { --r: #ffae4f; }
.r-artifact { --r: #ff7563; }
.wiki-page a[class^="r-"] { color: var(--r); }
.wiki-item { margin: 0 0 14px; padding: 2px 18px 8px; border: 1px solid rgba(176, 138, 62, 0.2);
	border-left: 4px solid var(--r, var(--gilt-dark)); border-radius: 6px; background: rgba(42, 12, 18, 0.3); }
.wiki-item > h3 { margin-top: 0.55em; color: var(--r, var(--parchment)); }
.wiki-page .wiki-item-meta { font-size: 0.95rem; color: var(--muted); }
.wiki-item-meta em { font-style: normal; text-transform: capitalize; color: var(--r, var(--text)); }
.wiki-item-meta code { letter-spacing: 0.12em; color: var(--parchment); border: 1px dashed var(--gilt-dark); }

/* The front page: a card per part of the wiki. */
.wiki-type-home .wiki-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-content: start; }
.wiki-type-home .wiki-page > :not(.wiki-home-card) { grid-column: 1 / -1; }
.wiki-type-home .wiki-page > p { margin: 0; font-size: 1.12rem; }
.wiki-type-home .wiki-spoiler { margin: 0; }
.wiki-home-card { overflow: hidden; border-radius: 6px; border: 1px solid rgba(176, 138, 62, 0.25); background: rgba(42, 12, 18, 0.42); }
.wiki-home-pic { display: block; width: 100%; aspect-ratio: 16 / 6; object-fit: cover; border-bottom: 1px solid var(--line); }
.wiki-page .wiki-home-card h2 { margin: 16px 18px 6px; }
.wiki-page .wiki-home-card ul { list-style: none; margin: 0 18px 14px; padding: 0; }
.wiki-page .wiki-home-card li { margin: 0; padding: 9px 0; border-top: 1px solid rgba(176, 138, 62, 0.14); }
.wiki-home-card li:first-child { border-top: 0; }
.wiki-home-card li > a:first-child { font: 600 1rem/1.3 var(--display); text-decoration: none; }
.wiki-home-desc { display: block; font-size: 0.95rem; color: var(--muted); }

/* Where you are in the contents. */
.wiki-toc a.is-on { color: var(--gilt-light); }
.wiki-toc li { position: relative; }
.wiki-toc a.is-on::before { content: ""; position: absolute; left: -17px; top: 0.25em; bottom: 0.25em; width: 2px; background: var(--gilt-light); }

@media (max-width: 760px) {
	.wiki-type-home .wiki-page { grid-template-columns: minmax(0, 1fr); }
	.wiki-hero.has-pic { min-height: 230px; }
	.wiki-page > ol:not(.wiki-cards) > li { padding: 12px 12px 12px 52px; }
	.wiki-page > ol:not(.wiki-cards) > li::before { left: 10px; width: 30px; height: 30px; }
	.wiki-item { padding: 2px 14px 8px; }
}
.wiki-type-quest .wiki-hero-pic { object-position: center top; }
.wiki-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; align-items: start; margin: 0 0 1.4em; }
.wiki-items > .wiki-item { margin: 0; }
.wiki-with-thumb { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.wiki-with-thumb .wiki-thumb { flex: none; margin: 0; }
@media (max-width: 760px) {
	/* On a phone the picture sits above the title instead of behind it. */
	.wiki-hero.has-pic { display: block; min-height: 0; }
	.wiki-hero.has-pic .wiki-hero-pic { position: static; display: block; height: auto; aspect-ratio: 16 / 9;
		border-bottom: 1px solid var(--line); }
	.wiki-hero.has-pic::after { display: none; }
	.wiki-hero.has-pic .wiki-hero-text { padding: 16px 16px 18px; }
	.wiki-hero h1 { font-size: 2rem; }
}
