/* ==========================================================================
   Openworld -- the wiki (gen/wiki*.py): the site's night, type and buttons
   (site.css, guides.css) dressed in the game's medieval matter: dark oak
   boards with plank grain, iron corner plates and rivets, brass trims,
   parchment cards with ink-brown text, item slots sunk like in the game,
   wax seals for the tiers, pixel-art icons (assets/wiki/px.svg) and the
   Pixelify Sans pixel font for titles.
   ========================================================================== */
@font-face { font-family: "Pixelify Sans"; font-weight: 400 700; font-display: swap; src: url("../fonts/PixelifySans.woff2") format("woff2"); }

:root {
  --pixel: "Pixelify Sans", var(--display);
  --oak: #6b4423; --oak-2: #7d5230; --oak-dark: #3d2614; --oak-line: #24150a;
  --iron: #8d97a3; --iron-light: #c9d1da; --brass: #c9973d; --brass-light: #f2cf7a;
  --parch: #f1e2bf; --parch-2: #e0c992; --ink-brown: #3b2614; --slot: #161a24;
  --wood: repeating-linear-gradient(180deg, transparent 0 15px, rgba(0, 0, 0, 0.22) 15px 17px), linear-gradient(180deg, var(--oak-2), var(--oak) 40%, #5e3b1e);
  --dark-wood: repeating-linear-gradient(180deg, transparent 0 19px, rgba(0, 0, 0, 0.28) 19px 21px), linear-gradient(180deg, #4a2e17, var(--oak-dark));
  --frame: 0 0 0 3px var(--oak-line), 0 0 0 6px var(--oak), 0 0 0 9px var(--oak-line);
}
.page-wiki .wh-title, .page-wiki .section-head h2, .page-wiki .gh2, .page-wiki .wh2, .page-wiki .wh3, .wtile h3, .wcta h2,
.wteaser-text h2, .winfo-name, .wpath b, .wtier span, .wchip-t b, .wpagecard-t b { font-family: var(--pixel); font-weight: 600; letter-spacing: 0.01em; }
.wwrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.wmuted { color: var(--muted); }
.page-wiki kbd { display: inline-block; min-width: 1.7em; padding: 1px 7px; margin: 0 2px; border-radius: 5px; font: 700 0.85em var(--display); text-align: center;
  color: var(--ink); background: linear-gradient(180deg, #39445e, #252e44); box-shadow: 0 3px 0 #11172a, inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.px { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }

/* ---- top bar: the search ------------------------------------------------------- */
.wtop-search { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 10px 7px 12px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--muted); font: 700 0.88rem var(--display); transition: background 0.2s, color 0.2s; }
.wtop-search:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.wtop-search svg, .whero-search svg, .wsearch-box svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; flex: none; }
.wtop-search span { max-width: 15em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wtop-search kbd { font-size: 0.75rem; padding: 0 6px; }
.wtopbar .topbar-nav { gap: 18px; }
@media (max-width: 1100px) { .wtop-search span, .wtop-search kbd { display: none; } }

/* ---- heroes -------------------------------------------------------------------- */
.wh { position: relative; isolation: isolate; overflow: hidden; padding: calc(86px + 2vh) var(--gutter) clamp(34px, 5vw, 60px); }
.wh-sky { position: absolute; inset: 0; z-index: -2; background:
    radial-gradient(ellipse 55% 60% at 70% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 10%, #dfe8ff 50%, transparent 51%), radial-gradient(1px 1px at 66% 34%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 92% 52%, #cfe0ff 50%, transparent 51%),
    linear-gradient(180deg, #070b16, #0b1430 60%, var(--bg)); }
.wh-sky .fireflies { z-index: 0; }
.wh-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 48px; align-items: center; }
.wh-main { min-width: 0; }
.wh .crumbs ol { justify-content: flex-start; display: inline-flex; }
.wh .kicker { display: block; margin-top: 20px; color: var(--accent); }
.wh-title { font-size: clamp(2.2rem, 5.4vw, 4.2rem); line-height: 1.02; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45), 0 10px 40px rgba(0, 0, 0, 0.5); animation: rise 0.7s both; }
.wh-title strong, .wh-title b { color: var(--accent); font-weight: inherit; }
.wh-lead { margin-top: 16px; max-width: 40em; font: 700 clamp(1.02rem, 1.5vw, 1.22rem)/1.55 var(--display); color: #d6e0f2; animation: rise 0.8s 0.15s both; }
.wh-art { display: grid; place-items: center; animation: rise 0.9s 0.2s both; }
.wh-bigpx { width: clamp(110px, 14vw, 170px); height: auto; aspect-ratio: 1; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 0 30px color-mix(in srgb, var(--accent) 35%, transparent));
  animation: gfloat 5s ease-in-out infinite; }
.wh-guide .gsummary { margin-top: 22px; max-width: 46em; }
@media (max-width: 760px) { .wh-inner { grid-template-columns: 1fr; } .wh-art { justify-self: start; } .wh-bigpx { width: 96px; } }

/* the home: the panorama, the parade, the search */
.whome-hero { min-height: 94vh; min-height: 94svh; display: flex; flex-direction: column; padding-bottom: 0; --parade-h: clamp(110px, 16vh, 170px); }
.whome-hero .wh-inner { flex: 1; grid-template-columns: 1fr; text-align: center; justify-items: center; align-content: center; padding-bottom: clamp(140px, 22vw, 330px); }
.whome-hero .crumbs ol { justify-content: center; }
.whome-hero .wh-title { font-size: clamp(2.6rem, 7.4vw, 5.6rem); }
.whome-hero .wh-lead { margin-inline: auto; }
.whome-land { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; height: clamp(200px, 30vw, 460px); pointer-events: none; }
.whome-land img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; image-rendering: pixelated; }
.whome-land::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(180deg, transparent, var(--bg)); }
.whome-runway { bottom: clamp(70px, 14vw, 220px); }
.whero-search { display: flex; align-items: center; gap: 12px; width: min(640px, 100%); margin: 28px auto 0; padding: 16px 18px; cursor: text; text-align: left;
  border: 0; border-radius: 6px; color: var(--ink-brown); font: 700 1.05rem var(--display); background: linear-gradient(180deg, var(--parch), var(--parch-2));
  box-shadow: var(--frame), 0 18px 40px rgba(0, 0, 0, 0.45); animation: rise 0.9s 0.3s both; transition: transform 0.15s; }
.whero-search:hover { transform: translateY(-2px); }
.whero-search span { flex: 1; opacity: 0.75; }
.whero-search kbd { color: var(--ink); }
.wcounts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 26px 0 0; padding: 0; animation: rise 0.9s 0.4s both; }
.wcounts li { display: flex; align-items: baseline; gap: 7px; font: 700 0.95rem var(--display); color: var(--muted); }
.wcounts b { font: 600 1.6rem var(--pixel); color: var(--brass-light); text-shadow: 0 2px 0 #000; }

/* ---- wood, iron, parchment ---------------------------------------------------------- */
.wtile a, .wcta, .wbench, .wteaser-frame, .wsearch, .wpath a {
  background: var(--dark-wood); box-shadow: var(--frame), 0 16px 34px rgba(0, 0, 0, 0.4); border-radius: 3px; position: relative; }
.wtile a::before, .wcta::before, .wbench::before, .wteaser-frame::before { content: ""; position: absolute; inset: 4px; pointer-events: none; border-radius: 2px;
  background: radial-gradient(circle at 6px 6px, var(--iron-light) 0 2px, var(--iron) 2px 3px, transparent 3.5px) top left / 50% 50% no-repeat,
    radial-gradient(circle at calc(100% - 6px) 6px, var(--iron-light) 0 2px, var(--iron) 2px 3px, transparent 3.5px) top right / 50% 50% no-repeat,
    radial-gradient(circle at 6px calc(100% - 6px), var(--iron-light) 0 2px, var(--iron) 2px 3px, transparent 3.5px) bottom left / 50% 50% no-repeat,
    radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), var(--iron-light) 0 2px, var(--iron) 2px 3px, transparent 3.5px) bottom right / 50% 50% no-repeat; }
