/* The public rankings list. Page layout and colours come from the site's /style.css.
   index.html beside this file is written by Game Ranker's publish.php. */

body.about header {
  align-items: center;
  text-align: center;
}

body.about header > p {
  line-height: 1.5;
}

body.about header nav {
  align-self: stretch;
}

body.about header > p.subtitle {
  color: #BCBCFF;
  letter-spacing: normal;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rankings {
  /* As wide as its contents and centred; the rows share one set of columns */
  display: grid;
  grid-template-columns: max-content 96px minmax(0, 440px) max-content minmax(0, 340px);
  column-gap: 1rem;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: fit-content;
  max-width: 100%;
}

.rankings li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #5858C8;
  color: #BCBCFF;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: normal;
}

.rankings .rank {
  color: #fff;
  font-size: 1.15rem;
  text-align: right;
}

.rankings .thumb {
  display: block;
  width: 96px;
  height: 72px;
  object-fit: cover;
  background: #3535C6;
}

.rankings .name {
  color: #fff;
  overflow-wrap: anywhere;
}

.rankings .year,
.rankings .platform {
  color: #9898D8;
}

@media (max-width: 760px) {
  /* The site's 72px border leaves no room on a phone (same 24px as its home page) */
  body.about {
    padding: 3.5rem 2.25rem 3rem;
  }

  .page-border {
    box-shadow: inset 0 0 0 24px #7878F8;
  }

  .rankings {
    display: block;
    width: 100%;
  }

  .rankings li {
    grid-template-columns: 3rem 64px minmax(0, 1fr);
    gap: 0.15rem 0.75rem;
  }

  .rankings .rank {
    grid-row: 1 / span 3;
    font-size: 1rem;
  }

  .rankings .thumb {
    grid-row: 1 / span 3;
    width: 64px;
    height: 48px;
  }

  .rankings .name,
  .rankings .year,
  .rankings .platform {
    grid-column: 3;
  }
}
