/*
 * Shared styling for both domains' legal pages (/privacy, /terms - studio and
 * game each carry their own now, see docs/deployment.md) and, via
 * tools/site-shell.mjs's pageShell(), the game's generated pages (/about and
 * friends). These are long-form prose with near-identical structure, so they
 * share a stylesheet rather than carrying two copies of the same rules. The
 * game's own build shares this exact file rather than duplicating it - see
 * copy-site.mjs's SHARED_FILES.
 *
 * No colour tokens or font-family of its own any more - every page that loads
 * this file loads site.css straight after it (see each page's own <head>, and
 * pageShell() for the generated ones), so a second restatement here was drift
 * waiting to happen rather than independence. site.css is the one place left
 * that restates the game's own values; see its header comment.
 */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  padding: 2rem 1rem 4rem;
  line-height: 1.6;
}

/* A measure, not a container width - these pages are read, not scanned. */
main { width: 100%; max-width: 42rem; margin: 0 auto; }

a { color: var(--accent); }
a:hover, a:focus-visible { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/*
 * The link to the same page in the other language. First in the document, so
 * it is the first thing a keyboard or screen reader reaches, and set right so
 * it reads as a page control rather than as part of the nav under it. The
 * link text is the language's own name in that language, carrying its own
 * lang attribute, so a screen reader pronounces it correctly.
 */
.lang-switch {
  margin: 0 0 0.5rem;
  text-align: right;
  font-size: 0.85rem;
}
.lang-switch a { font-weight: 600; }

/* The one call to action on the French front door (/fr): into the game. */
.play-cta { margin: 1.5rem 0 0.5rem; }
.play-button {
  display: inline-block;
  padding: 0.7rem 2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}
.play-button:active { transform: scale(0.96); }

h1 { margin: 0 0 0.35rem; font-size: 1.6rem; letter-spacing: 0.02em; }

/* The date is the part a reader checks first to know whether this is current. */
.updated { margin: 0 0 2.5rem; color: var(--muted); font-size: 0.85rem; }

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

p, li { color: var(--text); font-size: 0.95rem; }
ul { padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }

/*
 * The lede carries the whole answer for the majority who read one paragraph and
 * leave. It is deliberately the most prominent thing under the title.
 */
.lede {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
}
.lede p { margin: 0; }
.lede p + p { margin-top: 0.6rem; }

/* Wide content scrolls inside itself; the page body never scrolls sideways. */
.table-wrap { overflow-x: auto; margin: 1rem 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th, td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  color: var(--muted);
  white-space: nowrap;
}

.footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.footer a { color: var(--muted); }
.footer a:hover, .footer a:focus-visible { color: var(--text); }

/*
 * The Quebec language clause. Set apart because it is a formal notice rather
 * than part of the argument, and because the French sentence should not read as
 * a stray untranslated line in an otherwise English document.
 */
.language-clause {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}
