:root {
  --m522-ink: #15141a;
  --m522-paper: #f5f0e7;
  --m522-card: #fffaf2;
  --m522-lilac: #8174ff;
  --m522-lime: #c7f36b;
  --m522-coral: #ff6f61;
  --m522-sky: #72d6ff;
  --m522-muted: #6a6670;
  --m522-line: rgba(21, 20, 26, .18);
  --m522-radius: 26px;
  --m522-shadow: 10px 10px 0 #15141a;
  --m522-max: 1364px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--m522-ink);
  background: var(--m522-paper);
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: inherit; }

svg { display: block; }

.m522-topbar {
  width: min(calc(100% - 40px), var(--m522-max));
  min-height: 82px;
  margin: 18px auto 0;
  padding: 12px 14px 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 2px solid var(--m522-ink);
  border-radius: 18px;
  background: rgba(255, 250, 242, .92);
  box-shadow: 6px 6px 0 var(--m522-ink);
  position: relative;
  z-index: 10;
}

.m522-brand,
.m522-nav a,
.m522-button,
.m522-game-info > a,
.m522-filter a,
.m522-footer a {
  text-decoration: none;
}

.m522-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 28px;
  letter-spacing: .025em;
}

.m522-brand svg,
.m522-footer-brand svg {
  width: 42px;
  height: 42px;
  padding: 8px;
  fill: var(--m522-paper);
  background: var(--m522-ink);
  border-radius: 12px 4px 12px 4px;
}

.m522-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m522-topbar > *,
.m522-hero > *,
.m522-section-head > *,
.m522-overview > *,
.m522-footer > * { min-width: 0; }

.m522-nav a {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.m522-nav a:hover,
.m522-nav a:focus-visible { background: rgba(129, 116, 255, .14); }

.m522-nav .m522-nav-cta {
  color: var(--m522-paper);
  background: var(--m522-ink);
}

.m522-nav .m522-nav-cta:hover,
.m522-nav .m522-nav-cta:focus-visible {
  color: var(--m522-ink);
  background: var(--m522-lime);
}

main {
  width: min(calc(100% - 40px), var(--m522-max));
  margin: 28px auto 0;
}

.m522-hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .6fr);
  border: 2px solid var(--m522-ink);
  border-radius: var(--m522-radius);
  overflow: hidden;
  background: var(--m522-card);
  box-shadow: var(--m522-shadow);
}

.m522-hero-copy {
  padding: clamp(40px, 6vw, 78px);
  position: relative;
  isolation: isolate;
}

.m522-hero-copy::before,
.m522-hero-copy::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.m522-hero-copy::before {
  width: 250px;
  height: 250px;
  right: 1%;
  top: 4%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 10px, rgba(129, 116, 255, .2) 11px 13px);
}

.m522-hero-copy::after {
  width: 145px;
  height: 34px;
  right: 8%;
  bottom: 16%;
  background: var(--m522-coral);
  transform: rotate(-8deg);
  border: 2px solid var(--m522-ink);
  box-shadow: 5px 5px 0 var(--m522-ink);
}

.m522-eyebrow {
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.m522-eyebrow span {
  width: 11px;
  height: 11px;
  border: 2px solid var(--m522-ink);
  border-radius: 50%;
  background: var(--m522-lime);
  box-shadow: 2px 2px 0 var(--m522-ink);
}

h1,
h2,
h3,
.m522-final p,
.m522-footer-brand p {
  margin-top: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  letter-spacing: .018em;
  line-height: .98;
}

h1 {
  max-width: 16ch;
  margin-bottom: 28px;
  font-size: clamp(48px, 6.2vw, 88px);
  overflow-wrap: anywhere;
}

.m522-lead {
  max-width: 780px;
  margin: 0 0 30px;
  color: #4f4b55;
  font-size: clamp(17px, 1.5vw, 20px);
}

.m522-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.m522-button {
  min-height: 52px;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--m522-ink);
  border-radius: 12px;
  font-weight: 900;
  line-height: 1.2;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.m522-button:hover,
.m522-button:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--m522-ink);
}

