:root {
  color: #111;
  background: #02002f;
  font-family: "Times New Roman", Times, serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  padding: 28px 14px;
  background-color: #02002f;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle, #ff8a00 0 1px, transparent 1.5px),
    radial-gradient(circle, #9b9b9b 0 1px, transparent 1.5px);
  background-position: 0 0, 19px 27px, 41px 12px;
  background-size: 53px 53px, 71px 71px, 89px 89px;
}

button,
a {
  font: inherit;
}

.scatter {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.scatter .gif {
  position: absolute;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 rgb(0 0 0 / 45%));
}

.title-card {
  position: relative;
  z-index: 1;
  width: min(700px, calc(100% - 20px));
  margin: 15vh auto 30px;
  padding: 66px 28px 36px;
  border: 8px outset #dedede;
  background: #bdbdbd;
  box-shadow:
    8px 8px 0 #151515,
    inset 2px 2px 0 #f4f4f4;
  text-align: center;
}

h1 {
  margin: 0;
  color: #161616;
  font: bold clamp(42px, 10vw, 78px)/1.1 "Times New Roman", Times, serif;
  text-shadow:
    2px 2px #f3f3f3,
    -2px -2px #6d6d6d;
}

.intro {
  max-width: 600px;
  margin: 26px auto 0;
  padding: 12px;
  border: 3px dashed #232369;
  background: #2f2f2f;
  color: #f4f4f4;
  font: 18px/1.45 "Comic Sans MS", "Comic Sans", cursive;
}

.style-toggle,
.why-button {
  position: absolute;
  top: 10px;
  padding: 5px 9px;
  border: 3px outset #eee;
  background: #c0c0c0;
  cursor: pointer;
  font: bold 13px "Times New Roman", Times, serif;
}

.style-toggle {
  left: 10px;
  color: #0000bb;
  text-decoration: none;
}

.why-button {
  right: 10px;
  color: #111;
  text-transform: lowercase;
}

.hand-point {
  position: absolute;
  top: 12px;
  right: -36px;
  z-index: 2;
  width: 46px;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
  animation: hand-nudge 900ms ease-in-out infinite alternate;
}

.style-toggle:active,
.why-button:active {
  border-style: inset;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}

dialog {
  width: min(480px, calc(100% - 40px));
  padding: 28px;
  border: 6px outset #dedede;
  background: #bdbdbd;
  color: #111;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  box-shadow: 8px 8px 0 #111;
}

dialog::backdrop {
  background: rgb(0 0 30 / 78%);
}

.dialog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

h2 {
  margin: 0;
  font-size: 24px;
}

.dialog-header button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #0000bb;
  cursor: pointer;
}

dialog p {
  margin: 24px 0 0;
  color: #222;
  font-size: 17px;
  line-height: 1.6;
}

@keyframes hand-nudge {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-6px);
  }
}

@media (max-width: 520px) {
  body {
    padding-inline: 6px;
  }

  .title-card {
    width: calc(100% - 12px);
    margin-top: 10vh;
    padding-inline: 14px;
  }

  .hand-point {
    top: 48px;
    right: -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hand-point {
    animation: none;
  }
}
