/*
 * Shared styles for the static content pages (docs/25): /how-to-play.html,
 * /about.html, /privacy.html, /terms.html.
 *
 * These pages exist for search crawlers and the AdSense policy reviewer, so
 * they must render with JavaScript off and must not depend on the app bundle.
 * That is why this is a plain stylesheet in public/ rather than anything the
 * Vite build touches.
 *
 * Colors are the Primary palette's light/dark seeds (paletteCatalog.ts, the
 * "default" entry) so the pages read as the same product as the board.
 */

:root {
  color-scheme: light dark;
  --bg: #fdf6dd;
  --card: #fbf1cd;
  --ink: #2a2205;
  --muted: #7d6c2e;
  --line: #e8d492;
  --link: #1b62c9;
  --anchor-a: #4397f0;
  --anchor-b: #e04855;
  --accent: #eec444;
  --bubble-ink: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #221c04;
    --card: #2a2306;
    --ink: #ece7d6;
    --muted: #b3ad98;
    --line: #5a4a10;
    --link: #7fb2ff;
    --anchor-a: #4d9bff;
    --anchor-b: #ff5a52;
    --accent: #ffd93d;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

a {
  color: var(--link);
}

h1 {
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0 0 4px;
}

h2 {
  font-size: 1.25rem;
  margin: 2.2em 0 0.4em;
}

h3 {
  font-size: 1.02rem;
  margin: 1.6em 0 0.3em;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0;
}

.home {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 600;
  text-decoration: none;
  color: var(--link);
}

.lede {
  font-size: 1.08rem;
  margin: 0.8em 0 0;
}

ul,
ol {
  padding-left: 1.25em;
}

li {
  margin: 0.35em 0;
}

code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0 4px;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  code {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* The play call-to-action, used once per page near the top. */
.cta {
  display: inline-block;
  margin: 1.4em 0 0.2em;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--anchor-a);
  color: var(--bubble-ink);
  font-weight: 700;
  text-decoration: none;
}

/* A worked example chain: one bubble per word, anchors colored. */
.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 1em 0;
  padding: 0;
  list-style: none;
}

.chain li {
  margin: 0;
}

.bubble {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.94rem;
  white-space: nowrap;
}

.bubble.a {
  background: var(--anchor-a);
  border-color: var(--anchor-a);
  color: var(--bubble-ink);
}

.bubble.b {
  background: var(--anchor-b);
  border-color: var(--anchor-b);
  color: var(--bubble-ink);
}

.link-arrow {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Numbered rules, mirroring the in-game How to play card. */
.steps {
  list-style: none;
  padding: 0;
  margin: 1.2em 0;
}

.steps li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin: 0 0 16px;
}

.step-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #2a2205;
  font-weight: 700;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* A callout box for the one-line summary of a rule. */
.note {
  margin: 1.2em 0;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.note p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  font-weight: 700;
}

/* Site-wide footer nav — every page links to every other page so the site is
 * a connected graph for crawlers rather than a set of islands. */
footer {
  margin-top: 3em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 0.7em;
}
