/* Recipes page: the game's crafting table drawn the way the game draws it (grey panel, sunken
   slots at 2x the game's 18 px, white stack counts in pixel type, the grey arrow), with the game's
   own item pictures. Lists of what each recipe works on sit under the examples. */
.figs { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 22px; }
.mc { margin: 0; display: grid; gap: 8px; justify-items: start; align-content: start; }
.mc figcaption { max-width: 26ch; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
.table { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #C6C6C6; border: 2px solid #000; border-radius: 4px;
  box-shadow: inset 2px 2px 0 #FFFFFF, inset -2px -2px 0 #555555; }
.grid { display: grid; }
.g3 { grid-template-columns: repeat(3, 36px); }
.g2 { grid-template-columns: repeat(2, 36px); }
.slot { position: relative; flex: none; width: 36px; height: 36px; display: grid; place-items: center; background: #8B8B8B;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #FFFFFF; }
.out .slot { width: 52px; height: 52px; }
.slot img { width: 32px; height: 32px; object-fit: cover; object-position: top; image-rendering: pixelated; }
.slot.slab img { clip-path: inset(50% 0 0 0); }
.slot.stairs img { clip-path: polygon(0 0, 50% 0, 50% 50%, 100% 50%, 100% 100%, 0 100%); }
.slot b { position: absolute; right: 2px; bottom: 0; font: 500 18px/1 var(--pixel); color: #FFFFFF; text-shadow: 2px 2px 0 #3F3F3F; pointer-events: none; }
.arrow { flex: none; width: 40px; height: 28px; background: #8B8B8B; clip-path: polygon(0 36%, 58% 36%, 58% 0, 100% 50%, 58% 100%, 58% 64%, 0 64%); }

/* what each recipe works on: small before -> after pairs */
.chapter ul.pairs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; }
.chapter ul.pairs li { display: flex; align-items: center; gap: 8px; margin: 0; }
.pairs li[hidden], .stages tr[hidden] { display: none; }
.pairs .slot, .stages .slot { width: 32px; height: 32px; }
.pairs .slot img, .stages .slot img { width: 24px; height: 24px; }
.to { flex: none; width: 16px; height: 12px; background: var(--ink-soft); clip-path: polygon(0 36%, 55% 36%, 55% 0, 100% 50%, 55% 100%, 55% 64%, 0 64%); }
.lbl { min-width: 0; font-size: 16px; line-height: 1.3; }

.stagewrap { margin-top: 16px; overflow-x: auto; }
.stages { border-collapse: collapse; font-size: 16px; }
.stages thead th { padding: 0 6px 6px; font: 400 14px/1.2 var(--body); color: var(--ink-soft); text-align: center; }
.stages thead th:first-child { text-align: left; padding-left: 0; }
.stages tbody tr { border-top: 1px solid var(--rule); }
.stages tbody tr:last-child { border-bottom: 1px solid var(--rule); }
.stages tbody th { padding: 5px 16px 5px 0; text-align: left; font-weight: 600; white-space: nowrap; }
.stages td { padding: 5px 10px; }
.stages td .slot { margin-inline: auto; }

.chapter .figs + p, .chapter .figs + ul, .chapter .stagewrap + p { margin-top: 18px; }

@media (max-width: 560px) {
  .figs { gap: 18px; }
  .table { gap: 10px; padding: 10px; }
  .g3 { grid-template-columns: repeat(3, 32px); }
  .g2 { grid-template-columns: repeat(2, 32px); }
  .grid .slot { width: 32px; height: 32px; }
  .grid .slot img { width: 28px; height: 28px; }
  .out .slot { width: 46px; height: 46px; }
  .arrow { width: 30px; height: 22px; }
  .stages td { padding: 4px 4px; }
}
