:root {
  color-scheme: dark;
  --background: #0e1511;
  --panel: #151f18;
  --panel-light: #1b281e;
  --line: #2b3b2e;
  --text: #f0f4e8;
  --muted: #b5c3b4;
  --accent: #d3f987;
  --accent-text: #18220f;
  --sans: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "DM Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }
button, summary { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[id] { scroll-margin-top: 1.4rem; }

.frame { width: min(calc(100% - 4rem), 74rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid #202e23; }
.header-inner {
  min-height: 4.4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .65rem;
  font: 750 1.32rem/1 var(--display);
  text-decoration: none;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.brand-mark {
  width: 1.72rem;
  height: 1.72rem;
  display: inline-grid;
  place-items: center;
  border-radius: .48rem;
  background: var(--accent);
  box-shadow: 0 0 14px #b9ef5317;
}
.brand-mark::before {
  content: "";
  width: .81rem;
  height: .56rem;
  border: 2px solid var(--accent-text);
  border-radius: .17rem;
  transform: rotate(-38deg);
  box-shadow: inset .17rem 0 var(--accent-text);
}
.site-header nav { display: flex; align-items: center; gap: clamp(1rem, 3.4vw, 2.65rem); }
.site-header nav a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav a:first-child, .site-header nav a:hover { color: var(--accent); }

.button {
  display: inline-flex;
  min-height: 2.6rem;
  justify-content: center;
  align-items: center;
  padding: .55rem .95rem;
  border: 1px solid transparent;
  border-radius: .57rem;
  font-size: .875rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s, border-color .16s;
}
.button-outline { border-color: #435746; background: #213024; color: var(--text); }
.button-outline:hover { border-color: #77906d; background: #2b422e; }
.game-link { justify-self: end; }
.button-primary {
  min-height: 2.9rem;
  padding-inline: 1.1rem;
  color: var(--accent-text);
  background: var(--accent);
}
.button-primary:hover { background: #e3ffb0; }

.hero {
  min-height: 20.25rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  border: 1px solid #344833;
  border-radius: 1.25rem;
  overflow: clip;
  isolation: isolate;
  background:
    linear-gradient(90deg, #0d1c13 2%, #0d1c13f2 26%, #0d1c138a 48%, #0d1c130d 78%),
    linear-gradient(0deg, #0a160ec2, transparent 42%),
    url("/assets/flooded-ruins.webp") center 55% / cover no-repeat,
    radial-gradient(ellipse at 80% 40%, #3e6549, #13261a 54%, #0d1c13);
}
.hero-content { padding: 1.5rem clamp(1.4rem, 4.1vw, 3.45rem); }
.hero-category {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #d5e7d4;
  font: 650 .875rem/1.2 var(--mono);
  letter-spacing: .095em;
}
.hero-category span:first-child { color: var(--accent); }
.hero-category span:nth-child(2) { width: .25rem; height: .25rem; border-radius: 50%; background: #a7ba9f; }
h1, h2 { font-family: var(--display); font-weight: 760; letter-spacing: -.04em; }
h1 {
  margin: .72rem 0 0;
  font-size: clamp(3rem, 5.9vw, 4.65rem);
  line-height: .99;
  letter-spacing: -.065em;
}
h1 strong { color: var(--accent); font-weight: inherit; }
.hero p { max-width: 29.5rem; margin: .85rem 0 1.05rem; color: #d2e0d0; font-size: 1rem; }

.guide-grid {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(17rem, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .55rem 1rem; flex-wrap: wrap; }
h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.12; }
.review-date {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  font-size: .875rem;
  color: var(--muted);
}
.review-date time { color: #e1eadb; }
.status-dot { width: .43rem; height: .43rem; background: var(--accent); border-radius: 50%; margin-right: .2rem; }
.section-intro { margin: .6rem 0 1.1rem; color: var(--muted); }
.code-panel { border: 1px solid var(--line); border-radius: .9rem; overflow: hidden; background: var(--panel); }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: var(--panel-light); }
thead th { padding: .72rem 1rem; color: #c3d0c0; font-size: .875rem; font-weight: 650; }
tbody tr + tr { border-top: 1px solid var(--line); }
tbody th, tbody td { padding: 1rem; vertical-align: middle; }
tbody th { font-weight: 500; }
tbody code {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: .32rem;
  background: #253526;
  color: #e4fcba;
  white-space: nowrap;
  font: 700 .93rem/1.4 var(--mono);
}
.reward { color: #e4ecdf; font-size: .94rem; line-height: 1.43; }
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 2rem;
  padding: .15rem .55rem;
  color: #d3eabb;
  white-space: nowrap;
  font-size: .875rem;
  text-decoration: none;
}
.pill:hover { text-decoration: underline; text-underline-offset: .15em; }
.pill.reported { color: #e9d5a1; }
.copy-cell { text-align: right; }
.copy-button {
  min-width: 4.3rem;
  min-height: 2.5rem;
  padding: .36rem .7rem;
  border: 1px solid #4a6549;
  border-radius: .46rem;
  background: #263c28;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 750;
}
.copy-button:hover { border-color: #90ab75; background: #344f32; }
.source-note { margin: .8rem 0 0; color: var(--muted); font-size: .875rem; }
.source-note a, .faq-items p a { text-underline-offset: .18em; }
.source-note a:hover, .faq-items p a:hover, .footer-inner > a:last-child:hover { color: var(--accent); }

.redeem-card {
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: 1.36rem;
  background: var(--panel);
}
.redeem-card h2 { font-size: 1.45rem; }
.steps { counter-reset: step; display: grid; gap: 1.04rem; margin: 1.15rem 0 1.2rem; padding: 0; list-style: none; }
.steps li { position: relative; display: flex; align-items: flex-start; gap: .7rem; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  flex: 0 0 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: #2c402a;
  color: var(--accent);
  font: 700 .875rem / 1 var(--mono);
}
.steps strong { display: inline-block; padding-top: .05rem; font-size: 1rem; }
.steps p { margin: .13rem 0 0; color: var(--muted); font-size: .94rem; line-height: 1.38; }
.play-button { width: 100%; }

.expired { margin-top: 1.4rem; }
.expired, .faq-items {
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--panel);
}
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .92rem 1.1rem;
  font-weight: 700;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: #ceeaa8; flex: none; font-size: 1.25rem; line-height: 1; }
details[open] > summary::after { content: "−"; }
summary:hover { color: var(--accent); }
details p { margin: 0; padding: 0 1.1rem 1rem; color: var(--muted); }
.faq-section { max-width: 48.5rem; margin: 2.7rem 0 3.1rem; }
.faq-section h2 { margin-bottom: 1rem; }
.faq-items details + details { border-top: 1px solid var(--line); }

.site-footer { border-top: 1px solid var(--line); background: #101913; }
.footer-inner { min-height: 5rem; display: flex; gap: 1rem 1.35rem; align-items: center; flex-wrap: wrap; padding-block: 1rem; }
.footer-inner p { margin: 0 auto 0 0; color: var(--muted); font-size: .875rem; }
.footer-inner > a:last-child { color: var(--muted); font-size: .875rem; text-underline-offset: .2em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 2; top: .65rem; left: .65rem; transform: translateY(-180%); border-radius: .35rem; padding: .5rem .8rem; background: var(--accent); color: var(--accent-text); }
.skip-link:focus { transform: none; }

@media (max-width: 56rem) {
  .frame { width: min(calc(100% - 2.5rem), 74rem); }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .redeem-card { width: min(100%, 48.5rem); }
  .play-button { width: auto; }
  .faq-section { margin-top: 2.15rem; }
}

@media (max-width: 37rem) {
  .frame { width: calc(100% - 1.5rem); }
  .header-inner { grid-template-columns: 1fr auto; gap: .52rem .65rem; padding-top: .72rem; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; gap: 1.5rem; }
  .site-header nav a { padding: .42rem .12rem .62rem; }
  .game-link { grid-column: 2; grid-row: 1; min-height: 2.25rem; padding-inline: .6rem; }
  .hero {
    margin-top: .8rem;
    min-height: 20.25rem;
    background:
      linear-gradient(90deg, #0d1c13f5 0%, #0d1c13bd 50%, #0d1c134d 100%),
      linear-gradient(0deg, #0a160ec7, transparent 65%),
      url("/assets/flooded-ruins.webp") 60% center / cover no-repeat,
      #112319;
  }
  .hero-content { padding-block: 1.65rem; }
  h1 { font-size: clamp(2.6rem, 10.6vw, 4.15rem); }
  .hero p { margin: .85rem 0 1.1rem; }
  .guide-grid { margin-top: 1.85rem; gap: 1.15rem; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .code-panel table, .code-panel tbody { display: block; }
  .code-panel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .code-panel tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: .55rem;
    row-gap: .42rem;
    padding: .85rem;
  }
  .code-panel tbody th, .code-panel tbody td { padding: 0; }
  .reward { grid-column: 1; grid-row: 2 / span 2; align-self: center; }
  .code-status { grid-column: 2; grid-row: 2; justify-self: end; }
  .copy-cell { grid-column: 2; grid-row: 1; }
  .copy-button { min-height: 2rem; }
  .play-button { width: 100%; }
}

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

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/bricolage-grotesque.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
