:root {
  color-scheme: dark;
  --paper: #191c20;
  --ink: #fafbfc;
  --muted: #c1c9d3;
  --line: #353d47;
  --accent: #9ec4ff;
  --on-accent: #142338;
  --header: #20344f;
  --band: #064db4;
  font: 400 14px/1.5 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

body[data-platform="xbox"] {
  --accent: #94dfad;
  --on-accent: #172b1c;
  --header: #233c2b;
  --band: #106637;
}

h1, h2, h3, p {
  margin: 0;
}

button, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

input {
  caret-color: var(--accent);
}

html {
  scrollbar-color: #637183 var(--paper);
}

.wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 36px;
}

.hero {
  flex-shrink: 0;
  background: var(--header);
  border-top: 3px solid var(--band);
  border-bottom: 1px solid #637183;
  padding-bottom: 24px;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 24px;
}

h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.platform {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--paper);
  flex-shrink: 0;
}

.platform button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.platform svg {
  display: block;
  color: #fff;
}

.platform button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.platform button[aria-pressed="true"] svg {
  color: #000;
}

.search-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.search {
  position: relative;
}

.search > svg {
  position: absolute;
  left: 16px;
  top: 15px;
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 10px 16px 10px 46px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--paper);
  font-size: 16px;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 1;
} 

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.categories button {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--paper);
  font-size: 12px;
  font-weight: 600;
}

.categories button span {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.categories button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.platform button:enabled:hover:not([aria-pressed="true"]), .categories button:enabled:hover:not([aria-pressed="true"]) {
  background: #303944;
}

@media (forced-colors: active) {
  .platform button,
  .categories button {
    position: relative;
  }

  .platform button svg,
  .platform button[aria-pressed="true"] svg {
    color: ButtonText;
    forced-color-adjust: none;
  }

  .platform button[aria-pressed="true"]::after,
  .categories button[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    inset: 2px;
    border: 2px solid ButtonText;
    border-radius: 4px;
    pointer-events: none;
  }
}

button:disabled, .search input:disabled {
  cursor: default;
  opacity: 1;
}

#results {
  flex: 1;
  padding-top: 20px;
}

#results [hidden] {
  display: none !important;
}

.catalogue-help {
  max-width: 72ch;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
}

.catalogue-help strong {
  color: var(--ink);
}

.catalogue-help p + p {
  margin-top: 5px;
}

.category {
  padding: 12px 0 24px;
}

.category h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 5px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.category h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.entry {
  display: grid;
  grid-template-columns: minmax(140px, .83fr) minmax(0, 1.25fr);
  gap: 8px clamp(14px, 3vw, 28px);
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: break-word;
  scroll-margin-top: 12px;
}

.entry:target {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.entry h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.012em;
  line-height: 1.35;
}

.entry h3 a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}

.entry h3 a:hover {
  text-decoration: underline;
}

.effect {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.code-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.empty-code {
  color: var(--muted);
  font-size: 13px;
}

.sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sequence li,
.inline-input {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 29px;
  padding: 0 3px;
  border: 1px solid #4d5864;
  border-radius: 5px;
  background: linear-gradient(180deg, #363d45, #252b33);
  color: var(--ink);
  font: 650 16px/1 'Segoe UI Symbol', 'Segoe UI', sans-serif;
}

.inline-input {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  vertical-align: middle;
}

.unlock {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.unlock strong {
  margin-right: 5px;
  color: #ffadad;
  font-weight: 650;
}

.more[open]:not(.has-collapse) {
  display: flex;
  flex-direction: column;
}

.more[open]:not(.has-collapse) > summary {
  order: 1;
}

.more[open].has-collapse > summary {
  display: none;
}

.more .collapse-more {
  width: 100%;
  border: 0;
  background: transparent;
}

.more summary,
.more .collapse-more {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 8px 2px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

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

.more summary::after,
.more .collapse-more::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 0 3px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.more[open] summary::after,
.more .collapse-more::after {
  margin: 3px 0 0;
  transform: rotate(225deg);
}

.more summary:hover span,
.more .collapse-more:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.open-label,
.more[open] .fold-label {
  display: none;
}

.more[open] .open-label {
  display: inline;
}

@media (max-width: 580px) {
  .entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-block: 16px;
  }
}

@media (max-width: 365px) {
  .sequence {
    gap: 4px;
  }

  .sequence li {
    min-width: 24px;
  }
}

.empty {
  padding: 48px 0 70px;
}

.empty h2 {
  font-size: 23px;
  margin-bottom: 8px;
}

.empty p {
  color: var(--muted);
}

.reset {
  margin-top: 20px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 7px;
  font-weight: 600;
  background: var(--accent);
  color: var(--on-accent);
}

.footer {
  flex-shrink: 0;
  padding-top: 24px;
  padding-bottom: 26px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 36px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.footer-about {
  max-width: 64ch;
}

.footer-about h2 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-about p {
  font-size: 13px;
}

.footer-about p + p {
  margin-top: 6px;
}

.footer-meta {
  flex-shrink: 1;
  max-width: 100%;
}

.footer-brand {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  overflow-wrap: anywhere;
}


.footer a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 18px;
  z-index: 1;
  padding: 12px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 4px;
}

.skip-link:focus {
  top: 8px;
}

@media (max-width: 580px) {
  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .intro {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  h1 {
    font-size: 28px;
  }

  .platform button {
    flex: 1;
  }

  #results {
    padding-top: 12px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background-color .15s ease-out, color .15s ease-out;
  }
}

.document-header {
  padding-bottom: 0;
}

.document-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.document-main {
  flex: 1;
  padding-top: 36px;
  padding-bottom: 48px;
}

.document-copy {
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.document-copy p + p {
  margin-top: 16px;
}

.document-copy section {
  margin-top: 32px;
}

.document-copy h2 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

.document-copy .document-updated {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.document-back,
.document-copy a,
.document-home {
  color: var(--accent);
  text-underline-offset: 3px;
}

.document-back {
  flex-shrink: 0;
  padding: 10px 0;
}

.document-home {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 0;
  font-weight: 600;
}

.document-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 580px) {
  .document-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .document-main {
    padding-top: 28px;
    padding-bottom: 32px;
  }
}
