/*
 * The legal pages, styled without the app.
 *
 * These are plain static files rather than screens inside Boomlet, on purpose:
 * a privacy policy has to be readable when the game is down, when JavaScript is
 * off, and by whatever is fetching it from Discord's developer portal. So they
 * carry their own small stylesheet and depend on nothing.
 *
 * The typeface is the system's rather than the game's, because the game's is a
 * hashed bundle asset these pages have no way to name.
 */

:root {
  color-scheme: light dark;
  --ground: #fdf6f0;
  --ink: #241a2e;
  --ink-soft: #6b5f75;
  --line: #e6d8ce;
  --accent: #e8552f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #17131f;
    --ink: #f2ecf6;
    --ink-soft: #a99fb4;
    --line: #2f2740;
    --accent: #ff8360;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

main {
  /* Around 65 characters, which is where prose stops being tiring. */
  max-width: 40rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 2rem) calc(env(safe-area-inset-right, 0px) + 1.25rem)
    calc(env(safe-area-inset-bottom, 0px) + 4rem) calc(env(safe-area-inset-left, 0px) + 1.25rem);
}

h1 {
  font-size: clamp(2rem, 7vw, 2.6rem);
  line-height: 1.1;
  margin: 0.5rem 0 0.25rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  margin: 2.4rem 0 0.6rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--line);
}

h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.4rem;
  color: var(--accent);
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.35rem;
}

.lede {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.updated {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.back {
  font-size: 0.9rem;
  margin: 2rem 0 0;
}

.back:first-child {
  margin: 0 0 1.5rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 0.3rem;
  padding: 0.05em 0.3em;
}

strong {
  font-weight: 700;
}
