*, *::after, *::before {
  background: transparent;
  border: 0;
  box-sizing: border-box;
  color: inherit;
  cursor: default;
  font: inherit;
  margin: 0;
  padding: 0;
}

button, button *, button *::after, button *::before {
  cursor: pointer;
}

:root {
  background-color: #000000;
  color: #FFFFFF;
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1.5;
  user-select: none;
}

html, body {
  height: 100%;
  width: 100%;
}

:focus {
  outline: 2px solid #FFFFFF;
}

[hidden] {
  display: none !important;
}

button {
  cursor: pointer;
}
button[aria-disabled="true"],
button[disabled] {
  cursor: not-allowed;
}

/* Responsive fluid font sizing */
@media (max-width: 20rem) {
  body {
    font-size: 0.5rem;
  }
}

@media (min-width: 20rem) {
  body {
    font-size: calc(0.5rem + ((1vw - 0.4rem) * 1));
  }
}

.u-screenReader {
  clip: rect(0, 0, 0, 0);
  -webkit-clip-path: inset(50);
  clip-path: inset(50);
  border: 0;
  height: 1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.c-menu {
  align-items: center;
  text-align: center;
}
  .c-menu--title {
    font-size: 3em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
  }
  .c-menu--subtitle {
    font-size: 1.1em;
    max-width: 40em;
    opacity: 0.85;
  }
  .c-menu--list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    margin-top: 1.5rem;
    padding: 0;
    width: min(28em, 90vw);
  }
    .c-menu--list li { width: 100%; }
  .c-menu--button {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.4rem;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 1.05em;
    padding: 0.7em 1em;
    transition: background 120ms ease, border-color 120ms ease;
    width: 100%;
  }
  .c-menu--button:hover,
  .c-menu--button:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: #FFFFFF;
    outline: none;
  }
  .c-menu--button[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.22);
    border-color: #FFFFFF;
  }

.c-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  padding: 2em;
  width: 100%;
}
  .c-screen:focus {
    outline: 0;
  }
  .c-screen > * + * {
    margin-top: 1rem;
  }

.a-app {
  height: 100%;
  left: 0;
  letter-spacing: 0.125em;
  position: absolute;
  opacity: 0;
  top: 0;
  transition: opacity 1s linear;
  width: 100%;
}
  .a-app--overlaySupport {
    height: 100%;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 666;
  }
  .a-app--screen {
    align-items: center;
    background-color: #000000;
    display: flex;
    height: 100%;
    justify-content: center;
    left: 0;
    position: absolute;
    opacity: 0;
    top: 0;
    transition: all 0.5s ease;
    transition-property: opacity;
    width: 100%;
    z-index: 1;
  }
    .a-app--screen > * {
      flex: 1 1 auto;
      max-width: 64em;
    }
    .a-app--screen-active {
      opacity: 1;
      z-index: 3;
    }
    .a-app--screen-inactive {
      opacity: 0;
      z-index: 2;
    }

.a-app-active {
  opacity: 1;
}

.a-help {
  justify-content: flex-start;
  overflow-y: auto;
  text-align: left;
}
  .a-help > * + * {
    margin-top: 1rem;
  }
  .a-help h1 {
    font-size: 2rem;
  }
  .a-help h2 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
  }
  .a-help ul {
    padding-left: 1.5rem;
  }
  .a-help li + li {
    margin-top: 0.25rem;
  }
  .a-help kbd {
    border: 1px solid currentColor;
    border-radius: 0.25em;
    display: inline-block;
    font-family: monospace;
    padding: 0 0.4em;
  }
  .a-help--back {
    align-self: flex-start;
    background: transparent;
    border: 2px solid currentColor;
    color: inherit;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    margin-top: 2rem;
  }

.a-menu {
  align-items: center;
  text-align: center;
}
.a-menu--logo {
  color: #FFFF00;
  font-size: 3em;
  letter-spacing: 0.25em;
}
.a-menu--instruction {
  color: #cccccc;
}
.a-menu--nav {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin: 1em auto;
  max-width: 24em;
  width: 100%;
}
.a-menu--button,
.a-pause--button,
.a-learn--back,
.a-settings--back,
.a-highscores--back,
.a-gameover--continue,
.a-gameover--submit,
.a-learn--nav button,
.a-settings--list button {
  background: #1a1a1a;
  border: 2px solid #FFFF00;
  color: #FFFFFF;
  cursor: pointer;
  font-family: inherit;
  font-size: 1em;
  letter-spacing: 0.125em;
  padding: 0.6em 1em;
}
.a-menu--button:focus,
.a-pause--button:focus,
.a-learn--back:focus,
.a-settings--back:focus,
.a-highscores--back:focus,
.a-gameover--continue:focus,
.a-gameover--submit:focus,
.a-learn--nav button:focus,
.a-settings--list button:focus {
  background: #FFFF00;
  color: #000000;
  outline: 2px solid #FFFFFF;
}

.a-game--hud {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  font-size: 1.2em;
  color: #FFFF00;
  margin-bottom: 1em;
}
.a-game--help {
  color: #cccccc;
  font-size: 0.9em;
}

.a-learn--nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
  gap: 0.5em;
  margin: 1em 0;
}

.a-settings--list {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin: 1em 0;
}
.a-settings--list fieldset {
  border: 1px solid #444;
  padding: 0.5em 1em;
}
.a-settings--list legend {
  color: #FFFF00;
  letter-spacing: 0.125em;
}
.a-settings--list button {
  margin-right: 0.25em;
}
.a-settings--list button[aria-pressed="true"] {
  background: #FFFF00;
  color: #000000;
}

.a-highscores--list {
  font-family: monospace;
  font-size: 1.1em;
  margin: 1em 0;
  padding-left: 2em;
}

.a-gameover--form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 1em 0;
}
.a-gameover--name {
  background: #000;
  border: 2px solid #FFFF00;
  color: #FFFFFF;
  flex: 1 1 12em;
  font-family: inherit;
  font-size: 1em;
  padding: 0.6em 1em;
}
.a-gameover--name:focus {
  background: #1a1a00;
  outline: 2px solid #FFFFFF;
}

.a-splash {
  align-items: center;
  text-align: center;
}
  .a-splash--details {
    bottom: 2rem;
    font-family: monospace;
    font-size: 0.75em;
    font-weight: 300;
    left: 2rem;
    letter-spacing: 0;
    padding: 0.5rem 0.75rem;
    position: absolute;
    text-align: left;
  }
  .a-splash--instruction {
    animation: a-splash--instruction 1s ease-in-out 0s infinite alternate both;
    bottom: 2rem;
    line-height: 2;
    padding: 0.5em 0.75em;
    position: absolute;
    right: 2rem;
    text-transform: uppercase;
  }
  .a-splash--logo {
    font-size: 4em;
  }

@keyframes a-splash--instruction {
  0% {
   opacity: 0.5;
  }
  100% {
    opacity: 1.0;
  }
}
