/* Wendermods Docs: player guides for the team's Minecraft mods. Tokens, buttons, nav, brand,
   cards and footer follow the main site (wendermods.team/styles.css); the rest is docs-only. */

/* fonts, served from this site. Both are under the SIL Open Font License (assets/fonts/OFL-*.txt). */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/onest-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/onest-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: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/pixelify-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/pixelify-sans-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 {
  /* the main site's tokens, unchanged */
  --bg: #000d1f;
  --surface: #061a33;
  --surface-2: #0a2342;
  --line: rgba(140, 175, 225, 0.12);
  --line-2: rgba(140, 175, 225, 0.22);
  --field: #0d284c;
  --field-hover: #11305a;

  --text: #eef2f8;
  --text-2: #a9b8d0;
  --text-3: #8497b6;
  --link: #8cbcff;

  --accent: #2f86ff;
  --focus: #6fb0ff;
  --pos: #24ae56;

  --ink: #0c1f35;

  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --pixel: "Pixelify Sans", var(--font);
  --gutter: 24px;
  --max: 1240px;
  --card: linear-gradient(180deg, #071d39 0%, #051630 100%);

  /* docs only */
  --prose: #d3dcea;           /* long-form text: a touch softer than --text, 12:1 on --bg */
  --slot: #102a4c;            /* inventory slots, as on the main site's portfolio */
  --slot-dark: #041127;
  --slot-light: #2a4c7b;
  --fam: #8497b6;             /* a card's effect-family colour, set inline per card */

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* every pixel-art image: nearest-neighbour, never smoothed */
.px { image-rendering: crisp-edges; image-rendering: pixelated; }

/* ---------- buttons (main site) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.12s, color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--sm { height: 42px; padding: 0 15px; font-size: 15px; border-radius: 12px; }
.btn--lg { height: 60px; padding: 0 26px 0 24px; font-size: 19px; border-radius: 17px; }
.btn--primary {
  color: #fff;
  background: #1b65f5 linear-gradient(180deg, #3a82fb 0%, #1b65f5 40%, #1553d8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(0, 24, 90, 0.28),
    0 12px 32px -10px rgba(40, 120, 255, 0.75);
}
.btn--primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(0, 24, 90, 0.28),
    0 14px 38px -8px rgba(40, 120, 255, 0.95);
}
.btn--white { background: #f4f6fa; color: #081a31; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1); }
.btn--white:hover { background: #fff; }
.btn--white svg { width: 14px; height: 14px; }
.btn--ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.13); }

/* ---------- nav (main site) ---------- */

.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin-top: 14px;
  padding: 0 var(--gutter);
  pointer-events: none;
  --nav-move: 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: calc(var(--max) + 24px);
  margin: 0 auto;
}
.nav__group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 20px;
  pointer-events: auto;
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  backdrop-filter: blur(0px) saturate(100%);
  transition: background-color var(--nav-move), box-shadow var(--nav-move),
    -webkit-backdrop-filter var(--nav-move), backdrop-filter var(--nav-move);
}
.is-scrolled .nav__group, html:not(.js) .nav__group {
  background: rgba(6, 26, 54, 0.8);
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-right: 8px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.brand__tile {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: #f4f6fa;
  color: #04142b;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.brand__tile svg { width: 20px; height: 16px; }
.brand__name { white-space: nowrap; }
.brand__docs {
  margin-left: -3px;
  padding: 5px 8px 6px;
  border-radius: 8px;
  background: rgba(47, 134, 255, 0.2);
  color: #b5d4ff;
  font: 500 16px/1 var(--pixel);
  letter-spacing: 0.02em;
}

.nav__links { display: flex; gap: 2px; }
.nav__links a, .nav__icon {
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.nav__links a { padding: 10px 13px; font-size: 16px; font-weight: 500; white-space: nowrap; }
.nav__links a:hover, .nav__icon:hover { background: rgba(255, 255, 255, 0.07); }
.nav__links a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); }
.nav__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  color: var(--text-2);
}
.nav__icon:hover { color: #fff; }
.nav__icon svg { width: 19px; height: 19px; }
.nav__group--right .btn { margin-left: 4px; }

.nav__menu {
  display: none;
  place-items: center;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.nav__menu svg { width: 18px; height: 18px; }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: var(--gutter);
  right: var(--gutter);
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(6, 26, 54, 0.98);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.menu > a {
  padding: 14px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}
.menu > a:hover, .menu > a[aria-current="page"] { background: rgba(255, 255, 255, 0.06); }
.menu__ext { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.menu__ext a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
}
.menu__ext svg { width: 16px; height: 16px; }

/* ---------- shared bits ---------- */

.label {
  margin-bottom: 10px;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
}
.badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips--icons { gap: 4px; }

.eyebrow {
  display: inline-block;
  padding: 6px 11px 7px;
  border-radius: 9px;
  background: rgba(47, 134, 255, 0.18);
  color: #b5d4ff;
  font: 500 17px/1 var(--pixel);
  letter-spacing: 0.03em;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-3);
  font-size: 14.5px;
}
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--text-3); opacity: 0.7; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.crumbs-wrap { max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 28px var(--gutter) 0; }
.crumbs-wrap--doc { padding: 0; margin: 0 0 18px; }

