/* Busy Bodies site styles (shared look with the Ex Nihilo Reborn site). Daylight theme by default, a night theme for dark mode or the header switch. */
:root {
  --bg: #f6f2e7;
  --surface: #fffdf6;
  --surface-2: #ece6d6;
  --ink: #211d17;
  --muted: #645d50;
  --line: #d8cfba;
  --link: #2c6a17;
  --accent: #3c8527;
  --accent-ink: #ffffff;
  --head: #1f1a14;
  --head-ink: #f4efe4;
  --head-muted: #b9b1a1;
  --sky-a: #58aaea;
  --sky-b: #93cdf5;
  --sky-c: #d3ecfb;
  --stars: 0;
  --hero-ink: #0c2646;
  --code: #ebe4d2;
  --pre: #231e18;
  --pre-ink: #efe8d8;
  --warn: #b86a14;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18171b; --surface: #201f24; --surface-2: #2a292f; --ink: #ece7dc; --muted: #a59f93; --line: #37353c; --link: #92d16a;
    --accent: #3f8d29; --head: #100f12; --head-ink: #f4efe4; --head-muted: #9f998d; --sky-a: #0b1030; --sky-b: #1d2a63; --sky-c: #43528f;
    --stars: 1; --hero-ink: #f1f4fb; --code: #2d2c33; --pre: #0f0e11; --pre-ink: #e9e3d6; --warn: #e3a04a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #18171b; --surface: #201f24; --surface-2: #2a292f; --ink: #ece7dc; --muted: #a59f93; --line: #37353c; --link: #92d16a;
  --accent: #3f8d29; --head: #100f12; --head-ink: #f4efe4; --head-muted: #9f998d; --sky-a: #0b1030; --sky-b: #1d2a63; --sky-c: #43528f;
  --stars: 1; --hero-ink: #f1f4fb; --code: #2d2c33; --pre: #0f0e11; --pre-ink: #e9e3d6; --warn: #e3a04a; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 "Source Sans 3", "Segoe UI", system-ui, sans-serif; }
img { max-width: 100%; }
.px, .it img, .slot img { image-rendering: pixelated; }
img[src$="_3d.png"] { image-rendering: auto !important; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; line-height: 1.1; letter-spacing: .005em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 3.1rem); }
h2 { font-size: 1.95rem; }
h3 { font-size: 1.4rem; font-weight: 600; }
p, ul, ol { margin: 0 0 1.05em; }
code, pre, kbd { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .84em; }
code { background: var(--code); padding: .12em .38em; }
pre { background: var(--pre); color: var(--pre-ink); padding: 16px 18px; overflow-x: auto; margin: 0 0 1.3em; border-left: 4px solid var(--accent); line-height: 1.55; }
pre code { background: none; padding: 0; font-size: .82rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pixel, .kicker, .label { font-family: "Silkscreen", "Barlow Condensed", monospace; }
.kicker { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--link); margin: 0 0 10px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--head); color: var(--head-ink); border-bottom: 4px solid #4f8f2c; box-shadow: 0 4px 0 #6c4a2e; }
.bar { display: flex; align-items: center; gap: 22px; height: 60px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.logo img { width: 30px; height: 30px; display: block; }
.logo img.wm { width: auto; height: 14px; }
.primary { display: flex; align-self: stretch; }
.primary a { display: flex; align-items: center; padding: 0 13px; color: var(--head-muted); text-decoration: none; font: 600 1.02rem "Barlow Condensed", sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.primary a:hover { color: var(--head-ink); }
.primary a.on { color: var(--head-ink); box-shadow: inset 0 -4px 0 #6db040; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search { position: relative; }
.search input { width: 210px; height: 36px; padding: 0 12px; border: 2px solid #3a332a; background: #14110d; color: var(--head-ink); font: inherit; font-size: .93rem; border-radius: 0; }
.search input::placeholder { color: #8d8576; }
.search input:focus { outline: none; border-color: #6db040; }
.search .results { position: absolute; right: 0; top: 44px; width: min(440px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(0, 0, 0, .25); display: none; max-height: 70vh; overflow: auto; }
.search .results.open { display: block; }
.search .results a { display: block; padding: 9px 12px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.search .results a:hover, .search .results a.sel { background: var(--surface-2); }
.search .results b { display: block; font: 600 1.05rem "Barlow Condensed", sans-serif; letter-spacing: .02em; }
.search .results span { font-size: .84rem; color: var(--muted); }
.theme { width: 36px; height: 36px; border: 2px solid #3a332a; background: #14110d; cursor: pointer; padding: 0; display: grid; place-items: center; }
.theme:hover { border-color: #6db040; }
.theme i { width: 14px; height: 14px; background: #f6d24a; box-shadow: 0 0 0 2px #14110d, 0 0 0 4px #f6d24a55; }
:root[data-theme="dark"] .theme i { background: #d9e2f5; box-shadow: inset -5px -3px 0 #14110d; border-radius: 50%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme i { background: #d9e2f5; box-shadow: inset -5px -3px 0 #14110d; border-radius: 50%; } }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; height: 36px; padding: 0 12px; display: flex; align-items: center; border: 2px solid #3a332a; font: 600 .95rem "Barlow Condensed", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; left: 0; right: 0; top: 60px; background: var(--head); border-bottom: 4px solid #4f8f2c; padding: 6px 20px 14px; display: grid; }
.menu nav a { padding: 12px 2px; color: var(--head-ink); text-decoration: none; border-bottom: 1px solid #332c23; font: 600 1.1rem "Barlow Condensed", sans-serif; letter-spacing: .07em; text-transform: uppercase; }
@media (max-width: 1020px) { .primary, .tools .btn { display: none; } .menu { display: block; } }
@media (max-width: 560px) { .logo img.wm { display: none; } .search input { width: 132px; } .bar { gap: 10px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px 15px; border: 2px solid #10130c; border-radius: 0; cursor: pointer; text-decoration: none; font: 700 1.12rem/1 "Barlow Condensed", sans-serif; letter-spacing: .07em; text-transform: uppercase; position: relative; }
.btn-get { background: #3c8527; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); box-shadow: inset 0 -5px 0 #2a641c, inset 0 2px 0 #62b043; }
.btn-stone { background: #c6c6c6; color: #1c1c1c; box-shadow: inset 0 -5px 0 #8b8b8b, inset 0 2px 0 #f4f4f4; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(2px); padding-bottom: 13px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3); }
.btn.sm { padding: 7px 14px 10px; font-size: .95rem; box-shadow: inset 0 -3px 0 #2a641c, inset 0 2px 0 #62b043; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #f6d24a; outline-offset: 2px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 55%, var(--sky-c) 100%); color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: var(--stars); background-image: radial-gradient(1.5px 1.5px at 12% 22%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 31% 9%, #fff 99%, transparent), radial-gradient(2px 2px at 47% 31%, #dfe8ff 99%, transparent), radial-gradient(1.5px 1.5px at 63% 14%, #fff 99%, transparent), radial-gradient(2px 2px at 78% 27%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 91% 8%, #dfe8ff 99%, transparent), radial-gradient(1.5px 1.5px at 22% 48%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 85% 52%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 55% 58%, #dfe8ff 99%, transparent); }
.cloud { position: absolute; left: 0; opacity: .92; animation: drift linear infinite; will-change: transform; }
.cloud svg { display: block; width: 100%; height: auto; }
.cloud.c1 { top: 12%; width: 176px; animation-duration: 140s; animation-delay: -30s; }
.cloud.c2 { top: 38%; width: 120px; animation-duration: 190s; animation-delay: -120s; opacity: .7; }
.cloud.c3 { top: 62%; width: 216px; animation-duration: 165s; animation-delay: -75s; opacity: .8; }
.cloud.c4 { top: 24%; width: 96px; animation-duration: 220s; animation-delay: -170s; opacity: .6; }
:root[data-theme="dark"] .cloud { opacity: .16; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cloud { opacity: .16; } }
@keyframes drift { from { transform: translateX(-240px); } to { transform: translateX(100vw); } }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: 24px; padding-top: 64px; padding-bottom: 96px; }
.eyebrow { display: inline-block; font: 400 .74rem "Silkscreen", monospace; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 20px; background: rgba(12, 32, 62, .5); padding: 6px 10px 7px; }
.hero h1 { margin: 0 0 22px; }
.hero h1 img { display: block; width: min(560px, 100%); height: auto; }
.hero .lead { font-size: 1.32rem; font-weight: 600; line-height: 1.5; max-width: 31em; margin: 0 0 26px; color: var(--hero-ink); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font: 400 .72rem "Silkscreen", monospace; letter-spacing: .08em; text-transform: uppercase; }
.facts li { background: rgba(12, 32, 62, .42); padding: 6px 10px 7px; }
.facts li::before { content: ""; display: inline-block; width: 7px; height: 7px; background: #b6ec7a; margin-right: 8px; }
.hero-art { display: grid; place-items: center; }
.island { width: min(300px, 62vw); height: auto; animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-12px); } }
.ground { height: 36px; background: url(/img/terrain.svg) repeat-x left top / auto 36px; image-rendering: pixelated; }
.hero .ground { position: absolute; left: 0; right: 0; bottom: 0; }
@media (prefers-reduced-motion: reduce) { .cloud, .island { animation: none; } .cloud { transform: translateX(30vw); } }
@media (max-width: 860px) { .hero-in { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 72px; } .hero-art { order: -1; } .island { width: 170px; } .hero .lead { font-size: 1.12rem; } }

/* ---------- home bands ---------- */
.band { padding: 68px 0; }
.band.alt { background: var(--surface); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.band.dark { background: var(--head); color: var(--head-ink); }
.band.dark a:not(.btn) { color: #9fdd62; }
.band.dark .muted { color: var(--head-muted); }
.band-head { max-width: 44em; margin: 0 0 34px; }
.band-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 12px; }
.band-head p:last-child { margin: 0; color: var(--muted); font-size: 1.1rem; }
.band.dark .band-head p:last-child { color: var(--head-muted); }
.more { font: 700 1.05rem "Barlow Condensed", sans-serif; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.more::after { content: " →"; }
.more:hover { text-decoration: underline; }

/* inventory slot */
.slot { width: 44px; height: 44px; background: #8b8b8b; box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; display: grid; place-items: center; position: relative; flex: none; font: 700 15px/1 "Barlow Condensed", sans-serif; color: #2e2e2e; }
.slot img { position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; object-fit: contain; display: block; max-width: none; }
.slot.lg { width: 68px; height: 68px; box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff; }
.slot.lg img { width: 48px; height: 48px; margin: -24px 0 0 -24px; }

/* the loop */
.loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: n; }
.loop li { position: relative; padding: 0 14px 0 0; }
.loop a { display: block; color: inherit; text-decoration: none; }
.loop .slot { margin-bottom: 14px; }
.loop li:not(:last-child)::after { content: ""; position: absolute; left: 80px; right: 12px; top: 32px; height: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.loop b { display: block; font: 700 1.3rem "Barlow Condensed", sans-serif; letter-spacing: .01em; }
.loop b::before { counter-increment: n; content: counter(n, decimal-leading-zero); font: 400 .68rem "Silkscreen", monospace; color: var(--link); display: block; letter-spacing: .08em; margin-bottom: 3px; }
.loop span { display: block; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.loop a:hover b { color: var(--link); }
@media (max-width: 980px) { .loop { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 0; } .loop li::after { display: none; } }
@media (max-width: 520px) { .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* split feature rows */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split.flip .split-art { order: -1; }
.split h2 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin: 0 0 14px; }
.split-art { display: grid; place-items: center; min-width: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.3em; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: .45em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; background: #6db040; box-shadow: inset -2px -2px 0 #3f7a20; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 30px; } .split.flip .split-art { order: 0; } }

/* in-game mock-ups */
.scene { width: 100%; padding: 34px 20px; background: linear-gradient(180deg, var(--sky-a), var(--sky-b)); border: 2px solid var(--ink); box-shadow: 8px 8px 0 rgba(0, 0, 0, .14); display: grid; place-items: center; overflow: hidden; }
.mc-tip { max-width: 100%; background: rgba(22, 6, 26, .95); padding: 9px 12px 10px; border: 3px solid #2d0b62; box-shadow: 0 0 0 3px #120313; font: 500 17px/1.32 "Pixelify Sans", monospace; color: #fff; text-shadow: 2px 2px 0 #3e3e3e; text-align: left; overflow: hidden; }
.mc-tip div { white-space: nowrap; }
.mc-tip .g { color: #a8a8a8; text-shadow: 2px 2px 0 #2a2a2a; }
.mc-tip .d { color: #00a800; text-shadow: 2px 2px 0 #002a00; }
.mc-tip .b { color: #5454fc; text-shadow: 2px 2px 0 #15153e; font-style: italic; }
.mc-gui { width: min(420px, 100%); background: #c6c6c6; border: 2px solid #0e0e0e; box-shadow: inset 3px 3px 0 #fdfdfd, inset -3px -3px 0 #555; padding: 14px 16px 16px; color: #3f3f3f; font: 500 16px/1.3 "Pixelify Sans", monospace; text-align: left; }
.mc-gui h4 { font: inherit; margin: 0 0 10px; }
.tier { display: grid; grid-template-columns: 24px 1fr 58px; align-items: center; gap: 10px; margin-top: 7px; }
.tier .bar { height: 14px; background: #8b8b8b; box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; padding: 2px; }
.tier .bar i { display: block; height: 100%; background: #5daa3c; box-shadow: inset 0 2px 0 #84cf5f; }
.tier em { font-style: normal; text-align: right; }
.slots { display: flex; flex-wrap: wrap; gap: 0; background: #c6c6c6; border: 2px solid #0e0e0e; box-shadow: inset 3px 3px 0 #fdfdfd, inset -3px -3px 0 #555; padding: 12px; width: fit-content; max-width: 100%; }

/* the game's HUD, drawn from its own sprites; --u is the size of one HUD pixel */
.hud { --u: 2.6px; width: calc(182 * var(--u)); position: relative; flex: none; }
.hud * { image-rendering: pixelated; }
.hud-row { display: flex; justify-content: space-between; }
.hearts, .food { display: flex; }
.food { flex-direction: row-reverse; }
.hearts i, .food i { width: calc(8 * var(--u)); height: calc(9 * var(--u)); background-repeat: no-repeat; background-size: calc(9 * var(--u)) calc(9 * var(--u)); }
.hearts i { background-image: url(/img/hud/heart_full.png), url(/img/hud/heart_container.png); }
.food i { background-image: url(/img/hud/food_full.png), url(/img/hud/food_empty.png); }
.xp { position: relative; height: calc(5 * var(--u)); margin: calc(8 * var(--u)) 0 calc(2 * var(--u)); background: url(/img/hud/experience_bar_background.png) 0 0 / 100% 100%; }
.xp i { display: block; height: 100%; width: 64%; background: url(/img/hud/experience_bar_progress.png) 0 0 / calc(182 * var(--u)) 100% no-repeat; }
.xp b { position: absolute; left: 0; right: 0; bottom: calc(3 * var(--u)); text-align: center; font: 500 calc(8 * var(--u)) / 1 "Pixelify Sans", monospace; color: #80ff20; text-shadow: var(--u) 0 0 #000, calc(-1 * var(--u)) 0 0 #000, 0 var(--u) 0 #000, 0 calc(-1 * var(--u)) 0 #000; }
.hotbar { position: relative; height: calc(22 * var(--u)); background: url(/img/hud/hotbar.png) 0 0 / 100% 100%; }
.hb-sel { position: absolute; left: calc((var(--i) * 20 - 1) * var(--u)); top: calc(-1 * var(--u)); width: calc(24 * var(--u)); height: calc(23 * var(--u)); background: url(/img/hud/hotbar_selection.png) 0 0 / 100% 100%; }
.hb-i { position: absolute; left: calc((var(--i) * 20 + 3) * var(--u)); top: calc(3 * var(--u)); width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.hb-i img { width: 100%; height: 100%; display: block; }
.hb-i b { position: absolute; right: 0; bottom: calc(-1 * var(--u)); font: 500 calc(8 * var(--u)) / 1 "Pixelify Sans", monospace; color: #fff; text-shadow: var(--u) var(--u) 0 #3f3f3f; }
.scene.world { position: relative; padding: 0; min-height: 350px; align-content: end; place-items: end center; }
.scene.world .hud { margin-bottom: 46px; z-index: 1; }
.scene.world .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background-size: auto 30px; }
.scene.world .isle { position: absolute; left: 50%; top: 22px; width: 96px; margin-left: -48px; image-rendering: pixelated; }
@media (max-width: 560px) { .hud { --u: 1.7px; } .scene.world { min-height: 220px; } .scene.world .isle { width: 84px; margin-left: -42px; } }

/* screenshots */
figure.shot { margin: 0 0 1.5em; border: 2px solid var(--line); background: var(--surface); }
figure.shot a { display: block; }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot figcaption { padding: 9px 14px 10px; font-size: .93rem; line-height: 1.45; color: var(--muted); border-top: 2px solid var(--line); }
.prose figure.shot { max-width: 680px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery figure.shot { margin: 0; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .gallery { grid-template-columns: minmax(0, 1fr); } }
.gallery.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (max-width: 540px) { .gallery.two { grid-template-columns: minmax(0, 1fr); } }

/* wiki index */
.index { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 36px 40px; }
.index h3 { font: 400 .72rem "Silkscreen", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; border-bottom: 2px solid var(--line); margin-bottom: 6px; }
.index ul { list-style: none; margin: 0; padding: 0; }
.index li { border-bottom: 1px solid var(--line); }
.index a { display: block; padding: 11px 0; text-decoration: none; color: var(--ink); }
.index a b { display: block; font: 700 1.22rem "Barlow Condensed", sans-serif; letter-spacing: .01em; }
.index a span { display: block; color: var(--muted); font-size: .93rem; }
.index a:hover b { color: var(--link); }

/* download band */
.get { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; }
.get h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 10px; }
.get ul { margin: 0; padding-left: 1.1em; color: var(--head-muted); }
@media (max-width: 760px) { .get { grid-template-columns: 1fr; } }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 228px minmax(0, 1fr) 196px; gap: 44px; padding-top: 34px; padding-bottom: 80px; align-items: start; }
.docs.wide { grid-template-columns: 228px minmax(0, 1fr); }
.nav { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; font-size: .97rem; padding-right: 6px; }
.nav summary { display: none; }
.nav h4 { font: 400 .68rem "Silkscreen", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; }
.nav h4:first-of-type { margin-top: 0; }
.nav a { display: block; padding: 4px 0 4px 12px; border-left: 3px solid var(--line); color: var(--ink); text-decoration: none; line-height: 1.35; }
.nav a:hover { border-left-color: var(--muted); }
.nav a.on { border-left-color: #5fa035; color: var(--link); font-weight: 600; }
.toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; font-size: .9rem; }
.toc .label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
@media (max-width: 1180px) { .docs { grid-template-columns: 228px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 900px) {
  .docs, .docs.wide { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 18px; }
  .nav { position: static; max-height: none; border: 2px solid var(--line); background: var(--surface); padding: 2px 14px; }
  .nav summary { display: block; cursor: pointer; padding: 11px 0; font: 700 1.1rem "Barlow Condensed", sans-serif; letter-spacing: .06em; text-transform: uppercase; }
  .nav[open] { padding-bottom: 14px; }
}

.prose { min-width: 0; }
.crumbs { font: 400 .68rem "Silkscreen", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--link); }
.prose > h1 { margin-bottom: 14px; }
.lead { font-size: 1.22rem; line-height: 1.5; color: var(--muted); margin-bottom: 1.4em; }
.prose h2 { margin: 2.3em 0 .7em; padding-bottom: .3em; border-bottom: 2px solid var(--line); }
.prose h3 { margin: 1.8em 0 .55em; }
.anchor { display: none; }
.prose h2 .anchor, .prose h3 .anchor { display: inline; margin-left: .35em; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .anchor:focus { opacity: 1; }
.prose li { margin-bottom: .3em; }
.updated { margin-top: 56px; font: 400 .66rem "Silkscreen", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.pager a { display: block; padding: 14px 16px; border: 2px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: #5fa035; }
.pager a small { display: block; font: 400 .66rem "Silkscreen", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pager a b { font: 700 1.25rem "Barlow Condensed", sans-serif; }
.pager a.next { text-align: right; grid-column: 2; }

.note { position: relative; background: var(--surface); border: 2px solid var(--line); border-left: 6px solid #5fa035; padding: 14px 16px 14px 54px; margin: 0 0 1.4em; }
.note::before { content: "i"; position: absolute; left: 14px; top: 15px; width: 24px; height: 24px; display: grid; place-items: center; background: #5fa035; color: #fff; font: 700 .8rem "Silkscreen", monospace; }
.note.warn { border-left-color: var(--warn); }
.note.warn::before { content: "!"; background: var(--warn); }
.note > :last-child { margin-bottom: 0; }
.jump { border: 2px solid var(--line); background: var(--surface); padding: 12px 16px; margin: 0 0 1.5em; font-size: .95rem; }
.jump ol { margin: 0; padding-left: 1.3em; columns: 3 150px; }

.steps { list-style: none; padding: 0; margin: 0 0 1em; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 26px 64px; }
.steps > li::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 42px; height: 42px; display: grid; place-items: center; background: #8b8b8b; color: #fff; box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; font: 400 .85rem "Silkscreen", monospace; text-shadow: 2px 2px 0 #3a3a3a; }
.steps > li::after { content: ""; position: absolute; left: 19px; top: 50px; bottom: 6px; width: 4px; background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 14px); }
.steps > li:last-child::after { display: none; }
.steps > li h3 { margin: 0 0 8px; padding-top: 7px; font-size: 1.5rem; font-weight: 700; }

.it { white-space: nowrap; }
.it img { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; margin-right: 6px; }
.it .n { color: var(--muted); font-size: .88em; }
.fluid { white-space: nowrap; }
.fluid::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 6px; background: var(--c, #3f76e4); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .28), inset 2px 2px 0 rgba(255, 255, 255, .28); }
.tag { display: inline-block; padding: 2px 8px 3px; font: 400 .62rem "Silkscreen", monospace; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.tag.good { background: #5fa035; color: #fff; }
.tag.warn { background: var(--warn); color: #fff; }

.tbl { overflow-x: auto; border: 2px solid var(--line); background: var(--surface); margin: 0 0 1.5em; }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th { background: var(--surface-2); text-align: left; padding: 9px 12px; white-space: nowrap; font: 700 .92rem "Barlow Condensed", sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line); }
td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 38%, transparent); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.none { text-align: right; color: var(--line); }
.filter { width: 100%; max-width: 380px; height: 40px; padding: 0 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .97rem; border-radius: 0; margin: 0 0 14px; }
.filter:focus { outline: none; border-color: #5fa035; }
details.more { margin: 0 0 1.4em; }
details.more > summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }

/* crafting, drawn like the game's own screens */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; margin: 0 0 1.5em; }
.recipe { background: #c6c6c6; border: 2px solid #0e0e0e; box-shadow: inset 3px 3px 0 #fdfdfd, inset -3px -3px 0 #555; padding: 12px 14px 14px; color: #2c2c2c; }
.recipe h4 { font: 700 1.12rem "Barlow Condensed", sans-serif; letter-spacing: .02em; color: #2c2c2c; margin: 0 0 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.recipe .it .n, .recipe .tag { color: #4a4a4a; }
.recipe .tag { background: #a9a9a9; }
.craft { display: flex; align-items: center; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(3, 40px); gap: 0; }
.grid.one { grid-template-columns: 40px; }
.grid .slot { width: 40px; height: 40px; }
.grid .slot img { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
.arrow { width: 30px; height: 20px; flex: none; background: #8b8b8b; clip-path: polygon(0 35%, 60% 35%, 60% 0, 100% 50%, 60% 100%, 60% 65%, 0 65%); }
.legend { list-style: none; margin: 10px 0 0; padding: 0; font-size: .88rem; display: grid; gap: 1px; color: #2c2c2c; }
.legend b { display: inline-block; min-width: 1.3em; font: 700 .95rem "Barlow Condensed", sans-serif; color: #555; }

/* ---------- addons ---------- */
.addon { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; border: 2px solid var(--line); background: var(--surface); padding: 22px; text-decoration: none; color: var(--ink); margin: 0 0 16px; }
a.addon:hover { border-color: #5fa035; }
.addon h3 { font-size: 1.6rem; font-weight: 700; margin: 0 0 6px; }
.addon h3 .tag { margin-left: 8px; position: relative; top: -3px; }
.addon > div { align-self: center; }
.addon p { margin: 0; color: var(--muted); }
.addon.empty { border-style: dashed; background: none; }

/* ---------- contact ---------- */
.pitch { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 52px; align-items: start; }
.pitch h1 { margin-bottom: 14px; }
.pitch h3 { margin: 1.5em 0 .5em; }
form.contact { display: grid; gap: 16px; background: var(--surface); border: 2px solid var(--line); padding: 26px; }
form.contact h2 { margin: 0 0 4px; border: 0; padding: 0; font-size: 1.7rem; }
form.contact label { display: grid; gap: 6px; font: 700 .95rem "Barlow Condensed", sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
form.contact label span { font: 400 .85rem "Source Sans 3", sans-serif; letter-spacing: 0; text-transform: none; }
form.contact input, form.contact select, form.contact textarea { font: 400 1rem "Source Sans 3", sans-serif; letter-spacing: 0; text-transform: none; padding: 10px 12px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 0; width: 100%; }
form.contact input:focus, form.contact select:focus, form.contact textarea:focus { outline: none; border-color: #5fa035; }
form.contact textarea { min-height: 170px; resize: vertical; }
form.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { display: none; padding: 12px 14px; border: 2px solid; }
.status.ok { display: block; border-color: #5fa035; background: color-mix(in srgb, #5fa035 14%, transparent); }
.status.err { display: block; border-color: #c2452d; background: color-mix(in srgb, #c2452d 12%, transparent); }
@media (max-width: 900px) { .pitch { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 560px) { form.contact .row { grid-template-columns: 1fr; } form.contact { padding: 18px; } }

/* ---------- footer ---------- */
.site-foot { background: var(--head); color: var(--head-muted); font-size: .95rem; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 44px 0 30px; }
.site-foot h4 { font: 400 .68rem "Silkscreen", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--head-ink); margin: 0 0 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot a { color: var(--head-muted); text-decoration: none; }
.site-foot a:hover { color: var(--head-ink); }
.site-foot .about img { height: 14px; width: auto; display: block; margin-bottom: 14px; }
.site-foot .legal { border-top: 1px solid #332c23; padding: 16px 0 26px; font-size: .82rem; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .about { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.void { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.void h1 { margin-bottom: 12px; }

@media (max-width: 520px) { .mc-tip { font-size: 13px; padding: 7px 9px; } .scene { padding: 22px 10px; } }

/* ---------- Busy Bodies ---------- */
.site-head { border-bottom-color: #c6c6c6; box-shadow: 0 4px 0 #555; }
.primary a.on { box-shadow: inset 0 -4px 0 #f5b83d; }
.logo img.wm { height: 14px; }
.hero-art .mark { width: min(300px, 62vw); height: auto; animation: bob 7s ease-in-out infinite; filter: drop-shadow(8px 8px 0 rgba(12, 32, 62, .28)); }
@media (prefers-reduced-motion: reduce) { .hero-art .mark { animation: none; } }
@media (max-width: 860px) { .hero-art .mark { width: 170px; } }

/* a vanilla GUI window */
.win { background: #c6c6c6; border: 2px solid #0e0e0e; box-shadow: inset 3px 3px 0 #fdfdfd, inset -3px -3px 0 #555; padding: 18px 20px 20px; color: #2c2c2c; }
.win h3 { display: flex; align-items: center; gap: 12px; font: 700 1.5rem "Barlow Condensed", sans-serif; color: #2c2c2c; margin: 0 0 10px; }
.win h3 img { width: 32px; height: 32px; image-rendering: pixelated; }
.win p { margin: 0 0 .6em; }
.win p:last-child { margin: 0; }
.win code { background: #a9a9a9; color: #1c1c1c; }
.win a { color: #1f5a10; }
.wins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 1.5em; }
@media (max-width: 860px) { .wins { grid-template-columns: 1fr; } }
.pixel-art { image-rendering: pixelated; max-width: 100%; height: auto; display: block; }

/* photos */
figure.shot.wide { max-width: none; }
.prose figure.shot.wide { max-width: none; }
.photo-note { font: 400 .68rem "Silkscreen", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: -6px 0 18px; }
.numbers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.numbers li { border: 2px solid #332c23; padding: 18px 18px 16px; }
.numbers b { display: block; font: 700 2.6rem/1 "Barlow Condensed", sans-serif; color: #f5b83d; }
.numbers span { color: var(--head-muted); font-size: .95rem; }
@media (max-width: 760px) { .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
td .tag { white-space: nowrap; }
