/* OrientWar wiki, written by tools/wiki_build.py next to the pages (docs/wiki.md#seitenaufbau).
   Layout: sticky header (logo, search, language) · left category rail · content column · "on this page"
   rail on wide pages. Night-siege palette of the website banner: navy ground, ember accent, brass numbers.
   Dark is the default; a light palette follows prefers-color-scheme. */

@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/cinzel-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/cinzel-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(fonts/source-sans-3-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(fonts/source-sans-3-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 200 900; font-display: swap; src: url(fonts/source-sans-3-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 200 900; font-display: swap; src: url(fonts/source-sans-3-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--bg: #0a0f18; --rail: #0d1420; --panel: #121b29; --panel-2: #172234; --line: #233149;
	--fg: #e6e9f0; --muted: #94a0b6; --accent: #ff8b3d; --accent-ink: #1a0c02; --brass: #e2b45a; --link: #ffb27a;
	--good: #59c28a; --bad: #ff6b5b; --heal: #59c28a;
	--fire: #ff6a2b; --ice: #7fd3ff; --energy: #c48bff; --earth: #79c24f; --holy: #ffe07a; --death: #9a8cb8;
	--phys: #c9ced8; --drown: #4aa3c9; --life: #e0456a; --mana: #5b7cff;
	--display: "Cinzel", "Trajan Pro", Georgia, serif;
	--body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
	--top: 57px;
	color-scheme: dark;
}
@media (prefers-color-scheme: light) {
	:root {
		--bg: #eef0f4; --rail: #e4e8ef; --panel: #ffffff; --panel-2: #f5f6f9; --line: #d3d9e3;
		--fg: #141a26; --muted: #556075; --accent: #c2501a; --accent-ink: #ffffff; --brass: #8a5d0e; --link: #a8420f;
		--good: #1f8a52; --bad: #c7302a; --heal: #1f8a52; --holy: #b8901a; --ice: #2b8fc4; --phys: #6b7383; --earth: #4c8f2a;
		color-scheme: light;
	}
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.55 var(--body); }
img { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: var(--mono); font-size: .9em; padding: 0 4px; border-radius: 4px; background: var(--panel-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; padding: 6px 12px; background: var(--accent); color: var(--accent-ink); }

/* Header */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; height: var(--top); padding: 0 16px; background: var(--rail); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.brand span { font: 700 15px var(--display); letter-spacing: .08em; color: var(--brass); }
.top .search { flex: 1; max-width: 560px; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; font-size: 14px; }
.lang { display: flex; gap: 6px; }
.lang a { display: block; line-height: 0; opacity: .6; transition: opacity .15s; }
.lang a:hover, .lang a[aria-current] { opacity: 1; }
.lang a[aria-current] img { outline: 2px solid #d4a017; border-radius: 50%; }
.menu-btn { display: none; flex: none; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); padding: 5px 10px; font: inherit; cursor: pointer; }

/* Search with suggestions (wiki.js) */
.search { position: relative; margin: 0; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--fg); font: inherit; }
.search input::placeholder { color: var(--muted); }
.search svg { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; pointer-events: none; }
.search kbd { position: absolute; right: 9px; top: 50%; translate: 0 -50%; font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; pointer-events: none; }
.search ul { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-height: 420px; overflow-y: auto; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.search ul:empty { display: none; }
.search li a { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; color: var(--fg); }
.search li a:hover, .search li a.active { background: var(--panel-2); text-decoration: none; }
.search li img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; flex: none; }
.search li small { margin-left: auto; color: var(--muted); text-align: right; }

/* Shell */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1480px; margin: 0 auto; }
.rail { position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); overflow-y: auto; padding: 18px 12px 30px 16px; border-right: 1px solid var(--line); font-size: 14px; }
.rail h4 { margin: 18px 8px 6px; font: 600 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rail h4:first-child { margin-top: 0; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 6px; color: var(--fg); }
.rail a:hover { background: var(--panel-2); text-decoration: none; }
.rail a[aria-current] { background: var(--panel-2); color: var(--accent); font-weight: 700; box-shadow: inset 2px 0 0 var(--accent); }
.rail a > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rail a img { width: 20px; height: 20px; flex: none; object-fit: contain; image-rendering: pixelated; }
.rail .count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 400; }
.rail details > summary { display: flex; align-items: center; list-style: none; cursor: pointer; border-radius: 6px; }
.rail details > summary::-webkit-details-marker { display: none; }
.rail details > summary::before { content: "▸"; width: 16px; padding-left: 6px; color: var(--muted); transition: rotate .15s; }
.rail details[open] > summary::before { rotate: 90deg; }
.rail details > summary a { flex: 1; padding-left: 2px; }
.rail details ul { margin: 2px 0 4px 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.rail details ul a { padding: 3px 8px; font-size: 13.5px; }
main { min-width: 0; padding: 24px 32px 60px; }

/* Type and shared parts */
h1, h2 { font-family: var(--display); text-wrap: balance; letter-spacing: .02em; }
h1 { margin: 0; font-size: 34px; line-height: 1.15; overflow-wrap: anywhere; }
h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.25; color: var(--brass); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
h2 small { font: 400 13px var(--body); color: var(--muted); letter-spacing: 0; }
h3 { margin: 18px 0 8px; font-size: 16px; }
section { margin-top: 34px; }
p { margin: 0 0 10px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { opacity: .5; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.note { color: var(--muted); font-size: 14px; }
.lead { max-width: 75ch; color: var(--muted); }
.foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.foot p { margin: 0 0 4px; }
.foot a { color: var(--muted); text-decoration: underline; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.jump a { padding: 3px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--fg); font-size: 13.5px; }
.jump a:hover { border-color: var(--accent); text-decoration: none; }
.jump .count { margin-left: 5px; color: var(--muted); font-size: 12px; }

/* Page head with portrait */
.page { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 40px; }
.page.wide { grid-template-columns: minmax(0, 1fr); }
.page > article { min-width: 0; }
.toc { position: sticky; top: calc(var(--top) + 24px); align-self: start; font-size: 13.5px; }
.toc b { display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); color: var(--muted); }
.toc a:hover { color: var(--fg); border-color: var(--accent); text-decoration: none; }
.head { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 24px; align-items: center; }
.head.plain { grid-template-columns: minmax(0, 1fr); }
.banner { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; padding: 20px 24px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel) 60%); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; }
.banner > img { flex: none; width: 64px; height: 64px; padding: 8px; object-fit: contain; image-rendering: pixelated; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 22%, var(--panel)), var(--panel) 70%); border: 1px solid var(--line); border-radius: 10px; box-sizing: content-box; }
.banner p { max-width: 75ch; margin: 6px 0 0; color: var(--muted); }
/* Phones: picture and title in one row, the intro below over the full width */
@media (max-width: 560px) {
	.banner { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 14px; padding: 16px; }
	.banner > div { display: contents; }
	.banner > img { width: 40px; height: 40px; padding: 6px; }
	.banner h1 { font-size: 26px; }
	.banner p { grid-column: 1 / -1; margin: 0; }
	.banner > div:only-child p { grid-column: 1 / -1; }
}
.portrait { display: grid; place-items: center; width: 148px; height: 148px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 22%, var(--panel)), var(--panel) 70%); border: 1px solid var(--line); border-radius: 12px; }
.portrait img { width: 96px; height: 96px; object-fit: contain; image-rendering: pixelated; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel-2); font-size: 13px; color: var(--fg); }
a.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.acc { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--link); }
.chip.boss { border-color: var(--bad); color: var(--bad); font-weight: 700; }
.stars { color: var(--brass); letter-spacing: 1px; }
.intro { margin-top: 18px; max-width: 75ch; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 22px 0 0; }
.stats div { padding: 12px 16px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 2px 0 0; font: 500 22px var(--mono); font-variant-numeric: tabular-nums; }
.stats dd small { display: block; margin-top: 2px; font: 400 12px/1.3 var(--body); color: var(--muted); }
.xp { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 22px 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 13.5px; }
.facts dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

