/* Wiki site in the look of the CurseForge cards (palette, stepped pixel corners, pixel headings). Fonts are local. */
@font-face { font-family: "Pixelify Sans"; font-weight: 400 700; font-display: swap; src: url("fonts/pixelify-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "Silkscreen"; font-weight: 400; font-display: swap; src: url("fonts/silkscreen-latin.woff2") format("woff2"); }
@font-face { font-family: "Silkscreen"; font-weight: 700; font-display: swap; src: url("fonts/silkscreen-bold-latin.woff2") format("woff2"); }
@font-face { font-family: "Pixel Digits"; font-weight: 100 549; font-display: swap; src: url("fonts/nytheria-digits-regular.ttf") format("truetype"); unicode-range: U+0030-0039; }
@font-face { font-family: "Pixel Digits"; font-weight: 550 900; font-display: swap; src: url("fonts/nytheria-digits-bold.ttf") format("truetype"); unicode-range: U+0030-0039; }

:root {
  --pixel: "Pixel Digits", "Pixelify Sans", sans-serif; --caps: "Pixel Digits", "Silkscreen", monospace; --sans: "Segoe UI", system-ui, sans-serif;
  --gold: #f7cb3e; --gold-hi: #fff272; --gold-dk: #b47b19; --gold-edge: #3a2405; --glass: #6ef5ff; --stone: #cfcfc8; --text: #eef7e2;
  --page: #0b1007;
}
body.t-lime  { --co: #123004; --c1: #72d41e; --c2: #5fbc16; --c3: #4ca410; --c4: #3a8c0a; --c5: #2a7406; --b1: #101b0b; --b2: #182a10; --b3: #223a16; --hi: #c8f58a; --muted: #a9c398; --link: #c8f58a; }
body.t-amber { --co: #3e1402; --c1: #f48a12; --c2: #e2740e; --c3: #cf5f0a; --c4: #bb4c08; --c5: #a63c06; --b1: #1b130a; --b2: #2a1c0e; --b3: #3a2712; --hi: #ffd08a; --muted: #cbb596; --link: #ffd08a; }
body.t-cyan  { --co: #04303a; --c1: #5fe0f0; --c2: #3cc6da; --c3: #24a8c0; --c4: #148aa4; --c5: #0a6c86; --b1: #0b171b; --b2: #10242a; --b3: #16323a; --hi: #b6f6ff; --muted: #9cc0c8; --link: #b6f6ff; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { background: var(--page); color: var(--text); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img { display: block; max-width: 100%; }
img.r, img.i, img.art, .logo, .brand img { image-rendering: pixelated; }
b, strong { color: #fff; font-weight: 600; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--gold); color: #2a1a02; font-weight: 700; }
.skip:focus { left: 8px; }

/* stepped pixel corners: site.js sets --clip / --clip-in from data-r; without JS the panels are plain bordered boxes */
.px { position: relative; isolation: isolate; clip-path: var(--clip); background: var(--bd); padding: var(--bw); }
.px::before { content: ""; position: absolute; inset: var(--bw); background: var(--bg); clip-path: var(--clip-in); z-index: -1; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--b1); border-bottom: 3px solid var(--c5); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font: 700 22px/1.1 var(--pixel); min-width: 0; }
.brand b { color: var(--gold-hi); font: inherit; }
.brand .wiki { font: 700 12px/1 var(--caps); letter-spacing: .14em; text-transform: uppercase; color: #0c2402; background: #72d41e; padding: 5px 8px 6px; }
.toplinks { display: flex; gap: 6px; }
.toplinks a { font: 400 12px/1 var(--caps); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--hi); padding: 9px 12px; border: 2px solid var(--c4); background: var(--b3); }
.toplinks a:hover { background: var(--c5); color: #fff; }

.shell { max-width: 1240px; margin: 0 auto; padding: 24px 16px 40px; display: grid; grid-template-columns: 250px minmax(0, 880px); gap: 28px; justify-content: center; }
.col { min-width: 0; }
.side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow: auto; }
.side ul, .mnav ul { list-style: none; }
.side a, .mnav a { display: block; padding: 8px 12px; color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.3; border-left: 6px solid var(--b3); background: var(--b2); margin-bottom: 4px; }
.side a:hover, .mnav a:hover { border-left-color: var(--c2); color: #fff; }
.side a[aria-current], .mnav a[aria-current] { border-left-color: var(--gold); background: var(--b3); color: #fff; font-weight: 700; }
.mnav { display: none; margin-bottom: 20px; background: var(--b2); border: 3px solid var(--c5); }
.mnav summary { cursor: pointer; padding: 12px 14px; font: 700 13px/1.2 var(--caps); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); list-style: none; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary::after { content: " +"; }
.mnav[open] summary::after { content: " -"; }
.mnav ul { padding: 4px 10px 8px; }

/* banner: the logo's rings, pixel title, a render on each side */
main > * + *, .col > * + * { margin-top: 20px; }
.banner { --bd: var(--co); --bw: 3px; --bg: var(--c5); }
.banner::before { box-shadow: inset 0 0 0 6px var(--c1), inset 0 0 0 12px var(--c2), inset 0 0 0 18px var(--c3), inset 0 0 0 24px var(--c4); }
.banner > div { display: flex; align-items: center; gap: 18px; padding: 30px 36px; min-height: 130px; }
.banner .art { flex: none; max-height: 84px; width: auto; }
.banner .art.item { width: 64px; height: 64px; }
.banner .txt { flex: 1; min-width: 0; }
.kicker { font: 700 12px/1 var(--caps); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 2px 2px 0 var(--co); }
.banner h1 { margin-top: 8px; font: 700 42px/46px var(--pixel); color: #fbffe9; letter-spacing: .01em;
  text-shadow: 2px 0 0 var(--co), -2px 0 0 var(--co), 0 2px 0 var(--co), 0 -2px 0 var(--co), 2px 2px 0 var(--co), -2px -2px 0 var(--co), 2px -2px 0 var(--co), -2px 2px 0 var(--co), 2px 6px 0 var(--co), -2px 6px 0 var(--co), 0 6px 0 var(--co); }

/* panels (one per section) */
.panel { --bd: var(--c5); --bw: 3px; --bg: var(--b1); }
.panel > .in { padding: 22px 26px 26px; }
.in > * + * { margin-top: 14px; }
h2 { display: flex; align-items: center; gap: 10px; font: 700 14px/1.2 var(--caps); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
h2::after { content: ""; flex: 1; height: 3px; background: linear-gradient(90deg, var(--c2) 0 90px, var(--b3) 90px); }
h2 .anchor { order: 2; color: var(--muted); text-decoration: none; opacity: .75; font-size: 14px; }
h2:hover .anchor, h2 .anchor:focus { opacity: 1; color: var(--gold-hi); }
h2 { scroll-margin-top: 76px; }
p, li { max-width: 72ch; }
.in ul, .in ol { padding-left: 4px; }
.in ul { list-style: none; }
.in ul:not(.strip):not(.tiles) > li { position: relative; padding-left: 22px; }
.in ul:not(.strip):not(.tiles) > li::before { content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; background: var(--gold); box-shadow: 3px 3px 0 var(--gold-edge); }
.in ul ul { margin-top: 6px; }
.in li + li { margin-top: 6px; }
.in li > p + p, .in li > ul, .in li > p + ul { margin-top: 8px; }
.in ol { list-style: none; counter-reset: s; }
.in ol > li { counter-increment: s; position: relative; padding: 9px 14px 9px 56px; background: var(--b2); border-left: 6px solid var(--c2); max-width: none; }
.in ol > li::before { content: counter(s); position: absolute; left: 6px; top: 6px; width: 34px; font: 700 28px/32px var(--pixel); color: var(--gold-hi); text-shadow: 3px 3px 0 var(--gold-edge); text-align: center; }
.in ol > li + li { margin-top: 8px; }
em { color: var(--hi); font-style: italic; }
code { font: 14px/1.4 Consolas, "Cascadia Mono", monospace; color: var(--hi); background: var(--b3); padding: 1px 6px; border: 1px solid var(--c5); overflow-wrap: anywhere; }
pre { overflow-x: auto; padding: 12px 14px; background: var(--b2); border-left: 6px solid var(--c2); }
pre code { padding: 0; border: 0; background: none; }
blockquote.note { padding: 10px 14px; border-left: 6px solid var(--gold); background: var(--b2); color: var(--muted); }
hr { border: 0; height: 3px; background: var(--b3); }

/* tables */
.tablewrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 15px; line-height: 1.4; }
th { font: 400 12px/1.2 var(--caps); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 2px 10px 4px; text-align: left; white-space: nowrap; }
td { background: var(--b2); padding: 8px 10px; text-align: left; vertical-align: top; min-width: 9em; }
td code { overflow-wrap: normal; white-space: nowrap; }
td:first-child { font-weight: 700; color: #fff; border-left: 6px solid var(--c2); min-width: 9em; }

/* illustrations and screenshots */
.strip { display: flex; flex-wrap: wrap; gap: 8px; }
.in .strip > li { max-width: none; margin: 0; }
.in .strip { padding-left: 0; }
.tile { --bd: var(--c5); --bw: 3px; --bg: var(--b2); }
.tile > div { padding: 10px 10px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; }
.tile .r { height: 128px; min-width: 96px; display: flex; align-items: center; justify-content: center; }
.tile .r img.item { width: 64px; height: 64px; }
.tile .n { margin-top: 6px; font: 700 13px/1.25 var(--caps); letter-spacing: .04em; overflow-wrap: anywhere; color: #fff; text-transform: none; }
.tile .d { margin-top: 4px; font-size: 14px; line-height: 1.35; color: var(--muted); }
.tile.hot { --bd: var(--gold-dk); }
a.tile { display: block; text-decoration: none; color: inherit; }
a.tile:hover, a.tile:focus-visible { --bd: var(--gold); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.in .tiles > li { padding: 0; max-width: none; margin: 0; }
.tiles .r { height: 112px; }
.tiles .n { font-size: 12px; letter-spacing: 0; overflow-wrap: anywhere; }
a.tile { transition: transform .12s steps(2); }
a.tile:hover { transform: translateY(-3px); }
.pic { --bd: var(--co); --bw: 3px; --bg: var(--b3); max-width: 100%; }
.pic > div { border: 3px solid var(--c2); }
.pic img { width: 100%; height: auto; }
.pic figcaption { padding: 9px 14px 10px; font-size: 15px; line-height: 1.35; border-top: 3px solid var(--c4); background: var(--b3); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; justify-content: center; }
.chip { padding: 7px 12px 8px; font: 400 12px/1 var(--caps); letter-spacing: .1em; text-transform: uppercase; color: var(--hi); background: var(--b3); border: 3px solid var(--c4); clip-path: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px)); }
.chip.gold { color: #2a1a02; background: var(--gold); border-color: var(--gold-hi); font-weight: 700; }
.chip.glass { color: #032a33; background: var(--glass); border-color: #d6fcff; font-weight: 700; }
.chip.lime { color: #0c2402; background: #72d41e; border-color: #c8f58a; font-weight: 700; }

/* home hero */
.hero { --bd: var(--co); }
.hero > * + * { margin-top: 18px; }
.hero-top { display: flex; align-items: center; gap: 24px; }
.hero-top h1 { flex: 1; min-width: 0; }
.hero-top h1 img { width: 100%; height: auto; image-rendering: pixelated; }
.logo { flex: none; width: 128px; height: 128px; }
.stage { --bd: var(--co); --bw: 3px; --bg: var(--c5); }
.stage::before { box-shadow: inset 0 0 0 14px var(--c1), inset 0 0 0 28px var(--c2), inset 0 0 0 42px var(--c3), inset 0 0 0 56px var(--c4); }
.stage > div { display: flex; justify-content: center; padding: 76px 30px 70px; }
.stage img { width: 342px; height: auto; }
.tagline { text-align: center; font: 600 22px/1.3 var(--sans); color: #fff; max-width: none; }

/* prev / next, footer */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.pager a { --bd: var(--c5); --bw: 3px; --bg: var(--b2); display: block; text-decoration: none; }
.pager a > * { position: relative; display: block; padding-left: 16px; padding-right: 16px; }
.pager a span { padding-top: 10px; font: 400 12px/1 var(--caps); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pager a b { padding-top: 4px; padding-bottom: 12px; font-size: 16px; color: #fff; }
.pager a:hover { --bd: var(--gold); }
.pager .next { text-align: right; grid-column: 2; }
.pager .prev { grid-column: 1; }
.foot { margin-top: 28px; padding-top: 18px; border-top: 3px solid var(--b3); color: var(--muted); font-size: 15px; }
.foot p + p { margin-top: 6px; }
.foot a { color: var(--hi); }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .side, .toplinks { display: none; }
  .mnav { display: block; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand { font-size: 17px; }
  .brand .wiki { display: none; }
  .banner > div { padding: 28px 28px; gap: 10px; min-height: 0; }
  .banner h1 { font-size: 30px; line-height: 34px; }
  .banner .art { max-height: 48px; }
  .banner .art.item { width: 40px; height: 40px; }
  .panel > .in { padding: 18px 16px 20px; }
  .hero-top { flex-direction: column; gap: 12px; }
  .logo { width: 96px; height: 96px; }
  .stage::before { box-shadow: inset 0 0 0 8px var(--c1), inset 0 0 0 16px var(--c2), inset 0 0 0 24px var(--c3), inset 0 0 0 32px var(--c4); }
  .stage > div { padding: 44px 16px; }
  .stage img { width: 100%; max-width: 342px; }
  .tagline { font-size: 18px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .r { height: 96px; min-width: 0; }
  .pager { grid-template-columns: 1fr; }
  .pager .next, .pager .prev { grid-column: 1; text-align: left; }
}
@media (max-width: 400px) { .banner .art:last-child { display: none; } .banner > div { padding: 24px 22px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } a.tile { transition: none; } a.tile:hover { transform: none; } }
