/*
 * Shared styles for the crawlable text pages: /how-to-play, /about, /faq (static files in
 * public/) and /archive (Worker-rendered, worker/lib/archive/render.ts). These pages carry
 * their own text in the HTML response — no React, no JavaScript — so Google sees a real site.
 * Colours are the game's theme tokens (src/index.css): olive / cream in light, teal in dark.
 */
:root {
  --olive: rgb(75 75 47);
  --teal: rgb(43 80 87);
  --cream: rgb(218 210 177);
  --page: rgb(247 243 230);
  --ink: var(--olive);
  --rule: rgb(218 210 177);
  --button-ink: rgb(255 255 255);
  --button: var(--olive);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: var(--teal);
    --ink: rgb(255 255 255);
    --rule: rgb(255 255 255 / 0.25);
    --button: var(--cream);
    --button-ink: var(--teal);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px;
}

.brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
}

.play {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}

/* Touch hover guard (CLAUDE.md): hover styles only where hover exists. */
@media (hover: hover) {
  .play:hover {
    opacity: 0.9;
  }
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 20px 40px;
}

h1,
h2,
h3 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

h1 {
  font-size: 36px;
  margin: 16px 0 12px;
}

h2 {
  font-size: 26px;
  margin: 40px 0 8px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 20px;
  margin: 28px 0 4px;
}

.lead {
  font-size: 19px;
}

ul {
  padding-left: 22px;
}

li {
  margin: 6px 0;
}

.month-list,
.day-list {
  list-style: none;
  padding: 0;
}

.month-list li,
.day-list li {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.day-list li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 8px;
}

.day-list .date {
  font-weight: 600;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

@media (max-width: 400px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 23px;
  }

  .brand {
    font-size: 21px;
  }

  .play {
    padding: 9px 13px;
    font-size: 14px;
  }
}