.winfo-card { position: relative; padding: 22px 22px 18px; color: var(--ink-brown); border-radius: 4px;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%), linear-gradient(180deg, var(--parch), var(--parch-2));
  box-shadow: 0 0 0 3px #6b4a22, 0 0 0 5px var(--brass), 0 0 0 8px var(--oak-line), 0 20px 44px rgba(0, 0, 0, 0.45); }
.winfo-card::before, .winfo-card::after { content: ""; position: absolute; width: 18px; height: 18px; background: linear-gradient(135deg, var(--brass-light), var(--brass)); box-shadow: 0 2px 0 #6b4a22; }
.winfo-card::before { top: -6px; left: -6px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.winfo-card::after { bottom: -6px; right: -6px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.winfo-card a { color: #7a3d10; text-decoration-color: rgba(122, 61, 16, 0.4); }
.winfo-rows { margin: 12px 0 0; display: grid; gap: 0; }
.winfo-rows div { display: grid; grid-template-columns: minmax(90px, 40%) 1fr; gap: 10px; padding: 7px 2px; border-top: 1px dashed rgba(59, 38, 20, 0.28); font-size: 0.95rem; }
.winfo-rows dt { font: 800 0.8rem var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: #7a5a36; padding-top: 2px; }
.winfo-rows dd { margin: 0; font-weight: 700; }
.winfo-name { margin-top: 10px; font-size: 1.5rem; text-align: center; color: var(--ink-brown); }
.winfo-icon, .winfo-px { display: grid; place-items: center; margin: 0 auto; }
.winfo-px { width: 72px; height: 72px; }
.winfo-banner { display: flex; align-items: center; gap: 12px; padding-bottom: 6px; }
.winfo-banner b { font: 600 1.7rem var(--pixel); }
.winfo-foot { margin-top: 12px; font-size: 0.8rem; opacity: 0.75; }
.winfo-map { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 9px; border-radius: 4px; font: 800 0.9rem var(--display);
  text-decoration: none; color: var(--parch) !important; background: var(--wood); box-shadow: 0 0 0 2px var(--oak-line); transition: transform 0.15s; }
.winfo-map:hover { transform: translateY(-2px); }
.winfo-map .px { width: 24px; height: 24px; }
.winfo-swatch { display: block; height: 70px; margin: -4px -4px 0; border-radius: 3px; background: linear-gradient(180deg, var(--bc) 0 30%, #7a5232 30% 62%, #8a8f99 62%); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.25); }

/* ---- item slots and icons ------------------------------------------------------------- */
.wi { --sz: 40px; display: block; width: var(--sz); height: var(--sz); image-rendering: pixelated; background-repeat: no-repeat;
  background-size: calc(var(--cols) * var(--sz)) calc(var(--rows) * var(--sz));
  background-position: calc(var(--ix) * var(--sz) * -1) calc(var(--iy) * var(--sz) * -1); }
.wi-none { display: grid; place-items: center; font: 600 1.3rem var(--pixel); color: var(--muted); }
.wslot { --s: 54px; position: relative; display: grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 3px; text-decoration: none;
  background: linear-gradient(135deg, #0f121a, var(--slot) 50%, #1d2230); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.55), inset -2px -2px 0 rgba(255, 255, 255, 0.07), 0 0 0 2px #0b0d13, 0 0 0 4px rgba(138, 90, 43, 0.55);
  transition: transform 0.15s, box-shadow 0.2s; }
.wslot .wi { --sz: calc(var(--s) - 14px); }
a.wslot:hover { transform: translateY(-2px); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.55), 0 0 0 2px #0b0d13, 0 0 0 4px var(--brass), 0 0 18px rgba(245, 166, 35, 0.45); }
.wslot-n { position: absolute; right: 3px; bottom: 1px; font: 600 0.95rem var(--pixel); color: #fff; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
.wslot.is-big { --s: 76px; }
.wslot.is-hero { --s: clamp(120px, 15vw, 168px); box-shadow: inset 5px 5px 0 rgba(0, 0, 0, 0.55), inset -3px -3px 0 rgba(255, 255, 255, 0.07), var(--frame), 0 0 60px color-mix(in srgb, var(--accent) 35%, transparent); }
.wslot.is-small { --s: 30px; display: inline-grid; vertical-align: middle; box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5), 0 0 0 1px #0b0d13; }
.wslot.is-empty { opacity: 0.7; }
.wslot.is-any::after { content: "+"; position: absolute; left: 3px; top: 0; font: 600 0.8rem var(--pixel); color: var(--brass-light); text-shadow: 1px 1px 0 #000; }
.wh-slot { position: relative; padding: 16px; }
.wh-slot .wtier { position: absolute; right: -14px; bottom: -6px; }

/* the tier: a wax seal */
.wtier { --wax: color-mix(in srgb, #c0392b calc(100% - var(--t) * 3%), #6a2cc0); display: inline-grid; place-items: center; width: 74px; height: 74px; border-radius: 47% 53% 50% 48%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--wax) 60%, #fff), var(--wax) 45%, color-mix(in srgb, var(--wax) 60%, #000));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wax) 70%, #000), inset 0 0 0 6px rgba(0, 0, 0, 0.15), 0 6px 14px rgba(0, 0, 0, 0.5); transform: rotate(-8deg); }
.wtier span { width: 56px; text-align: center; font-size: 0.95rem; line-height: 1; color: #ffe9d0; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }

/* chips: an item card */
.wchips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.wchips.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.wchip { display: flex; align-items: center; gap: 12px; padding: 7px 12px 7px 7px; border-radius: 6px; text-decoration: none; color: var(--ink); min-width: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)); border: 1px solid var(--line); transition: transform 0.15s, border-color 0.2s, background 0.2s; }
.wchip:hover { transform: translateY(-2px); border-color: rgba(201, 151, 61, 0.7); background: rgba(201, 151, 61, 0.1); }
.wchip .wslot { --s: 46px; }
.wchip-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.wchip-t b { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; }
.wchip-t small { font: 700 0.78rem var(--display); color: var(--muted); }
.wchips.is-side { flex-direction: column; }
.wchips.is-side .wchip .wslot { --s: 38px; }

/* ---- the page of an item (or a creature, a biome) -------------------------------------- */
.wpage { max-width: 1200px; margin: 0 auto; padding: 10px var(--gutter) 60px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
.wcol { min-width: 0; display: grid; gap: 22px; }
.winfo { position: sticky; top: 90px; }
@media (max-width: 960px) { .wpage { grid-template-columns: 1fr; } .winfo { position: static; order: -1; } }
.wpanel { padding: clamp(18px, 3vw, 28px); border-radius: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line); }
.wh2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: #fff; display: flex; align-items: center; gap: 12px; }
.wh2::before { content: ""; width: 14px; height: 14px; flex: none; background: var(--brass); box-shadow: 3px 3px 0 #6b4a22, inset -3px -3px 0 rgba(0, 0, 0, 0.25); }
.wh3 { margin-top: 22px; font-size: 1.2rem; color: var(--ink); }
.wh3 small { font: 700 0.85rem var(--display); color: var(--muted); }
.wsrcs { display: grid; gap: 16px; margin-top: 14px; }
.wline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #d3dcef; }
.wline a { color: var(--ink); text-decoration-color: var(--brass); text-underline-offset: 3px; }
.wline-k { display: inline-block; padding: 2px 9px; border-radius: 4px; font: 800 0.78rem var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: #1a1209; background: var(--brass-light); }
.wfuel::before { content: "🔥 "; }
.wtime::before { content: "⏱ "; }
.wtime, .wfuel { margin-left: 8px; font-weight: 700; color: var(--brass-light); }

/* the workbench: crafting grid, machine operation */
.wcraft, .wop { margin: 0; }
.wbench { display: inline-flex; align-items: center; gap: 16px; padding: 22px 26px; flex-wrap: wrap; }
.wcraft-grid { display: grid; grid-template-columns: repeat(3, 54px); gap: 6px; padding: 8px; background: rgba(0, 0, 0, 0.3); border-radius: 3px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35); }
.warrow { width: 34px; height: 26px; flex: none; background: var(--brass-light); clip-path: polygon(0 35%, 55% 35%, 55% 0, 100% 50%, 55% 100%, 55% 65%, 0 65%); filter: drop-shadow(0 2px 0 #6b4a22); }
.wcraft figcaption, .wop figcaption { margin-top: 10px; font: 700 0.9rem var(--display); color: var(--muted); }
.wop figcaption a { color: var(--ink); }
.wcraft-at { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.wcraft-legend { margin: 8px 0 0; padding: 0 0 0 18px; color: var(--muted); font-size: 0.92rem; }
.wop-in, .wop-out { display: flex; flex-wrap: wrap; gap: 6px; max-width: 250px; }
.wops { display: grid; gap: 14px; margin-top: 14px; }
@media (max-width: 560px) { .wbench { padding: 16px; gap: 10px; } .wcraft-grid { grid-template-columns: repeat(3, 44px); } .wcraft-grid .wslot { --s: 44px; } }

/* a deposit: a cut of the ground, the band where it lies */
.wdep { margin: 0; display: flex; gap: 22px; align-items: stretch; }
.wdep-cut { position: relative; flex: none; width: 120px; height: 240px; border-radius: 4px; overflow: hidden; box-shadow: var(--frame);
  background: linear-gradient(180deg, #5fbf3a 0 3%, #7a5232 3% 9%, #8a8f99 9% 45%, #6c727c 45% 75%, #4c515a 75%); }
.wdep-cut::before { content: ""; position: absolute; inset: 0; opacity: 0.35;
  background: radial-gradient(2px 2px at 20% 30%, #000 50%, transparent 51%), radial-gradient(2px 2px at 70% 55%, #000 50%, transparent 51%),
    radial-gradient(2px 2px at 40% 80%, #000 50%, transparent 51%), radial-gradient(2px 2px at 85% 20%, #000 50%, transparent 51%); background-size: 40px 40px; }
.wdep-band { position: absolute; left: 0; right: 32px; top: var(--a); bottom: calc(100% - var(--b)); min-height: 6px;
  background: repeating-linear-gradient(90deg, rgba(255, 204, 77, 0.55) 0 8px, rgba(245, 166, 35, 0.3) 8px 16px); outline: 2px dashed var(--brass-light); outline-offset: -2px;
  box-shadow: 0 0 22px rgba(255, 204, 77, 0.6); animation: band 2.4s ease-in-out infinite; }
@keyframes band { 50% { box-shadow: 0 0 34px rgba(255, 204, 77, 0.9); } }
.wdep-ticks span { position: absolute; right: 4px; top: var(--y); transform: translateY(-50%); font: 600 0.72rem var(--pixel); color: #fff; text-shadow: 1px 1px 0 #000; }
.wdep-ticks span::after { content: " m"; }
.wdep figcaption { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.wdep-kind { font: 600 1.25rem var(--pixel); color: var(--brass-light); }
.wdep-depth { font: 800 1.1rem var(--display); color: var(--ink); }
.wdep dl { margin: 6px 0 0; display: grid; gap: 4px; }
.wdep dl div { display: flex; gap: 8px; font-size: 0.95rem; }
.wdep dt { font-weight: 800; color: var(--muted); }
.wdep dd { margin: 0; }
.wdep .is-near dd { color: var(--grass); font-weight: 700; }

/* needs -> it -> unlocks */
.wmg { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 46px auto 46px minmax(0, 1fr); gap: 4px 0; align-items: stretch; }
.wmg-h { font: 800 0.78rem var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.wmg-h.is-needs { grid-column: 1; } .wmg-h.is-it { grid-column: 2 / 5; } .wmg-h.is-unlocks { grid-column: 5; }
.wmg-col { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-around; gap: 6px; }
.wmg-col .wchip { padding: 4px 8px 4px 4px; } .wmg-col .wchip .wslot { --s: 36px; } .wmg-col .wchip-t b { font-size: 0.92rem; }
.wmg-col.is-empty { justify-content: center; font-size: 0.92rem; }
.wmg-more { font: 700 0.9rem var(--display); color: var(--muted); padding-left: 10px; }
.wmg-wires { width: 100%; height: 100%; fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.wmg-wires path { vector-effect: non-scaling-stroke; }
.wmg-wires.is-in { stroke: var(--brass); } .wmg-wires.is-out { stroke: var(--sky); }
.wmg-it { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; text-align: center; }
.wmg-it b { font: 600 1rem var(--pixel); max-width: 9em; }
.wmg-it .wtier { width: 56px; height: 56px; } .wmg-it .wtier span { font-size: 0.78rem; width: 44px; }
@media (max-width: 720px) { .wmg { grid-template-columns: 1fr; } .wmg-wires, .wmg-h.is-it { display: none; } .wmg-h { grid-column: 1 !important; margin-top: 10px; } .wmg-it { order: -1; } }

/* creatures, biomes */
.wcreatures, .wbiomes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.wcreature, .wbiome { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--accent, var(--grass)) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent, var(--grass)) 30%, transparent); transition: transform 0.15s, background 0.2s; }
.wcreature:hover, .wbiome:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--accent, var(--grass)) 16%, transparent); }
.wcreature b, .wbiome b { font: 600 1.02rem var(--pixel); }
.wcreature small, .wbiome small { display: block; font: 700 0.78rem var(--display); color: var(--muted); }
.wcreature { display: grid; grid-template-columns: auto 1fr; } .wcreature small { grid-column: 2; margin-top: -6px; }
.wcreature-ic { width: 30px; height: 30px; grid-row: span 2; }
.wbiome { display: grid; grid-template-columns: auto 1fr; }
.wbiome-sw { grid-row: span 2; width: 34px; height: 34px; border-radius: 3px; background: linear-gradient(180deg, var(--bc) 0 45%, #7a5232 45% 75%, #8a8f99 75%); box-shadow: 0 0 0 2px #0b0d13; }
.wbiome small { grid-column: 2; margin-top: -6px; }
.wbiome-cut { display: grid; width: clamp(120px, 14vw, 170px); aspect-ratio: 1; box-shadow: var(--frame); border-radius: 3px; overflow: hidden; }
.wbiome-cut i { display: block; }
.wbiome-cut i:nth-child(1) { background: linear-gradient(180deg, #0b1430, #213a6b); } .wbiome-cut i:nth-child(2) { background: var(--bc); }
.wbiome-cut i:nth-child(3) { background: #7a5232; } .wbiome-cut i:nth-child(4) { background: #8a8f99; }
.wh-runway { position: relative; width: clamp(220px, 30vw, 380px); height: clamp(160px, 22vw, 260px); }

/* ---- the home -------------------------------------------------------------------------- */
.wabout-in { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 5vw, 64px); align-items: center; }
.wabout-text .section-head { text-align: left; margin: 0; padding: 0; }
.wabout .gprose { margin-top: 10px; font-size: 1.1rem; line-height: 1.75; color: #d3dcef; }
.wabout .gprose strong { color: var(--ink); }
.wabout .gprose a { color: var(--ink); text-decoration-color: var(--brass); }
@media (max-width: 900px) { .wabout-in { grid-template-columns: 1fr; } }
.wsec-head { margin-bottom: 8px; }
.wtiles { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.wtile a { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; height: 100%; padding: 22px 22px 18px; color: var(--ink); text-decoration: none; transition: transform 0.18s, box-shadow 0.25s; }
.wtile a:hover { transform: translateY(-5px) rotate(-0.4deg); box-shadow: var(--frame), 0 0 0 11px color-mix(in srgb, var(--accent) 45%, transparent), 0 22px 44px rgba(0, 0, 0, 0.5); }
.wtile-art { grid-row: span 3; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; align-self: start;
  background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--accent) 40%, #1a1220), #120d16 70%); box-shadow: 0 0 0 3px var(--brass), 0 0 0 6px var(--oak-line), 0 0 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.wtile-art .px { width: 42px; height: 42px; transition: transform 0.25s; }
.wtile a:hover .wtile-art .px { transform: scale(1.12) rotate(-6deg); }
.wtile h3 { font-size: 1.35rem; color: #fff6e6; text-shadow: 2px 2px 0 var(--oak-line); }
.wtile p { font-size: 0.95rem; color: #e2cfb2; line-height: 1.45; }
.wtile-meta { margin-top: 6px; font: 800 0.78rem var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass-light); }
.wtiles.is-small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.wtiles.is-small p { display: none; }
.wtiles.is-small .wtile-art { width: 52px; height: 52px; } .wtiles.is-small .wtile-art .px { width: 30px; height: 30px; }

/* start here: stepping stones */
.wpath { list-style: none; margin: 34px 0 0; padding: 10px 4px 20px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 26px; overflow-x: auto; position: relative; counter-reset: s; }
.wpath::before { content: ""; position: absolute; left: 40px; right: 40px; top: 50px; border-top: 4px dashed rgba(201, 151, 61, 0.5); }
.wpath a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px 16px; text-align: center; text-decoration: none; color: var(--ink); font: 700 0.95rem/1.3 var(--display); transition: transform 0.18s; }
.wpath a:hover { transform: translateY(-5px); }
.wpath b { position: absolute; top: -12px; left: -10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; color: #fff;
  background: radial-gradient(circle at 35% 30%, #e86a5a, #a42b22); box-shadow: 0 0 0 3px #5e140f, 0 4px 10px rgba(0, 0, 0, 0.5); }
.wpath-ic .px { width: 44px; height: 44px; }

/* the progression teaser */
.wteaser-in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 60px); align-items: center; }
.wteaser-text h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-top: 4px; }
.wteaser-text p:not(.kicker) { margin: 14px 0 22px; color: var(--muted); font-size: 1.1rem; }
.wteaser-text .btn { margin: 0 10px 10px 0; }
.wteaser-frame { display: block; padding: 18px; }
.wteaser-map { width: 100%; height: auto; display: block; }
@keyframes node { 50% { opacity: 0.7; } }
.s-mining { fill: var(--stone) !important; } .s-crafting { fill: var(--torch) !important; } .s-building { fill: var(--gold) !important; }
.s-technology { fill: var(--sky) !important; } .s-farming { fill: var(--grass) !important; } .s-survival, .s-combat { fill: var(--red) !important; }
.s-decoration, .s-space { fill: var(--violet) !important; } .s-world, .s-multiplayer { fill: var(--water) !important; }
@media (max-width: 860px) { .wteaser-in { grid-template-columns: 1fr; } }

/* guide page cards */
.wpages { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.wpagecard { display: flex; gap: 16px; height: 100%; padding: 18px; border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); transition: transform 0.18s, border-color 0.2s, background 0.2s; }
.wpagecard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--panel-2); }
.wpagecard-ic { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 6px; background: color-mix(in srgb, var(--accent) 16%, #0e1424); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.wpagecard-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wpagecard-t small { font: 800 0.74rem var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.wpagecard-t b { font-size: 1.15rem; }
.wpagecard-t span { color: var(--muted); font-size: 0.93rem; line-height: 1.45; }

/* ---- a guide page ------------------------------------------------------------------------ */
.wguidepage .gshell { padding-top: 24px; }
.wtoc .wside-box { margin-top: 22px; }
.wside-t { font: 800 0.76rem var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.wside-links { list-style: none; margin: 0; padding: 0; } .wside-links a { display: block; padding: 4px 0; font: 700 0.9rem var(--display); color: var(--ink); }
.wblock { margin-top: 1.4em; }
.wblock-title { font: 600 1.1rem var(--pixel); color: var(--brass-light); display: flex; align-items: center; gap: 10px; }
.wblock-title a { color: inherit; }
.wguide { display: grid; gap: 4px; margin-top: 1.4em; padding: 18px 22px; border-radius: 14px; text-decoration: none !important; color: var(--ink) !important;
  background: linear-gradient(135deg, rgba(179, 140, 255, 0.14), rgba(14, 22, 40, 0.6)); border: 1px solid rgba(179, 140, 255, 0.4); transition: transform 0.18s; }
.wguide:hover { transform: translateY(-3px); }
.wguide-k { font: 800 0.74rem var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet); }
.wguide b { font: 800 1.15rem var(--display); }
.wguide span:last-child { color: var(--muted); font-size: 0.95rem; }
.wtable-wrap { margin-top: 1.4em; overflow-x: auto; }
.wtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.97rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.wtable caption { text-align: left; padding: 8px 2px; font: 600 1.1rem var(--pixel); color: var(--brass-light); }
.wtable th, .wtable td { padding: 9px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.wtable thead th { font: 800 0.8rem var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: #1a1209; background: linear-gradient(180deg, var(--parch), var(--parch-2)); }
.wtable tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.wtable tbody tr:hover { background: rgba(201, 151, 61, 0.08); }
.wtable .wchip { border: 0; background: none; padding: 0; } .wtable .wchip .wslot { --s: 36px; }
.wtable.is-facts th { width: 40%; color: var(--muted); font-weight: 700; }
.wkeys { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.wkeys .wtable td:first-child { width: 1%; white-space: nowrap; }
.wupdated { margin-top: 2.4em; color: var(--muted); font-size: 0.9rem; }
.wrel { padding-top: 10px; }

/* ---- every item: the filter --------------------------------------------------------------- */
.wfilter-bar { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 0; background: linear-gradient(180deg, var(--bg) 70%, transparent); }
.wfilter-bar .ggallery-search { flex: 1 1 260px; }
.wfilter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wfilter-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 7px; border-radius: 99px; cursor: pointer; font: 700 0.85rem var(--display);
  color: var(--ink); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.wfilter-chips button .px { width: 20px; height: 20px; }
.wfilter-chips button span { color: var(--muted); }
.wfilter-chips button[aria-pressed="true"] { background: color-mix(in srgb, var(--c, var(--brass)) 22%, transparent); border-color: var(--c, var(--brass)); }
.wall { margin-top: 18px; }

/* ---- the progress path (wiki-tree.js): the game's parchment map, MedievalSharp + Almendra ---------- */
@font-face { font-family: "MedievalSharp"; font-display: swap; src: url("../fonts/MedievalSharp-latin.woff") format("woff"); }
@font-face { font-family: "Almendra"; font-weight: 700; font-display: swap; src: url("../fonts/Almendra-Bold-latin.woff") format("woff"); }
.wtree { --t-ink: #4a2f1a; --t-soft: #8a6a46; --t-parch: #f1ddb0; --t-paper: #f8ebc8; --t-gold: #d9a531; --t-wax: #a8322a;
  --t-display: "MedievalSharp", "Almendra", Georgia, serif; --t-body: "Almendra", Georgia, serif;
  max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }
.wtree-bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; padding: 10px 0; }
.wgraph-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.wgraph-tools button { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px; cursor: pointer; font: 800 1rem var(--display); color: var(--ink); background: var(--wood); border: 0; box-shadow: 0 0 0 2px var(--oak-line), 0 3px 0 var(--oak-line); }
.wgraph-tools button:active { transform: translateY(2px); }
.wtree-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-left: auto; font: 700 0.85rem var(--display); color: var(--muted); }
.wtree-legend span::before { content: ""; display: inline-block; width: 24px; height: 6px; margin-right: 7px; vertical-align: middle; border-radius: 3px; background: #e8b93a; }
.wtree-legend .is-side::before { height: 3px; background: #c9b48a; }
.wtree-legend .is-need::before { height: 0; border-top: 3px dotted #c9b48a; background: none; }
.wtree-me { display: flex; align-items: center; gap: 10px; }
.wtree-me small { display: block; font: 800 0.72rem var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.wtree-me a { font: 700 0.95rem var(--display); color: var(--ink); }
.wtree-ring { position: relative; width: 46px; height: 46px; display: grid; place-items: center; }
.wtree-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.wtree-ring circle { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 4; }
.wtree-ring circle.v { stroke: var(--brass-light); stroke-linecap: round; stroke-dasharray: 0 106.8; transition: stroke-dasharray 0.4s; }
.wtree-ring b { font: 600 0.8rem var(--pixel); }
.wtree-stage { position: relative; height: min(80vh, 880px); min-height: 460px; border-radius: 6px; overflow: hidden; touch-action: none; cursor: grab; box-shadow: var(--frame);
  background-color: var(--t-parch);
  background-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(120, 72, 24, 0.38) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .29  0 0 0 0 .12  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.wtree-stage.is-dragging { cursor: grabbing; }
.wtree-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wtree-map text { font-family: var(--t-body); font-weight: 700; user-select: none; }
.wtree-hint { position: absolute; left: 14px; bottom: 12px; margin: 0; padding: 6px 12px; border-radius: 8px; font: 700 0.82rem var(--t-body); color: var(--t-ink);
  background: rgba(248, 235, 200, 0.92); border: 2px solid var(--t-ink); pointer-events: none; }
html:not(.js) .wtree-stage, html:not(.js) .wtree-bar { display: none; }
.wt-link { fill: none; stroke: var(--t-ink); stroke-width: 3.2; stroke-linecap: round; opacity: 0.78; }
.wt-link.is-fan, .wt-link.is-merge { stroke-width: 4.2; }
.wt-link.is-mainpath { stroke: #e8b93a; stroke-width: 18; opacity: 0.34; }
.wt-link.is-cross { stroke: var(--t-soft); stroke-width: 2.2; stroke-dasharray: 3 8; opacity: 0.9; }
.wt-link.is-pause { stroke: #8a5cff; stroke-width: 4; stroke-dasharray: 14 10; opacity: 0.75; }
.wt-link.is-hot { stroke: #a87a17; opacity: 1; stroke-width: 5.5; }
.wt-pause { font-size: 13px; font-style: italic; fill: #6a45c9; text-anchor: middle; paint-order: stroke; stroke: var(--t-parch); stroke-width: 4px; }
.wt-ribbon text { font-family: var(--t-display); font-weight: 400; font-size: 16px; fill: #fff; text-anchor: middle; dominant-baseline: central; letter-spacing: 0.04em; }
.wt-ribbon.is-side { opacity: 0.85; }
.wt-node { cursor: pointer; outline: none; }
.wt-halo { fill: none; stroke: var(--t-gold); stroke-width: 5; stroke-dasharray: 6 6; opacity: 0; }
.wt-node.is-sel .wt-halo, .wt-node:focus-visible .wt-halo { opacity: 1; }
.wt-node:hover .wt-body { filter: brightness(1.12); }
.wt-code { font-family: var(--t-display); font-weight: 400; font-size: 13px; fill: #fff; text-anchor: middle; dominant-baseline: central; }
.wt-code.is-shield { font-size: 20px; fill: var(--t-ink); }
.wt-code.is-tag { font-size: 11px; }
.wt-ic { image-rendering: pixelated; pointer-events: none; }
.wt-pill { fill: var(--t-parch); opacity: 0.94; }
.wt-label { font-size: 14px; fill: var(--t-ink); text-anchor: middle; paint-order: stroke; stroke: var(--t-parch); stroke-width: 4px; stroke-linejoin: round; }
.wt-label.is-goal { font-size: 15px; }
.wt-ghead { font-family: var(--t-display); font-weight: 400; font-size: 12px; fill: #fff; }
.wt-gitem { font-size: 13px; fill: var(--t-ink); }
.wt-jname { font-family: var(--t-display); font-weight: 400; font-size: 19px; fill: var(--t-ink); paint-order: stroke; stroke: var(--t-parch); stroke-width: 5px; }
.wt-jwhy { font-size: 13px; font-style: italic; fill: #7a5a3a; paint-order: stroke; stroke: var(--t-parch); stroke-width: 4px; }
.wt-sub text { font-size: 12px; fill: var(--t-ink); }
.wt-check { display: none; }
.wt-show-line { stroke: var(--t-gold); stroke-width: 3; fill: none; }
.wt-show-name { font-size: 13px; fill: var(--t-ink); text-anchor: middle; }
.wt-show-name.is-big { font-size: 15px; }
.wt-show-cap { font-size: 13px; font-style: italic; fill: var(--t-soft); text-anchor: middle; paint-order: stroke; stroke: var(--t-parch); stroke-width: 4px; }
.wtree-map.is-tracking .wt-node.is-locked { filter: grayscale(1); opacity: 0.45; }
.wtree-map.is-tracking .wt-node.is-done .wt-check { display: inline; }
.wtree-map.is-tracking .wt-node.is-open .wt-halo { opacity: 1; animation: wt-pulse 1.6s ease-in-out infinite; }
@keyframes wt-pulse { 50% { stroke: var(--t-wax); } }
.wtree-card { position: absolute; right: 14px; bottom: 14px; z-index: 2; width: min(360px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px; color: var(--t-ink); font: 700 0.95rem/1.4 var(--t-body); cursor: auto; touch-action: auto;
  background: var(--t-paper); border: 2px solid var(--t-ink); border-radius: 10px; box-shadow: 3px 4px 0 rgba(74, 47, 26, 0.35); }
.wtree-card h3 { margin: 0; padding-right: 26px; font: 400 1.45rem/1.15 var(--t-display); color: var(--t-ink); }
.wtree-c { align-self: flex-start; margin: 0; padding: 1px 8px; border-radius: 6px; font: 400 0.9rem var(--t-display); color: #fff; }
.wtree-k { margin: 0; font-size: 0.88rem; color: var(--t-soft); }
.wtree-h { margin: 6px 0 0; font: 400 0.95rem var(--t-display); color: var(--t-wax); }
.wtree-p, .wtree-sub p { margin: 0; }
.wtree-items { margin: 0; padding-left: 20px; }
.wtree-sub { border-top: 1px dashed var(--t-soft); padding: 3px 0; font-size: 0.9rem; }
.wtree-sub summary { cursor: pointer; }
.wtree-sub a, .wtree-card a:not(.btn) { color: #7a3d10; }
.wtree-rel { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 0.85rem; }
.wtree-rel dt { color: var(--t-soft); } .wtree-rel dd { margin: 0; }
.wtree-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.wtree-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font: 700 1.1rem var(--t-display); color: var(--t-ink); background: #fbf2da; border: 2px solid var(--t-ink); }
@media (max-width: 620px) { .wtree-card { left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 62%; } .wtree-legend { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .wtree-map.is-tracking .wt-node.is-open .wt-halo { animation: none; } }
.wtree-counts { justify-content: flex-start; margin-top: 18px; }
/* the same path written out */
.wtree-outline .wwrap { max-width: 1100px; }
.wto { margin-top: 26px; }
.wto .wh3 { display: flex; align-items: center; gap: 10px; }
.wto .wh3 small { font: 700 0.8rem var(--display); color: var(--muted); }
.wto-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 2px #0b0d13, 0 0 0 4px color-mix(in srgb, var(--sc) 50%, transparent); }
.wto-steps { list-style: none; margin: 10px 0 0; padding: 0 0 0 6px; border-left: 3px solid color-mix(in srgb, var(--sc) 70%, transparent); display: grid; gap: 10px; }
.wto-steps > li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding-left: 12px; }
.wto-code { align-self: start; padding: 2px 6px; border-radius: 6px; text-align: center; font: 600 0.85rem var(--pixel); color: #fff; background: var(--sc); }
.wto-steps b { font-size: 1.02rem; }
.wto-steps p { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.wto-items { display: block; font-size: 0.9rem; color: var(--muted); }
.wto-subs { margin: 4px 0 0; padding-left: 18px; font-size: 0.9rem; color: var(--muted); }
.wto-more { margin-top: 28px; font: 700 1rem var(--display); color: var(--brass-light); }
.wtree-mini .g { fill: none; stroke: #e8b93a; stroke-width: 4; opacity: 0.25; stroke-linecap: round; }
.wtree-mini .e path { fill: none; stroke-width: 1.6; stroke-linecap: round; opacity: 0.9; }
.wtree-mini .n circle { stroke: #0b0d13; stroke-width: 0.25; animation: node 3s ease-in-out infinite; }
.wtree-mini .n circle:nth-child(3n) { animation-delay: -1s; } .wtree-mini .n circle:nth-child(3n+1) { animation-delay: -2s; }

/* ---- a knowledge entry ------------------------------------------------------------------------------ */
.wslot .px { width: 62%; height: 62%; }
.wtut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.wtut-card { padding: 14px 16px; border-radius: 6px; color: var(--ink-brown); background: linear-gradient(180deg, var(--parch), var(--parch-2));
  box-shadow: 0 0 0 2px #6b4a22, 0 0 0 4px var(--brass), 0 8px 18px rgba(0, 0, 0, 0.35); }
.wtut-card h3, .wtut-card > p:first-child { margin: 0 0 6px; font: 600 1.05rem var(--pixel); color: #7a3d10; }
.wtut-card p { margin: 0; font-weight: 700; line-height: 1.45; }
.wtut-note { margin: 12px 0 0; font-size: 0.85rem; color: var(--muted); }
.wkb-body { font-size: 1.05rem; line-height: 1.7; color: #d3dcef; }
.wkb-body h2 { margin: 18px 0 6px; font: 600 1.35rem var(--pixel); color: #fff; }
.wkb-body h2:first-child { margin-top: 0; }
.wkb-body p, .wkb-body ul { margin: 8px 0; }
.wkb-body a, .wkb-step a, .wto a { color: var(--ink); text-decoration-color: var(--violet); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.wkb-body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.95rem; }
.wkb-body th, .wkb-body td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.wkb-game { margin: 0; padding: 0 4px; font-style: italic; color: var(--muted); }
.wkb-step { padding: 14px 0; border-top: 1px dashed var(--line); }
.wkb-step:first-of-type { border-top: 0; }
.wkb-where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font: 800 1rem var(--display); }
.wkb-code { padding: 2px 8px; border-radius: 6px; font: 600 0.9rem var(--pixel); color: #fff; background: var(--sc); }
.wkb-lane { padding: 2px 10px; border-radius: 99px; font-size: 0.78rem; color: var(--muted); border: 1px solid var(--line); }
.wkb-lane.is-main { color: #2a1b06; background: #e8b93a; border-color: #e8b93a; }
.wkb-role { margin: 6px 0 0; color: var(--muted); }
.wkb-seq { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; }
.wkb-seq li { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); min-width: 0; }
.wkb-seq li.is-here { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 22%, transparent); }
.wkb-seq small { font: 800 0.7rem var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.wkb-subt { margin: 12px 0 4px; font: 800 0.8rem var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass-light); }
.wkb-subs, .wkb-items { margin: 0; padding-left: 20px; color: var(--muted); }
.wkb-map { margin: 12px 0 0; }
.wkb-badge { margin: 14px 0 0; }
.wkb-badge a { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; text-decoration: none; font: 800 0.9rem var(--display); color: var(--ink);
  background: rgba(10, 15, 28, 0.6); border: 1px solid var(--line); }
.wkb-badge span { padding: 2px 8px; border-radius: 99px; font: 600 0.85rem var(--pixel); color: #2a1b06; background: #e8b93a; }
.wkb-en { margin: 0 0 6px; font-size: 0.9rem; color: var(--muted); }
.wrole { padding: 2px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 30%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
.wrole-lead { margin: 6px 0 0; color: var(--muted); }
.wblock-tutorial .wtut-grid { margin-top: 10px; }

/* ---- the call to action ----------------------------------------------------------------------
   Two places: the band above the footer (#telecharger, full width) and the block inside a guide page
   (.is-inline, in the reading column). The band lays out art | text | button in a row when there is room;
   flex-wrap (not a fixed 3-column grid) lets the button go under the text instead of crushing the text
   column to one word per line, whatever the width of the box. */
.wcta { max-width: 1200px; margin: clamp(30px, 6vw, 70px) auto clamp(50px, 7vw, 90px); width: calc(100% - 2 * var(--gutter) - 18px);
  display: flex; flex-wrap: wrap; gap: 24px 34px; align-items: center; padding: clamp(22px, 4vw, 38px); scroll-margin-top: 90px; }
.wcta-art { position: relative; flex: none; width: 110px; height: 110px; display: grid; place-items: center; }
.wcta-rocket { width: 96px; height: 96px; animation: gfloat 3.4s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255, 106, 42, 0.45)); }
.wcta-moon { position: absolute; right: -4px; top: -4px; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset -7px 3px 0 0 #fff0a0; }
.wcta-text { flex: 1 1 19rem; min-width: 0; }
.wcta h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: #fff6e6; text-shadow: 2px 2px 0 var(--oak-line); overflow-wrap: anywhere; }
.wcta-text > p:not(.kicker) { margin-top: 8px; color: #e2cfb2; max-width: 36em; }
.wcta .kicker { color: var(--brass-light); margin-bottom: 6px; }
.wcta-insta { display: inline-block; margin-top: 10px; font: 700 0.88rem var(--display); color: var(--brass-light); }
.wcta-act { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.wcta-act .cta { margin: 0; align-items: flex-start; animation: none; }
.wcta-act .btn-xl { max-width: 100%; }
.wcta-act .btn-text { min-width: 0; }
.wcta-act .btn-text b, .wcta-act .btn-text small { overflow-wrap: anywhere; }
.wcta-act .cta-alt, .wcta-act .cta-note { color: #e2cfb2; }
/* Inside a guide page: the reading column is narrow, so the button always goes under the text. */
.wcta.is-inline { width: auto; max-width: none; margin: clamp(28px, 4vw, 44px) 0; gap: 18px 24px; padding: clamp(20px, 3vw, 30px); }
.wcta.is-inline .wcta-art { width: 84px; height: 84px; }
.wcta.is-inline .wcta-rocket { width: 72px; height: 72px; }
.wcta.is-inline .wcta-text { flex-basis: 14rem; }
.wcta.is-inline .wcta-act { flex: 1 1 100%; }
.wcta.is-inline h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
@media (max-width: 900px) {
  .wcta { flex-direction: column; text-align: center; }
  .wcta-text, .wcta.is-inline .wcta-text, .wcta.is-inline .wcta-act { flex-basis: auto; }
  .wcta-text > p:not(.kicker) { margin-inline: auto; }
  .wcta-act .cta { align-items: center; }
}

/* ---- the search -------------------------------------------------------------------------------- */
.wsearch { width: min(680px, calc(100vw - 32px)); max-height: min(78vh, 720px); margin: 10vh auto auto; padding: 18px; color: var(--ink); border: 0; overflow: hidden; }
.wsearch[open] { display: flex; flex-direction: column; animation: dialog-in 0.25s both; }
.wsearch::backdrop { background: rgba(5, 8, 16, 0.7); backdrop-filter: blur(4px); }
.wsearch-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 4px; color: var(--ink-brown); background: linear-gradient(180deg, var(--parch), var(--parch-2)); }
.wsearch-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 700 1.1rem var(--display); color: var(--ink-brown); }
.wsearch-close { border: 0; cursor: pointer; padding: 4px 8px; border-radius: 5px; font: 800 0.75rem var(--display); color: var(--parch); background: var(--oak); }
.wsearch-results { list-style: none; margin: 12px 0 0; padding: 0; overflow-y: auto; display: grid; gap: 4px; }
.wsearch-results a { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.wsearch-results a:hover, .wsearch-results a.on { background: rgba(242, 207, 122, 0.14); box-shadow: inset 0 0 0 1px rgba(242, 207, 122, 0.45); }
.wsearch-results .wslot { --s: 40px; }
.wsearch-results .px { width: 30px; height: 30px; margin: 5px; }
.wsearch-results span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.wsearch-results b { font: 600 1.02rem var(--pixel); }
.wsearch-results small { font: 700 0.78rem var(--display); color: #cdb894; }
.wsearch-results em { margin-left: auto; font: 800 0.7rem var(--display); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-light); }
.wsearch-empty { margin-top: 14px; color: #e2cfb2; }

@media (prefers-reduced-motion: reduce) {
  .wh-bigpx, .wcta-rocket, .wdep-band, .wtree-mini .n circle { animation: none; }
}
/* ---- the game's tables and cards (gen/wiki_tables.py) ------------------------- */
.wrefs .wh3 { margin-top: 2.2em; scroll-margin-top: 90px; }
.wcards { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.wcard { position: relative; padding: 14px 16px 16px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); }
.wcard-t { display: block; font: 600 1.15rem var(--pixel); color: var(--brass-light); }
.wcard-meta { margin: 2px 0 0; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.wcard p { margin: 8px 0 0; font-size: 0.95rem; line-height: 1.5; }
.wcard small { color: var(--muted); }
.wcard-sw { float: right; width: 26px; height: 26px; margin: 0 0 6px 10px; border-radius: 3px; background: var(--bc); box-shadow: 0 0 0 2px #0b0d13, inset 0 -6px 0 rgba(0, 0, 0, 0.25); }
.wtags { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wtags li { padding: 4px 10px; border-radius: 5px; font-weight: 700; font-size: 0.92rem; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.wdot { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 2px; vertical-align: -1px; background: var(--bc); box-shadow: 0 0 0 1px #0b0d13; }
.wslots { display: inline-flex; gap: 4px; }
.wfeed { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; }
.wfeed > span:last-child { font-weight: 700; }
.wchip.is-plain { cursor: default; }
.wslot.is-text { width: auto; min-width: var(--s); padding: 0 6px; }
.wslot.is-text small { font-size: 0.72rem; line-height: 1.1; color: var(--parch); text-align: center; }
.wslot.is-reducer { box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.55), 0 0 0 2px #0b0d13, 0 0 0 4px var(--iron); }
.wbadge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 0.72rem; background: var(--brass); color: #1a1209; vertical-align: 2px; }
.winfo-note { margin: 12px 0 0; font-size: 0.85rem; color: #6b4a2a; }
.wnet { margin-top: 1.2em; }
.wpower::before { content: "⚡ "; }
.wtank::before { content: "💧 "; }
.wpower, .wtank { margin-left: 8px; font-weight: 700; color: var(--brass-light); }
.wtable.is-dv td { text-align: center; } .wtable.is-dv td:first-child { text-align: left; }
.wchips.is-tight { margin: 0; gap: 4px 12px; }
.winfo-rows.is-slots div { border-top-color: var(--line); }
.winfo-rows.is-slots dt { color: var(--brass-light); }