/* ---------- inventory slots ---------- */

.slot {
  --s: 48px;
  --bevel: 3px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: calc(var(--s) * 1.25);
  height: calc(var(--s) * 1.25);
  background: var(--slot);
  box-shadow: inset var(--bevel) var(--bevel) 0 var(--slot-dark), inset calc(var(--bevel) * -1) calc(var(--bevel) * -1) 0 var(--slot-light);
  color: var(--text);
  text-decoration: none;
  vertical-align: middle;
}
.slot--32 { --s: 32px; --bevel: 2px; }
.slot--48 { --s: 48px; }
.slot--64 { --s: 64px; --bevel: 4px; }
.slot--96 { --s: 96px; --bevel: 4px; }
.slot--128 { --s: 128px; --bevel: 5px; }
.slot img { width: var(--s); height: var(--s); }
a.slot { transition: background-color 0.15s; }
a.slot:hover { background: #17406f; }
a.slot:focus-visible { outline-offset: 2px; }
.slot__count {
  position: absolute;
  right: calc(var(--bevel) + 1px);
  bottom: 0;
  color: #fff;
  font: 500 max(15px, calc(var(--s) * 0.36))/1 var(--pixel);
  text-shadow: 2px 2px 0 #3a3a3a;
  white-space: nowrap;
  pointer-events: none;
}
.slot__text {
  padding: 3px;
  color: var(--text-2);
  font-size: max(10px, calc(var(--s) * 0.22));
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}
.cycle { display: grid; }
.cycle img { grid-area: 1 / 1; opacity: 0; transition: opacity 0.25s; }
.cycle img.is-on { opacity: 1; }

/* the game's own light-grey crafting UI */
.slot--gui {
  width: calc(var(--s) * 1.125 + 6px);
  height: calc(var(--s) * 1.125 + 6px);
  background: #8b8b8b;
  box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff;
}
.slot--gui .slot__text { color: #262626; }
a.slot--gui:hover { background: #a2a2a2; }
.slot--out { width: calc(var(--s) * 1.125 + 26px); height: calc(var(--s) * 1.125 + 26px); }

/* ---------- inline chips (data links in prose, lists of items) ---------- */

.ref {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  margin: 1px 0;
  padding: 0 9px 0 2px;
  border-radius: 9px;
  background: rgba(140, 175, 225, 0.1);
  color: var(--text);
  font-weight: 550;
  line-height: 1.25;
  text-decoration: none;
  vertical-align: middle;
  transition: background-color 0.15s, color 0.15s;
}
.ref img { width: 32px; height: 32px; margin: -3px 0; flex: none; }
.ref--plain { padding: 0 9px; }
a.ref { box-shadow: inset 0 0 0 1px var(--line-2); }
a.ref span { text-decoration: underline; text-decoration-color: rgba(140, 188, 255, 0.5); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a.ref:hover { background: rgba(140, 175, 225, 0.2); color: #fff; }
a.ref:hover span { text-decoration-color: currentColor; }
.ref--family { box-shadow: inset 3px 0 0 var(--fam), inset 0 0 0 1px var(--line-2) !important; }
.chips .ref { font-size: 15px; }

/* ---------- prose pages ---------- */

.doc {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 24px var(--gutter) 24px;
}
.side { display: none; }
.prose { min-width: 0; }
.prose__title {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}
.prose__lede {
  max-width: 46ch;
  margin-top: 16px;
  color: var(--text-2);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  text-wrap: pretty;
}
.prose > p, .prose > ul, .prose > ol, .prose > blockquote {
  max-width: 68ch;
  margin: 20px 0 0;
  color: var(--prose);
  font-size: 18px;
  line-height: 1.75;
  text-wrap: pretty;
}
.prose__lede + p { margin-top: 32px; }
.prose > h2 {
  margin: 76px 0 0;
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}
.prose > h3 { margin: 44px 0 0; font-size: 23px; font-weight: 600; letter-spacing: -0.02em; }
.prose > h4 { margin: 32px 0 0; font-size: 19px; font-weight: 600; }
.prose > :is(p, ul, ol, blockquote, h2, h3, h4) a:not(.ref) { color: var(--link); text-underline-offset: 3px; }
.prose > :is(p, ul, ol, blockquote, h2, h3, h4) a:not(.ref):hover { color: #fff; }
.prose strong { color: var(--text); }
.prose code { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); font: 0.9em var(--mono); }
.prose pre.code { max-width: 100%; margin: 20px 0 0; padding: 16px; overflow-x: auto; border-radius: 14px; background: #03122a; }
.prose pre.code code { padding: 0; background: none; }
.prose > ul { padding-left: 1.3em; }
.prose > ul li::marker { color: var(--text-3); }
.prose > ol { padding: 0; list-style: none; counter-reset: step; }
.prose > ol > li {
  position: relative;
  padding-left: 46px;
  counter-increment: step;
}
.prose > ol > li + li { margin-top: 12px; }
.prose > ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0.12em;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: #f4f6fa;
  color: #04142b;
  font: 500 18px/1 var(--pixel);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.prose > blockquote { padding: 4px 0 4px 18px; border-left: 3px solid var(--line-2); }
.embed { margin-top: 28px; }
.prose > h2 + .embed, .prose > h3 + .embed { margin-top: 24px; }

.mobnav {
  margin: 0 0 26px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.mobnav summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.mobnav summary::-webkit-details-marker { display: none; }
.mobnav summary::after {
  content: "";
  width: 10px; height: 10px;
  flex: none;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate 0.2s;
}
.mobnav[open] summary::after { rotate: 225deg; translate: 0 3px; }
.mobnav__count { margin-left: auto; color: var(--text-3); font-size: 14px; font-weight: 500; }
.mobnav .side__list { margin: 0; padding: 0 8px 10px; }

.side__mod {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.side__mod:hover { background: rgba(255, 255, 255, 0.05); }
.side__list { display: grid; gap: 2px; margin: 18px 0 0; padding: 0; list-style: none; }
.side__list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.side__list a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.side__list a[aria-current="page"] { background: rgba(47, 134, 255, 0.16); color: #fff; }
.side__n {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex: none;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  font: 500 15px/1 var(--pixel);
}
[aria-current="page"] > .side__n { background: #f4f6fa; color: #04142b; }
.side__head { margin: 32px 0 8px 12px; }
.side__toc { margin: 0; padding: 0 0 0 12px; list-style: none; }
.side__toc a {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid var(--line-2);
  color: var(--text-3);
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
}
.side__toc a:hover { border-left-color: var(--text-2); color: var(--text); }

.pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 88px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.pager__link {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
  transition: box-shadow 0.15s;
}
.pager__link:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 1px var(--line-2); }
.pager__link--next { text-align: right; }
.pager__k { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 14px; font-weight: 600; }
.pager__link--next .pager__k { justify-content: flex-end; }
.pager__k svg { width: 14px; height: 14px; }
.pager__t { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- cards from embeds ---------- */

.cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.cards--recipes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.cards--crops { grid-template-columns: minmax(0, 1fr); }
.cards--stations { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.cards--families { grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); }
.cards--crafting { grid-template-columns: minmax(0, 1fr); }

.rcard, .crop, .station, .craft, .fam {
  position: relative;
  min-width: 0;
  padding: 22px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rcard[style], .fam { box-shadow: inset 0 4px 0 var(--fam), inset 0 0 0 1px var(--line); }
:target { scroll-margin-top: 96px; }
.rcard:target, .crop:target, .station:target, .craft:target, .fam:target {
  box-shadow: inset 0 0 0 2px var(--focus), 0 0 0 4px rgba(111, 176, 255, 0.18);
}

/* recipe */
.rcard__head { display: flex; align-items: center; gap: 16px; }
.rcard__title { min-width: 0; }
.rcard__name { font-size: 23px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.rcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.rcard__meta .ref { font-size: 14.5px; }
.time, .makes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 600;
}
.time svg { width: 14px; height: 14px; color: var(--text-3); }
.rcard__need { margin-top: 20px; }

.ings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ing { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ing--alt { grid-column: 1 / -1; }
.ing__slots { display: flex; align-items: center; gap: 6px; flex: none; }
.ing__or { color: var(--text-3); font: 500 15px/1 var(--pixel); }
.ing__name { min-width: 0; font-size: 15.5px; font-weight: 500; line-height: 1.3; }
.ing__name a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(140, 188, 255, 0.5); text-underline-offset: 3px; }
.ing__name a:hover { color: #fff; text-decoration-color: currentColor; }
.ing__n { color: var(--text-3); font-weight: 700; white-space: nowrap; }
.or { color: #ffd27a; font-weight: 700; }

.effect {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 14px 13px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--fam) 9%, #051630);
  box-shadow: inset 4px 0 0 var(--fam);
}
.effect__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--fam) 20%, #041127);
}
.effect__icon img { width: 32px; height: 32px; }
.effect__body { flex: 1; min-width: 0; }
.effect__name { line-height: 1.3; }
.effect__name strong { font-size: 17.5px; font-weight: 650; }
.effect__time { color: var(--text-2); font-size: 15px; white-space: nowrap; }
.effect__desc { margin-top: 3px; color: var(--text-2); font-size: 15px; line-height: 1.4; }
.famtag {
  flex: none;
  padding: 4px 8px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1.5px var(--fam);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}
a.famtag:hover { background: color-mix(in srgb, var(--fam) 22%, transparent); }

.food { margin-top: 16px; }
.food__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.shanks { display: flex; gap: 1px; }
.shank { width: 18px; height: 18px; image-rendering: pixelated; }
.shank-half { position: relative; width: 18px; height: 18px; }
.shank-half .shank { position: absolute; inset: 0; }
.shank--empty { opacity: 0.35; }
.shank--half { clip-path: inset(0 0 0 50%); }
.food__n { font-size: 15.5px; font-weight: 650; }
.food__facts { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14.5px; }
.food__facts li::before { content: "·"; margin-right: 8px; color: var(--text-3); font-weight: 700; }

.uses { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.uses .label { margin: 0; }

/* crop */
.crop__top { display: flex; align-items: center; gap: 18px; }
.crop__art {
  position: relative;
  display: grid;
  place-items: end center;
  flex: none;
  width: 112px; height: 112px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #123663 0%, #0c2a4f 100%);
}
/* the plant stands on a strip of farmland */
.crop__art::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 14px;
  background: linear-gradient(180deg, #4a3220 0 4px, #6c4a30 4px 9px, #5a3d27 9px);
}
.crop__art img { position: relative; z-index: 1; width: 96px; height: 96px; margin-bottom: 8px; }
.crop__name { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.crop .badge { background: rgba(102, 187, 82, 0.16); color: #b9eda9; }
.crop__flow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 8, 22, 0.35);
}
.crop__step .label { margin-bottom: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text-2); font-weight: 600; }
.flow-arrow { width: 22px; height: 16px; flex: none; margin-left: 17px; color: var(--text-3); rotate: 90deg; }
.slots { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 0; list-style: none; }
.slots li { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; line-height: 1.25; }
.facts { display: grid; gap: 14px; margin: 18px 0 0; }
.facts > div { display: grid; gap: 6px; }
.facts dt { padding-top: 5px; color: var(--text-3); font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.facts dd { margin: 0; color: var(--prose); font-size: 15.5px; line-height: 1.45; }
.odds { display: grid; gap: 4px; }
.odds b, .facts dd > b { color: #fff; font-size: 17px; font-weight: 650; }
.odds__hint { color: var(--text-3); }

/* station */
.station { display: flex; flex-direction: column; }
.station__makes { margin-top: auto; }
.station > :nth-last-child(2) { margin-bottom: 18px; }
.station__head { display: flex; align-items: center; gap: 16px; }
.station__name { font-size: 23px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.station__desc { margin-top: 16px; color: var(--prose); font-size: 16px; line-height: 1.5; }
.station__row { margin-top: 18px; }
.station__cap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 600; }
.pips { display: flex; gap: 3px; }
.pips i {
  width: 20px; height: 20px;
  background: var(--slot);
  box-shadow: inset 2px 2px 0 var(--slot-dark), inset -2px -2px 0 var(--slot-light);
}
.station__makes { padding-top: 14px; margin-bottom: 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14.5px; }

/* crafting */
.craft__name { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; }
.craft__body { display: grid; gap: 22px; margin-top: 18px; }
.craft__body:first-child { margin-top: 0; }
.gui {
  justify-self: start;
  padding: 10px 14px 16px;
  border-radius: 5px;
  background: #c6c6c6;
  box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555, 0 0 0 3px #1e1e1e, 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  color: #404040;
}
.gui__title { margin: 2px 2px 10px; color: #404040; font: 500 17px/1.2 var(--pixel); }
.gui__main { display: flex; align-items: center; gap: 12px; }
.gui__grid { display: grid; grid-template-columns: repeat(3, auto); }
.gui__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 240px; }
.gui__plus, .gui__or { color: #4a4a4a; font: 600 20px/1 var(--pixel); }
.gui__or { font-size: 15px; }
.gui__arrow { width: 33px; height: 24px; flex: none; color: #8b8b8b; }
.craft__row + .craft__row, .notes + .craft__row { margin-top: 18px; }
.notes { display: grid; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.notes li {
  position: relative;
  padding-left: 22px;
  color: var(--prose);
  font-size: 15.5px;
  line-height: 1.4;
}
.notes li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.42em;
  width: 9px; height: 9px;
  background: #66bb52;
  box-shadow: inset -2px -2px 0 #3f8a32;
}

/* effect families */
.fam__head { display: flex; align-items: center; gap: 14px; }
.fam__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px; height: 64px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--fam) 16%, #041127);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fam) 55%, transparent);
}
.fam__icon img { width: 48px; height: 48px; }
.fam__name { font-size: 23px; font-weight: 600; letter-spacing: -0.025em; }
.fam__hint { margin-top: 2px; color: var(--text-2); font-size: 15.5px; line-height: 1.35; }
.fam__effects { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.fam__effects li {
  display: grid;
  gap: 1px;
  padding-left: 12px;
  border-left: 3px solid color-mix(in srgb, var(--fam) 70%, transparent);
  font-size: 15.5px;
}
.fam__effects span { color: var(--text-2); font-size: 14.5px; line-height: 1.4; }
.fam__food { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

/* the game loop */
.loop { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.loop__step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.loop__n {
  grid-row: span 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: #f4f6fa;
  color: #04142b;
  font: 500 20px/1 var(--pixel);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.loop__icons { display: flex; flex-wrap: wrap; gap: 6px; }
.loop__text { font-size: 16px; font-weight: 500; line-height: 1.4; }

/* ---------- hub ---------- */

.hero {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 64px var(--gutter) 24px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto;
  height: 420px;
  z-index: -1;
  background: radial-gradient(60% 60% at 50% 40%, rgba(47, 134, 255, 0.22), transparent 70%);
  pointer-events: none;
}
.hero__title {
  margin-top: 22px;
  font-size: clamp(44px, 7.4vw, 96px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.98;
  text-wrap: balance;
}
.hero__sub {
  max-width: 40ch;
  margin: 22px auto 0;
  color: var(--text-2);
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.45;
  text-wrap: pretty;
}
.section {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 72px var(--gutter);
}
.section--tight { padding-top: 40px; padding-bottom: 40px; }
.section__head { margin: 0 0 28px; }
.section__title { font-size: clamp(34px, 4.6vw, 56px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; }
.section__title--md { font-size: clamp(30px, 3.8vw, 46px); }
.section__lede { margin-top: 12px; color: var(--text-2); font-size: 18px; line-height: 1.45; }
.section__more { margin-top: 22px; }

.modcards { display: grid; gap: 16px; max-width: 900px; margin: 0 auto; padding: 0; list-style: none; }
.modcard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
  border-radius: 26px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s;
}
.modcard:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 50px -30px rgba(40, 120, 255, 0.6); }
.modcard:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.modcard__name { font-size: clamp(28px, 3.4vw, 38px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.modcard__name a { text-decoration: none; }
.modcard__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.modcard__name a:focus-visible { outline: none; }
.modcard__summary { margin-top: 10px; color: var(--prose); font-size: 17.5px; line-height: 1.5; }
.modcard__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--link); font-weight: 600; }
.modcard__cta svg { width: 16px; height: 16px; transition: translate 0.2s; }
.modcard:hover .modcard__cta svg { translate: 3px 0; }
.more-soon { margin-top: 28px; color: var(--text-3); font: 500 17px/1.3 var(--pixel); text-align: center; letter-spacing: 0.02em; }

.facts-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.facts-row li {
  padding: 6px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 15px;
  font-weight: 600;
}
.facts-row__k { margin-right: 4px; color: var(--text-3); font-weight: 500; }

/* ---------- mod home ---------- */

.modhero {
  display: grid;
  gap: 26px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 28px var(--gutter) 16px;
}
.modhero__icon { justify-self: start; }
.modhero__title { font-size: clamp(46px, 7.4vw, 92px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.98; }
.modhero__summary { max-width: 44ch; margin-top: 16px; color: var(--prose); font-size: clamp(18px, 1.9vw, 22px); line-height: 1.45; text-wrap: pretty; }
.modhero__actions { margin-top: 26px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 24px auto 0;
  padding: 0 var(--gutter);
  list-style: none;
}
.stats li {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font-size: 16px;
  font-weight: 500;
}
.stats b { display: block; color: var(--text); font: 500 38px/1 var(--pixel); }

.pagecards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pagecard {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
  transition: box-shadow 0.15s;
}
.pagecard:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 1px var(--line-2); }
.pagecard__n {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: #f4f6fa;
  color: #04142b;
  font: 500 22px/1 var(--pixel);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.pagecard__body { display: grid; gap: 3px; }
.pagecard__title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.pagecard__summary { color: var(--text-2); font-size: 15.5px; line-height: 1.4; }
.pagecard__arrow { width: 18px; height: 18px; color: var(--text-3); transition: translate 0.2s, color 0.2s; }
.pagecard:hover .pagecard__arrow { translate: 3px 0; color: var(--text); }

/* ---------- 404 ---------- */

.lost {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
  padding: 96px var(--gutter) 40px;
  text-align: center;
}
.lost__code { color: var(--text-3); font: 600 20px/1 var(--pixel); letter-spacing: 0.08em; }
.lost__title { max-width: 16ch; font-size: clamp(36px, 6vw, 64px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.05; }
.lost__text { max-width: 44ch; color: var(--text-2); font-size: 18px; line-height: 1.5; }
.lost__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }

/* ---------- footer (main site) ---------- */

.footer { position: relative; overflow: hidden; margin-top: 72px; border-top: 1px solid var(--line); }
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px 28px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
}
.footer__brand { grid-column: 1 / -1; }
.brand__tile--lg { width: 54px; height: 54px; border-radius: 15px; }
.brand__tile--lg svg { width: 29px; height: 23px; }
.footer__tag { max-width: 360px; margin-top: 20px; color: var(--text-2); line-height: 1.5; }
.footer__legal { max-width: 380px; margin-top: 22px; color: var(--text-3); font-size: 13px; line-height: 1.55; }
.footer__head { margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer__col a { padding: 4px 0; color: var(--link); font-size: 16px; text-decoration: none; }
.footer__col a:hover { color: #fff; }
.footer__col a[aria-current="page"] { color: #fff; }

/* the main site's sign-off: grass, dirt, stone, down to bedrock */
.ground {
  position: relative;
  height: 120px;
  margin-top: 64px;
  background: url("ground.svg") repeat-x 0 0 / auto 120px;
}
.ground__note {
  position: absolute;
  left: 50%;
  bottom: 4px;
  translate: -50% 0;
  color: #d6dde9;
  font: 500 16px/20px var(--pixel);
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 #121317;
  white-space: nowrap;
}

/* ---------- wider screens ---------- */

@media (max-width: 479px) {
  /* the 3×3 grid, the arrow and the result have to fit a 320px card */
  .gui .slot--48 { --s: 32px; }
  .gui__arrow { width: 22px; height: 16px; }
  .gui__main { gap: 8px; }
  .gui { padding: 8px 10px 12px; }
  .crop__art { width: 88px; height: 88px; }
  .crop__art img { width: 64px; height: 64px; }
  .rcard, .crop, .station, .craft, .fam { padding: 18px; }
}

@media (max-width: 359px) {
  .brand__name { display: none; }
}

@media (max-width: 819px) {
  :root { --gutter: 16px; }
  .nav__links, .nav__icon, .nav__main { display: none; }
  .nav__menu { display: grid; }
}
@media (min-width: 820px) {
  .menu { display: none !important; }
}

@media (min-width: 640px) {
  .modcard { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 28px; padding: 30px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts > div { grid-template-columns: 136px minmax(0, 1fr); align-items: start; gap: 14px; }
  .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager__link--next { grid-column: 2; }
  .footer__inner { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-top: 72px; }
  .footer__brand { grid-column: auto; }
}

@media (min-width: 760px) {
  .craft__body { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 32px; }
  .loop { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  .loop__step { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; padding: 20px; row-gap: 16px; }
  .loop__n { grid-row: auto; }
  .modhero { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 44px; padding-top: 44px; }
  .crop { display: grid; grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr); column-gap: 28px; align-items: start; }
  .crop__top, .crop__flow { grid-column: 1; }
  .crop .facts { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .pagecards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding-top: 40px; }
  .side {
    display: block;
    position: sticky;
    top: 92px;
    align-self: start;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    padding: 2px 4px 24px 2px;
  }
  .mobnav { display: none; }
  .hero { padding-top: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .slot, .ref, .rcard, .crop, .station, .craft, .fam, .loop__step, .pagecard, .pager__link, .modcard, .mobnav { border: 1px solid CanvasText; }
}

@media print {
  .nav, .footer, .side, .mobnav, .pager, .skip { display: none !important; }
  body { background: #fff; color: #000; }
}
