/* Fralkeep's own pages on the Feywild ground: the footer every page carries, and the Terms and Privacy pages, a
   readable column of text beneath a small wordmark. */
footer.legal {
  position: fixed;
  inset: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  font-size: 14px;
}

footer.legal a {
  color: var(--ink-muted);
  text-decoration: none;
}

footer.legal a:hover,
footer.legal a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.masthead {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px var(--gutter) 0;
}

.masthead .wordmark {
  display: inline-block;
  font-size: 32px;
  text-decoration: none;
}

main.document {
  display: block;
  max-width: 720px;
  min-height: 0;
  margin: 0 auto;
  padding: 24px var(--gutter) 96px;
  text-align: left;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

/* The document pages scroll, so their footer sits after the text rather than over it. */
main.document ~ footer.legal {
  position: static;
  padding-top: 0;
}

main.document h1 {
  margin: 16px 0 4px;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

main.document h2 {
  margin: 40px 0 8px;
  font-size: 22px;
  line-height: 1.3;
  scroll-margin-top: 16px;
}

main.document h3 {
  margin: 28px 0 6px;
  font-size: 18px;
}

main.document p,
main.document ul {
  margin: 0 0 14px;
}

main.document ul {
  padding-left: 22px;
}

main.document li + li {
  margin-top: 6px;
}

main.document a {
  color: var(--very-rare);
}

main.document strong {
  color: var(--ink);
}

main.document .updated {
  color: var(--ink-muted);
}

main.document .draft {
  margin: 20px 0;
  padding: 12px 16px;
  border: 1px solid rgb(255 192 0 / 0.45);
  border-radius: 10px;
  background: rgb(255 192 0 / 0.08);
  color: var(--mythic);
}

main.document .contents {
  margin: 24px 0 8px;
  padding: 14px 16px;
  border: 1px solid rgb(250 250 250 / 0.1);
  border-radius: 10px;
  background: rgb(10 10 10 / 0.55);
}

main.document .contents ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

main.document .contents li + li {
  margin-top: 0;
}

main.document .contents a {
  color: var(--ink-muted);
  text-decoration: none;
}

main.document .contents a:hover,
main.document .contents a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}