/* Damage taken */
.els { list-style: none; margin: 0; padding: 6px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.el { display: grid; grid-template-columns: 12px 96px minmax(40px, 1fr) 56px 82px; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.el:nth-child(-n+2) { border-top: 0; }
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.physical { background: var(--phys); } .dot.earth { background: var(--earth); } .dot.fire { background: var(--fire); }
.dot.energy { background: var(--energy); } .dot.ice { background: var(--ice); } .dot.holy { background: var(--holy); }
.dot.death { background: var(--death); } .dot.drown { background: var(--drown); } .dot.lifedrain { background: var(--life); }
.dot.manadrain { background: var(--mana); } .dot.healing { background: var(--heal); }
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.bar::after { content: ""; position: absolute; left: 83.33%; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: .7; }
.bar i { display: block; height: 100%; background: var(--muted); }
.el.weak .bar i { background: var(--good); }
.el.strong .bar i { background: var(--bad); }
.el .val { font: 500 13px var(--mono); text-align: right; }
.el .tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.el.weak .tag { color: var(--good); }
.el.strong .tag, .el.immune .tag { color: var(--bad); }
.legend { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* Tables */
.tbl-wrap { overflow-x: auto; margin-bottom: 12px; }
/* A table wider than its box glows on the side that scrolls on; the covers move with the content and hide the glow at the ends. */
.box.tbl-wrap { background:
	linear-gradient(to right, var(--panel) 40%, transparent) left / 32px 100% no-repeat local,
	linear-gradient(to left, var(--panel) 40%, transparent) right / 32px 100% no-repeat local,
	linear-gradient(to right, color-mix(in srgb, var(--accent) 35%, transparent), transparent) left / 16px 100% no-repeat scroll,
	linear-gradient(to left, color-mix(in srgb, var(--accent) 35%, transparent), transparent) right / 16px 100% no-repeat scroll,
	var(--panel); }
.tbl td.tag { white-space: nowrap; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tbl td { padding: 6px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl thead + tbody tr:first-child td { border-top: 0; }
.tbl th.num { text-align: right; }
.tbl td.num { font-family: var(--mono); font-size: 13px; }
.tbl tbody tr:not(.band):hover td { background: var(--panel-2); }
.tbl tr.band th { padding: 14px 16px 6px; border-top: 1px solid var(--line); border-bottom: 0; background: var(--panel-2); font: 700 13px var(--display); letter-spacing: .05em; text-transform: none; color: var(--brass); }
.tbl tr.band th small { margin-left: 6px; font: 400 12px var(--body); color: var(--muted); }
.tbl tbody:first-of-type tr.band th { border-top: 0; }

/* Sortable, filterable lists (wiki.js) */
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; }
.filter b { min-width: 90px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.filter button { padding: 3px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--fg); font: inherit; font-size: 13.5px; cursor: pointer; }
.filter button:hover { border-color: var(--accent); }
.filter button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--panel)); }
.filter .count { margin-left: 5px; color: var(--muted); font-size: 12px; }
.list .tbl th button { white-space: nowrap; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.list .tbl th button::after { content: " ↕"; opacity: .45; }
.list .tbl th[aria-sort="ascending"] button::after { content: " ▲"; opacity: 1; }
.list .tbl th[aria-sort="descending"] button::after { content: " ▼"; opacity: 1; }
.tbl small { color: var(--muted); }
.ent { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); }
.ent img { width: 32px; height: 32px; flex: none; object-fit: contain; image-rendering: pixelated; }
.ent.big img { width: 48px; height: 48px; }
.ent.big img + img { margin-left: -6px; }
/* An entry without a picture keeps its name in line with the others */
.ent:not(:has(img))::before { content: ""; flex: none; width: 32px; height: 32px; }

/* Tools: huntfinder, skill calculator, outfitter */
.mons { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.mons a { line-height: 0; }
.mons img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.stars { color: var(--brass); letter-spacing: 1px; white-space: nowrap; }
.stars s { text-decoration: none; opacity: .25; }
.ents { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 14px 16px; list-style: none; }
.calc { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px 16px; padding: 16px; margin-bottom: 16px; }
.calc label, .outfitter label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.calc select, .calc input:not([type="checkbox"]), .outfitter select { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--fg); font: 15px var(--body); letter-spacing: 0; text-transform: none; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--fg); }
.calc label.check { align-self: end; padding-bottom: 8px; }
.outfitter { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 18px; }
.outfitter .stage { display: grid; place-items: center; height: 220px; border-radius: 8px; background: var(--panel-2); }
.outfitter .stage img { width: 192px; height: 192px; object-fit: contain; image-rendering: pixelated; }
.outfitter .controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px 16px; align-content: start; }
.outfitter .checks, .outfitter .parts, .outfitter .palette { grid-column: 1 / -1; }
.outfitter .checks { display: flex; gap: 20px; }
.outfitter .parts { margin: 0; }
.outfitter .parts i { display: inline-block; width: 12px; height: 12px; margin-left: 6px; border: 1px solid var(--line); border-radius: 3px; vertical-align: -1px; }
.palette { display: grid; grid-template-columns: repeat(19, minmax(0, 1fr)); gap: 2px; max-width: 494px; }
.palette button { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid rgba(0, 0, 0, .35); border-radius: 3px; cursor: pointer; }
.palette button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Attack cards */
.cards { display: grid; gap: 10px; }
.card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 16px; }
.card h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.card p { margin: 0; grid-column: 1; font-size: 13.5px; color: var(--muted); }
.card .dmg { grid-row: 1 / 3; grid-column: 2; align-self: center; text-align: right; font: 500 18px var(--mono); white-space: nowrap; }
.card .dmg small { display: block; font: 400 12px var(--body); color: var(--muted); }
.voices { margin-top: 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.summons { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }

/* Maps */
.maps { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 10px; }
.maps figure { margin: 0; max-width: 100%; }
.maps figcaption { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.map { position: relative; max-width: 100%; overflow: hidden; background: #000; border: 1px solid var(--line); border-radius: 10px; }
.map img { position: absolute; max-width: none; image-rendering: pixelated; }
.map i { position: absolute; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #e6281a; }

/* Start page */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 36px 36px 26px; border-radius: 12px; background: #160a06 url(banner.jpg) center 40% / cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 10, 18, .25) 0%, rgba(8, 10, 18, .82) 70%, rgba(8, 10, 18, .94) 100%); }
.hero h1 { color: #fff4e6; font-size: 40px; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.hero p { max-width: 62ch; margin: 10px 0 22px; color: #e9dccd; font-size: 16px; }
.hero .search { max-width: 640px; }
.hero .search input { padding: 13px 14px 13px 40px; font-size: 16px; background: rgba(10, 15, 24, .85); border-color: rgba(255, 180, 120, .35); color: #fff; }
.hero .search input::placeholder { color: #b9a996; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; color: #c9b9a6; }
.hero .meta b { color: #ffcf8a; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 14px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); transition: border-color .15s, translate .15s; }
.tile:hover { border-color: var(--accent); text-decoration: none; translate: 0 -2px; }
.tile img, .tile .blank { grid-row: 1 / 4; width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; background: var(--panel-2); border-radius: 8px; }
.tile-t { font: 700 17px var(--display); }
.tile-n { font: 500 12px var(--mono); color: var(--brass); }
.tile-d { margin-top: 4px; font-size: 13px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .kind, .list .count { font-size: 12.5px; color: var(--muted); }
/* "Start here" links and the category boxes, each listing its pages */
.hl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.hl a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); font-weight: 600; transition: border-color .15s; }
.hl a::after { content: "→"; margin-left: auto; color: var(--muted); }
.hl a:hover { border-color: var(--accent); text-decoration: none; }
.not-found { display: grid; gap: 16px; max-width: 640px; }
.hl img { width: 32px; height: 32px; flex: none; object-fit: contain; image-rendering: pixelated; }
/* Columns, not a grid: a short box does not leave a gap beside a long one. */
.cats { columns: 380px 3; column-gap: 16px; }
.cat { break-inside: avoid; margin-bottom: 16px; }
.cat h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 700 15px var(--display); letter-spacing: .04em; }
.cat h3 > a, .cat h3 > span:first-child { display: flex; align-items: center; gap: 10px; color: var(--brass); }
.cat ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; margin: 0; padding: 8px 10px 12px; list-style: none; }
.cat li { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.cat li a { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 6px; border-radius: 6px; color: var(--fg); font-size: 14.5px; }
.cat li a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat li a:hover { background: var(--panel-2); text-decoration: none; color: var(--link); }
.cat img { width: 24px; height: 24px; flex: none; object-fit: contain; image-rendering: pixelated; }
.cat .count { flex: none; padding-right: 6px; font: 500 12px var(--mono); color: var(--muted); }

/* Articles (guides, systems, team texts) */
.prose { max-width: 78ch; }
.prose h2 { margin-top: 30px; padding-bottom: 6px; background: linear-gradient(90deg, var(--accent), transparent 70%) bottom / 100% 1px no-repeat; }
.prose h2::before { content: "◆"; align-self: center; font-size: .55em; color: var(--accent); }
.prose h3 { margin: 26px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font: 700 17px var(--display); letter-spacing: .04em; color: var(--brass); }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul { list-style: none; padding-left: 4px; }
.prose ul > li { position: relative; padding-left: 20px; }
.prose ul > li::before { content: "◆"; position: absolute; left: 3px; top: .2em; font-size: .65em; color: var(--brass); }
.prose li { margin: 3px 0; }
.prose blockquote, blockquote { margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose blockquote { padding: 10px 14px; background: var(--panel); border-radius: 0 8px 8px 0; color: var(--fg); }
.callout { padding: 16px 20px; font-size: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--panel)), var(--panel) 65%); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; }
.callout > :last-child { margin-bottom: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; max-width: 78ch; margin: 20px 0 18px; }
.gallery a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); font-size: 13px; line-height: 1.25; text-align: center; transition: border-color .15s, translate .15s; }
.values { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 0; }
.values div { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid color-mix(in srgb, var(--brass) 60%, var(--line)); border-radius: 10px; }
.values dt { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.values + p { margin-top: 12px; }
.values dd { margin: 0; font: 500 20px var(--mono); font-variant-numeric: tabular-nums; color: var(--brass); }
.gallery a:hover { border-color: var(--accent); text-decoration: none; translate: 0 -2px; }
.gallery img { width: 48px; height: 48px; padding: 6px; box-sizing: content-box; object-fit: contain; image-rendering: pixelated; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 20%, var(--panel-2)), var(--panel-2) 70%); border-radius: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 14.5px; }
.prose th, .prose td { padding: 6px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ow-guide-img { max-width: 100%; height: auto; border-radius: 8px; }
details.ow-spoiler { margin: 14px 0; padding: 10px 14px; border: 1px dashed var(--accent); border-radius: 10px; background: var(--panel); }
details.ow-spoiler > summary { cursor: pointer; font-weight: 700; color: var(--link); }
details.ow-spoiler[open] > summary { margin-bottom: 8px; }

/* Responsive */
@media (max-width: 1200px) { .page { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 1000px) {
	.els { grid-template-columns: minmax(0, 1fr); }
	.el:nth-child(2) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
	.shell { grid-template-columns: minmax(0, 1fr); }
	.rail { display: none; position: fixed; inset: var(--top) 0 0 0; z-index: 25; align-self: stretch; height: auto; background: var(--rail); border-right: 0; }
	body.nav-open .rail { display: block; }
	body.nav-open { overflow: hidden; }
	.menu-btn { display: block; }
	.brand span, .top-r .site { display: none; }
	main { padding: 18px 16px 48px; }
	.hero { padding: 26px 18px 20px; }
	.hero h1 { font-size: 32px; }
}
@media (max-width: 560px) {
	.top { gap: 10px; padding: 0 12px; }
	.brand img { height: 32px; }
	.search kbd { display: none; }
	.top .search ul { position: fixed; left: 8px; right: 8px; top: calc(var(--top) + 4px); max-height: 70vh; }
	h1 { font-size: 26px; }
	.cat ul { grid-template-columns: minmax(0, 1fr); }
	.outfitter { grid-template-columns: minmax(0, 1fr); }
	.head { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; }
	.values { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
	.portrait { width: 96px; height: 96px; }
	.portrait img { width: 64px; height: 64px; }
	.el { grid-template-columns: 12px 84px minmax(30px, 1fr) 52px; }
	.el .tag { display: none; }
	.stats div { border-left: 0; border-top: 1px solid var(--line); }
	.tbl th, .tbl td { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