.m522-button-main { background: var(--m522-lime); }
.m522-button-quiet { background: transparent; }

.m522-status {
  margin-top: 50px;
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 2px solid var(--m522-ink);
}

.m522-status div { display: flex; gap: 10px; align-items: baseline; }

.m522-status span {
  color: var(--m522-lilac);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-weight: 900;
}

.m522-status p { margin: 0; font-size: 14px; font-weight: 800; }

.m522-hero-panel {
  padding: 34px 28px;
  color: var(--m522-paper);
  background:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    var(--m522-ink);
  background-size: 26px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.m522-panel-label {
  margin: 0 0 18px;
  color: var(--m522-lime);
  font: 900 13px/1 ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.m522-hero-panel > a {
  padding: 19px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--m522-paper);
  border-top: 1px solid rgba(255,255,255,.23);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.m522-hero-panel > a:hover span,
.m522-hero-panel > a:focus-visible span { color: var(--m522-lime); }

.m522-hero-panel i {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: var(--m522-ink);
  background: var(--m522-lilac);
  border-radius: 50%;
  font: normal 900 12px/1 ui-monospace, "Cascadia Mono", monospace;
}

.m522-hero-panel > a:nth-of-type(2) i { background: var(--m522-lime); }
.m522-hero-panel > a:nth-of-type(3) i { background: var(--m522-coral); }
.m522-hero-panel > a:nth-of-type(4) i { background: var(--m522-sky); }

.m522-age {
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.23);
  color: rgba(245,240,231,.7);
  font-size: 13px;
}

.m522-catalog,
.m522-faq {
  margin-top: 70px;
  padding: clamp(30px, 5vw, 64px);
  border: 2px solid var(--m522-ink);
  border-radius: var(--m522-radius);
}

.m522-catalog { background: var(--m522-lilac); }

.m522-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .55fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: end;
}

.m522-section-head h2 {
  max-width: 14ch;
  margin-bottom: 0;
  font-size: clamp(39px, 5vw, 68px);
}

.m522-section-head > p { margin: 0; font-size: 15px; font-weight: 650; }

.m522-filter {
  margin: 30px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m522-filter a {
  padding: 9px 14px;
  border: 2px solid var(--m522-ink);
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.m522-filter a:first-child,
.m522-filter a:hover,
.m522-filter a:focus-visible { background: var(--m522-lime); }

.m522-game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.m522-game {
  min-width: 0;
  border: 2px solid var(--m522-ink);
  border-radius: 18px;
  overflow: hidden;
  background: var(--m522-card);
  box-shadow: 5px 5px 0 var(--m522-ink);
}

.m522-game-art {
  min-height: 150px;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--m522-ink);
}

.m522-game-art::before,
.m522-game-art::after {
  content: "";
  position: absolute;
  border: 2px solid var(--m522-ink);
  transform: rotate(28deg);
}

.m522-game-art::before { width: 88px; height: 88px; top: -25px; right: -10px; }
.m522-game-art::after { width: 46px; height: 46px; top: 44px; right: 53px; border-radius: 50%; }

.m522-game-art span {
  font: 400 58px/.8 Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  position: relative;
  z-index: 1;
}

.m522-game-art i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--m522-ink);
  border-radius: 50%;
  background: var(--m522-card);
  font: normal 900 11px/1 ui-monospace, monospace;
  position: relative;
  z-index: 1;
}

