/*
  Layout for the content pages (/rules, /faq, /stats, /archive, /privacy).
  Loaded after global.css, which supplies the font, colours and background.
*/

body {
  font-size: 26px;
  min-height: 100vh;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;

  border-bottom: 2px solid gray;
  padding-bottom: 6px;
  margin-bottom: 20px;
}

.page-header .title {
  font-size: 48px;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;

  font-size: 24px;
}

.site-nav a {
  color: #2c3539;
}

.site-nav a[aria-current="page"] {
  color: black;
  text-decoration: none;
  border-bottom: 2px solid rgb(0, 255, 136);
}

.card {
  background-color: #98c4e8;
  border: 2px solid #2c3539;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.card h2 {
  font-size: 34px;
  font-weight: normal;
  margin-bottom: 8px;
}

.card h3 {
  font-size: 28px;
  margin-top: 12px;
}

.card p,
.card li {
  line-height: 1.25;
  margin-bottom: 10px;
}

.card ul,
.card ol {
  margin-left: 1.2rem;
}

.card p:last-child,
.card li:last-child {
  margin-bottom: 0;
}

code {
  font-family: "VT323", monospace;
  font-size: inherit;
  background-color: rgba(255, 255, 255, 0.55);
  padding: 0 4px;
}

.lede {
  font-size: 30px;
  font-weight: normal;
}

.updated,
.muted {
  font-size: 22px;
}

a {
  color: #2c3539;
}

/* Hint rows on /rules reuse the game's guess-row classes from game.css */
.example-row {
  height: 44px;
  margin: 6px 0 10px;
  width: 300px;
}

/* Archive list */
.archive-list {
  list-style: none;
  margin: 0;
}

.archive-list li {
  display: grid;
  grid-template-columns: 5.5ch 1fr;
  column-gap: 12px;
  align-items: baseline;

  padding: 8px 0;
  border-bottom: 1px solid rgba(44, 53, 57, 0.35);
}

.archive-list li:last-child {
  border-bottom: none;
}

.archive-number {
  color: #2c3539;
  font-size: 24px;
}

.archive-date {
  display: block;
  font-size: 22px;
  color: #2c3539;
}

.archive-detail {
  display: block;
  font-size: 22px;
  color: #2c3539;
}

.archive-today {
  color: black;
  font-weight: bold;
}

@media screen and (max-width: 480px) {
  body {
    font-size: 24px;
  }
  .page-header .title {
    font-size: 36px;
  }
  .site-nav {
    font-size: 22px;
    gap: 0 10px;
  }
  .card h2 {
    font-size: 28px;
  }
  .card h3 {
    font-size: 25px;
  }
  .lede {
    font-size: 26px;
  }
  .example-row {
    width: 100%;
  }
}

/* Daily archive pages (archive/<n>.html) */
.puzzle-meta {
  font-size: 24px;
  color: #2c3539;
  margin-bottom: 8px;
}

.answer-card .answer {
  font-size: 34px;
}

.route-figure {
  margin: 0 0 12px;
}

.route-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #2c3539;
  background: #111;
}

.route-figure figcaption {
  margin-top: 6px;
  line-height: 1.2;
}

.route-facts div {
  display: grid;
  grid-template-columns: 11ch 1fr;
  column-gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(44, 53, 57, 0.35);
}

.route-facts div:last-child {
  border-bottom: none;
}

.route-facts dt {
  color: #2c3539;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0 8px;
  text-align: center;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 52px;
  line-height: 1;
}

.stat-label {
  font-size: 22px;
  color: #2c3539;
  line-height: 1.1;
}

.dist {
  margin: 8px 0;
}

.dist-row {
  display: flex;
  align-items: center;
  height: 26px;
  margin-bottom: 10px;
}

.dist-label {
  width: 2ch;
  margin-right: 6px;
}

.dist-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding-right: 6px;
  font-size: 24px;
  color: white;
  background-color: #2c3539;
  box-sizing: border-box;
}

.archive-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

@media screen and (max-width: 480px) {
  .answer-card .answer {
    font-size: 30px;
  }
  .stat-tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 8px;
  }
  .stat-value {
    font-size: 44px;
  }
}
