*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: rgb(53, 54, 121);  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 16px;
  font-family: "Times New Roman", serif; /* I wish I could just do century schoolbook but I dont want to host font*/
}

h1 {
  color: rgba(255, 255, 255, 0.747);
  margin: 0;
  text-align: center;
  font-size: 200%;
}

.stat-num {
  display: block;
  color: rgba(255, 255, 255, 0.747);
  text-align: center;
  font-size: 200%;
  font-weight: 700;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.747);
  margin: 0;
  font-size: 100%;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

p {
  color: rgb(182, 182, 212);
  margin: 0;
}

a {
  color: #fcc200;
}

a:hover {
  font-weight: bold;
}

/* Deliberately the same gold as an unvisited link. Fading a followed link
   to a paler color reads here as the link having gone dead rather than
   having been used, and most links on this site are meant to be used
   again and again, so a page ended up in two colors for no reason a
   reader could act on. Hover still answers "is this a link". */
a:visited {
  color: #fcc200;
}

/* Keyboard focus visibility */
a:focus-visible {
  outline: 2px solid #be7dfe;
  outline-offset: 2px;
  border-radius: 2px;
}

.section {
  margin: 30px;
}

#slogan {
  font-weight: bolder;
  text-align: center;
}

#footer {
  color: rgb(182, 182, 212);
  font-size: 14px;
  font-weight: bolder;
  font-style: italic;
  padding-bottom: 15px;
  max-width: 500px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

#footer img {
  width: 64px;
  height: auto;
  flex-shrink: 0;
  opacity: 70%;
}

#topstats {
  display: flex;
  gap: 20px;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  margin: 25px;
}

.stat {
  text-align: center;
}

#code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  max-width: 100%;
  margin: 10px 0;
  background-color: rgb(14, 14, 39);
  color: rgba(255, 255, 255, 0.747);
  padding: 10px;
  border-radius: 15px;
  overflow-x: auto;
}

#topcontainer {
  width: auto;
  background-color: rgb(28, 28, 70);
  border: 2px solid rgb(163, 163, 204);
  padding: 15px 40px;
  margin: 30px;
  box-shadow: 0 0 0 4px rgb(28, 28, 70);
}

#allcontainer {
  width: 100%;
  max-width: 650px;
  border: 1px solid rgb(163, 163, 204);
  padding: 10px;
  margin: 30px 0;
  background-color: rgb(28, 28, 70);
  box-shadow: 0 0 0 2px rgb(28, 28, 70);
}

.filter {
  color: #7d9ffe;
  white-space: nowrap;
  vertical-align: top;
}

.filtdesc {
  color: rgb(182, 182, 212);
}

#tspacer {
  padding-top: 20px;
}

table {
  width: 100%;
  max-width: 550px;
  margin: 10px auto;
  font-size: 14px;
  border-collapse: collapse;
}

td {
  border-bottom: 1px solid rgb(57, 57, 114);
  padding: 10px;
}

/* Small screens: tighten the generous desktop spacing */
@media (max-width: 600px) {
  .section {
    margin: 22px 4px;
  }

  #topcontainer,
  #allcontainer {
    margin: 20px 0;
  }

  #topstats {
    gap: 14px;
    margin: 18px 0;
  }
}

/* The sky behind the page: the tile /stars/:seed.svg draws (lib/starfield.rb), named by the --stars variable the
   page sets on its html element, laid behind the body and faded in once with the first load. */
html { height: 100%; }
body { position: relative; min-height: 100%; }
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--stars, none);
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: stars-in .15s ease; }
}
@keyframes stars-in { from { opacity: 0; } to { opacity: 1; } }
