/* Zero Debate — shared styling for the standalone legal pages.
   These pages live in public/ as plain HTML rather than React routes: Play
   reviewers, app-store crawlers and users on flaky connections must be able to
   read them with no JS bundle and no router. Keep this file dependency-free. */

:root {
  --bg: #f5efe3;
  --surface: #fcf8ef;
  --surface-alt: #ede4d2;
  --text: #1b1712;
  --muted: #6e6353;
  --border: #dbcdb5;
  --primary: #cc3b1e;
  --for: #1c5ca8;
  color-scheme: light;
}

html.dark {
  --bg: #14110b;
  --surface: #201b12;
  --surface-alt: #2b2417;
  --text: #f3eada;
  --muted: #a89b85;
  --border: #39301f;
  --primary: #e0563a;
  --for: #6ea8e8;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

/* ---- Masthead ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: Spectral, Georgia, serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.brand .seal {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 5px;
  background: var(--primary);
  color: #fcf8ef;
  border: 2px solid var(--text);
  transform: rotate(-6deg);
  font-family: Spectral, Georgia, serif;
  font-size: 1.1rem;
  line-height: 1;
}

.masthead nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.masthead nav a {
  color: var(--muted);
  text-decoration: none;
}

.masthead nav a:hover,
.masthead nav a[aria-current='page'] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Typography -------------------------------------------------------- */

h1 {
  font-family: Spectral, Georgia, serif;
  font-size: clamp(2rem, 6vw, 2.85rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h2 {
  font-family: Spectral, Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 3rem 0 0.85rem;
  scroll-margin-top: 1.5rem;
}

h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.85rem 0 0.5rem;
}

p,
li {
  color: var(--text);
}

a {
  color: var(--primary);
  text-underline-offset: 2px;
}

ul,
ol {
  padding-left: 1.35rem;
}

li {
  margin: 0.45rem 0;
}

strong {
  font-weight: 650;
}

.lede {
  font-size: 1.06rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.updated {
  display: inline-block;
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  margin-bottom: 1.75rem;
}

/* ---- Table of contents ------------------------------------------------- */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  margin: 0 0 2rem;
}

.toc h2 {
  font-size: 0.74rem;
  font-family: 'Space Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 2rem;
  font-size: 0.92rem;
}

@media (max-width: 34rem) {
  .toc ol {
    columns: 1;
  }
}

/* ---- Callout ----------------------------------------------------------- */

.note {
  background: var(--surface);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}

.note p:first-child {
  margin-top: 0;
}
.note p:last-child {
  margin-bottom: 0;
}

.note.calm {
  border-left-color: var(--for);
}

/* ---- Table ------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 30rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-alt);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* ---- Footer ------------------------------------------------------------ */

.legal-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.legal-footer a {
  color: var(--muted);
}

/* ---- Print ------------------------------------------------------------- */

@media print {
  .masthead nav,
  .toc {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  a {
    color: #000;
  }
}