.m522-game-a .m522-game-art,
.m522-game-f .m522-game-art { background: var(--m522-lime); }
.m522-game-b .m522-game-art,
.m522-game-g .m522-game-art { background: var(--m522-coral); }
.m522-game-c .m522-game-art,
.m522-game-h .m522-game-art { background: var(--m522-sky); }
.m522-game-d .m522-game-art,
.m522-game-e .m522-game-art { background: #f4c76c; }

.m522-game-info { padding: 17px; }
.m522-game-info > p { margin: 0 0 4px; color: var(--m522-muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.m522-game-info h3 { min-height: 48px; margin: 0 0 12px; font-size: 24px; line-height: 1; }
.m522-game-info > div { min-height: 54px; display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; }
.m522-game-info > div span { padding: 5px 7px; border: 1px solid var(--m522-line); border-radius: 5px; font-size: 11px; font-weight: 800; }
.m522-game-info > a { margin-top: 14px; display: inline-flex; border-bottom: 2px solid var(--m522-ink); font-size: 13px; font-weight: 900; }
.m522-game-info > a:hover,
.m522-game-info > a:focus-visible { color: #4b3cff; border-color: #4b3cff; }

.m522-catalog-note {
  margin-top: 28px;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 2px solid var(--m522-ink);
}

.m522-catalog-note p { max-width: 760px; margin: 0; font-size: 14px; font-weight: 650; }

.m522-overview {
  margin-top: 70px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  border: 2px solid var(--m522-ink);
  border-radius: var(--m522-radius);
  overflow: hidden;
  background: var(--m522-card);
  box-shadow: var(--m522-shadow);
}

.m522-overview-rail {
  min-width: 0;
  padding: 34px 22px;
  color: var(--m522-paper);
  background: var(--m522-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.m522-overview-rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 400 46px/1 Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.m522-overview-rail i {
  color: var(--m522-lime);
  font: normal 900 18px/1 ui-monospace, "Cascadia Mono", monospace;
}

.m522-overview-body { padding: clamp(34px, 6vw, 82px); }

.m522-overview-body h2 {
  max-width: 20ch;
  margin: 72px 0 22px;
  font-size: clamp(34px, 4.2vw, 58px);
}

.m522-overview-body h2:first-child { margin-top: 0; }

.m522-overview-body h3 {
  margin: 44px 0 16px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.02;
}

.m522-overview-body p,
.m522-overview-body li { max-width: 780px; }

.m522-overview-body p { margin: 0 0 18px; }

.m522-overview-body ul,
.m522-overview-body ol {
  max-width: 780px;
  margin: 18px 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: m522-list;
}

.m522-overview-body li {
  counter-increment: m522-list;
  padding: 13px 14px 13px 54px;
  border-top: 1px solid var(--m522-line);
  position: relative;
}

.m522-overview-body li::before {
  content: counter(m522-list, decimal-leading-zero);
  position: absolute;
  left: 10px;
  color: #5b4dff;
  font: 900 13px/1.6 ui-monospace, "Cascadia Mono", monospace;
}

.m522-faq { background: var(--m522-sky); }

.m522-faq-list {
  margin-top: 34px;
  border-top: 2px solid var(--m522-ink);
}

.m522-faq details { border-bottom: 2px solid var(--m522-ink); }

.m522-faq summary {
  padding: 22px 50px 22px 0;
  cursor: pointer;
  list-style: none;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 900;
  position: relative;
}

.m522-faq summary::-webkit-details-marker { display: none; }

.m522-faq summary::after {
  content: "+";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  position: absolute;
  right: 0;
  top: 18px;
  border: 2px solid var(--m522-ink);
  border-radius: 50%;
  background: var(--m522-lime);
  font: 900 23px/1 Arial, sans-serif;
}

.m522-faq details[open] summary::after { content: "−"; background: var(--m522-coral); }

.m522-faq details p { max-width: 780px; margin: -6px 0 22px; }

.m522-final {
  margin-top: 34px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 2px solid var(--m522-ink);
  border-radius: 16px;
  background: var(--m522-card);
  box-shadow: 6px 6px 0 var(--m522-ink);
}

.m522-final p { max-width: 16ch; margin: 0; font-size: clamp(28px, 3vw, 43px); }

.m522-footer {
  width: min(calc(100% - 40px), var(--m522-max));
  margin: 70px auto 24px;
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 50px;
  align-items: center;
  color: var(--m522-paper);
  background: var(--m522-ink);
  border-radius: 24px;
}

.m522-footer-brand { display: flex; align-items: center; gap: 12px; }
.m522-footer-brand svg { fill: var(--m522-ink); background: var(--m522-lime); }
.m522-footer-brand p { margin: 0; font-size: 28px; }
.m522-footer-brand span { color: rgba(245,240,231,.66); font-size: 12px; }
.m522-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; }
.m522-footer-links a { border-bottom: 1px solid rgba(245,240,231,.42); font-size: 13px; font-weight: 800; }
.m522-footer-links a:hover,
.m522-footer-links a:focus-visible { color: var(--m522-lime); border-color: var(--m522-lime); }
.m522-footer-note { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid rgba(245,240,231,.2); color: rgba(245,240,231,.65); font-size: 12px; }

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

@media (max-width: 1020px) {
  .m522-hero { grid-template-columns: 1fr; }
  .m522-hero-panel { min-height: 390px; }
  .m522-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m522-overview { grid-template-columns: 110px minmax(0, 1fr); }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .m522-topbar,
  main,
  .m522-footer { width: min(calc(100% - 24px), var(--m522-max)); }
  .m522-topbar { min-height: 68px; margin-top: 12px; padding: 9px 10px; box-shadow: 4px 4px 0 var(--m522-ink); }
  .m522-brand { font-size: 23px; }
  .m522-brand svg { width: 36px; height: 36px; }
  .m522-nav > a:not(.m522-nav-cta) { display: none; }
  .m522-nav .m522-nav-cta {
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-size: 0;
  }
  .m522-nav .m522-nav-cta::after { content: "↗"; font: 900 20px/1 Arial, sans-serif; }
  main { margin-top: 20px; }
  .m522-hero,
  .m522-overview { box-shadow: 5px 5px 0 var(--m522-ink); }
  .m522-hero-copy { padding: 36px 22px 30px; }
  .m522-hero-copy::before { width: 150px; height: 150px; opacity: .6; }
  .m522-hero-copy::after { display: none; }
  h1 { max-width: 13ch; font-size: clamp(38px, 11.5vw, 50px); line-height: 1.01; }
  .m522-actions { display: grid; }
  .m522-button { width: 100%; }
  .m522-status { grid-template-columns: 1fr; gap: 8px; }
  .m522-status div { padding-bottom: 8px; border-bottom: 1px solid var(--m522-line); }
  .m522-hero-panel { min-height: auto; padding: 28px 22px; }
  .m522-catalog,
  .m522-faq { margin-top: 42px; padding: 30px 20px; }
  .m522-section-head { grid-template-columns: 1fr; gap: 18px; }
  .m522-section-head h2 { font-size: 43px; }
  .m522-filter { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .m522-filter a { flex: 0 0 auto; }
  .m522-game-grid { grid-template-columns: 1fr; }
  .m522-game-art { min-height: 138px; }
  .m522-catalog-note { align-items: stretch; flex-direction: column; }
  .m522-overview { margin-top: 42px; grid-template-columns: 1fr; }
  .m522-overview-rail { min-height: 74px; padding: 16px 20px; flex-direction: row; }
  .m522-overview-rail span { writing-mode: horizontal-tb; transform: none; font-size: 30px; }
  .m522-overview-body { padding: 34px 20px; overflow-wrap: anywhere; }
  .m522-overview-body h2 { margin-top: 48px; font-size: 38px; }
  .m522-overview-body h3 { font-size: 31px; }
  .m522-overview-body li { padding-left: 46px; }
  .m522-final { align-items: stretch; flex-direction: column; }
  .m522-footer { margin-top: 42px; grid-template-columns: 1fr; }
  .m522-footer-links { justify-content: flex-start; }
  .m522-footer-note { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
