/* Shared styling for the legal pages.
   Deliberately self-contained: these pages must render correctly even if the
   game's stylesheet changes, and a court or a store reviewer should be able to
   read them on any device. Same tokens as the game so they do not feel bolted
   on, but none of its layout machinery. */

:root {
  --page: #151b27;
  --surface: #1b2333;
  --ink: #f2f5f9;
  --muted: #a7b2c4;
  --line: #2b3648;
  --accent: #629d5c;
  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --page: #f4f7fb;
    --surface: #ffffff;
    --ink: #101724;
    --muted: #4d5a6e;
    --line: #dde4ee;
    --accent: #4b7f46;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 72px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 720px; margin: 0 auto; }

header.top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
header.top a.back {
  margin-left: auto;
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
}
header.top a.back:hover { color: var(--ink); border-color: var(--muted); }

.mark { display: flex; gap: 3px; }
.mark b {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 7px;
  font-family: var(--display);
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
}
.mark b.on { background: var(--accent); color: #fff; }
.brandname { font-family: var(--display); font-weight: 700; font-size: 18px; }

h1 { font-family: var(--display); font-size: 30px; line-height: 1.2; margin: 0 0 6px; }
h2 {
  font-family: var(--display);
  font-size: 19px;
  margin: 34px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { font-family: var(--display); font-size: 16px; margin: 20px 0 4px; }

.dates { color: var(--muted); font-size: 14.5px; margin: 0 0 26px; }

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 28px;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }

ul, ol { padding-left: 22px; }
li { margin: 6px 0; }

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

table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--display); font-size: 14px; color: var(--muted); font-weight: 600; }
code { font-size: 14px; background: var(--surface); padding: 1px 5px; border-radius: 5px; }

footer.foot {
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
footer.foot a { color: var(--muted); }

/* Tables are the first thing to break on a phone. */
@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 25px; }
  table, thead, tbody, tr, td, th { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  td { border: 0; padding: 2px 0; }
  td::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13.5px; }
}
