:root {
  color-scheme: dark;
  --night: #120b22;
  --night-soft: #1d1333;
  --line: rgba(255, 213, 79, 0.22);
  --gold: #ffd54f;
  --text: #f4ecdd;
  --muted: #c4b8d4;
  --parchment: #f3e2c0;
  --ink: #3e2723;
  --ink-soft: #5d4037;
  --green: #7ccb1e;
  --green-deep: #3f6d0a;
  --wood: #5a3213;
  --display: "Cinzel", Georgia, "Times New Roman", serif;
  --body: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 17px/1.65 var(--body);
}
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
img { display: block; }

/* Top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(18, 11, 34, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font: 800 18px/1 var(--display);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.links { display: flex; gap: 18px; font-size: 15px; }
.links a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.links a:hover, .links a[aria-current] { color: var(--gold); }

/* Heading over the game art */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 16px 92px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(18, 11, 34, 0.55), var(--night) 96%),
    url("img/cave.webp") center 35% / cover no-repeat;
}
.hero h1 {
  margin: 0 auto;
  max-width: 760px;
  color: var(--gold);
  font: 900 clamp(32px, 6.5vw, 52px)/1.12 var(--display);
  text-wrap: balance;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.75);
}
.hero p { margin: 14px auto 0; max-width: 580px; font-size: 19px; text-wrap: pretty; }
.hero .date { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* Layout */
.page {
  max-width: 1080px;
  margin: -52px auto 0;
  padding: 0 16px 56px;
  position: relative;
}
.columns { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .columns { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .toc { position: sticky; top: 84px; }
}

/* The sheet of parchment that holds the reading text */
.sheet {
  background: var(--parchment);
  color: var(--ink);
  border-radius: 18px;
  padding: clamp(22px, 5vw, 44px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.sheet a { color: var(--ink); font-weight: 500; }
.sheet a:hover { color: #000; }
.sheet a:focus-visible { outline-color: var(--ink); }
.sheet h2 {
  margin: 38px 0 8px;
  font: 800 22px/1.25 var(--display);
  text-wrap: balance;
}
.sheet > :first-child { margin-top: 0; }
.sheet p, .sheet ul, .sheet ol { margin: 0 0 12px; }
.sheet ul, .sheet ol { padding-left: 22px; }
.sheet li { margin-bottom: 6px; padding-left: 2px; }
.sheet li::marker { color: var(--ink-soft); }
.sheet strong { font-weight: 600; }

/* Contents */
.toc { font-size: 15px; }
.toc h2 {
  margin: 0 0 8px;
  color: var(--gold);
  font: 800 14px/1.3 var(--display);
  letter-spacing: 0.08em;
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover { color: var(--gold); }
@media (max-width: 899px) {
  .toc {
    background: var(--night-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
  }
  .toc ol { columns: 2; column-gap: 16px; }
  .toc li { break-inside: avoid; }
}

/* Short facts at the top */
.facts { display: grid; gap: 12px; margin-bottom: 28px; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact {
  background: var(--night-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 15.5px;
  line-height: 1.45;
}
.fact strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font: 800 16px/1.3 var(--display);
}

/* Two ways to delete */
.ways { display: grid; gap: 14px; margin-bottom: 28px; }
@media (min-width: 760px) { .ways { grid-template-columns: 3fr 2fr; } }
.way {
  background: var(--night-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.way h2 {
  margin: 0 0 12px;
  color: var(--gold);
  font: 800 20px/1.25 var(--display);
}
.way p { margin: 0 0 14px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 42px;
  margin-bottom: 12px;
  min-height: 30px;
}
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}

/* Same green pill as the game's main buttons */
.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a5e33a, var(--green) 55%, #5ea510);
  border: 3px solid var(--wood);
  color: var(--ink);
  font: 800 15px/1.2 var(--display);
  letter-spacing: 0.03em;
  text-align: center;
  text-decoration: none;
}
.button:hover { color: var(--ink); filter: brightness(1.08); }
.email { overflow-wrap: anywhere; }

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
}
.foot-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--gold); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .brand { font-size: 16px; }
  .brand img { width: 32px; height: 32px; }
  .links { gap: 12px; font-size: 14px; }
  .hero { padding: 44px 16px 80px; }
  .hero p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
