/* Shared styling for Relay's legal pages.
 *
 * These are plain static files in `web/`, which Flutter copies into `build/web`
 * on every build, so they deploy with the app. Firebase Hosting serves real
 * files before the SPA catch-all rewrite, so they coexist with the app at the
 * same origin with no routing configuration.
 *
 * Deliberately not styled by the app's theme: these pages must render for
 * someone who has never signed in, on a slow connection, with no Flutter engine
 * loaded. That is also why there is no JavaScript here at all — a privacy policy
 * that needs a bundle to download before it is readable is a privacy policy that
 * fails when a regulator or a store reviewer opens it.
 */

:root {
  color-scheme: light dark;
  --ink: #1a1c1e;
  --muted: #44474e;
  --bg: #fdfcff;
  --rule: #dfe2eb;
  --link: #2f5d8f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e3e2e6;
    --muted: #c4c6cf;
    --bg: #1a1c1e;
    --rule: #43474e;
    --link: #a3c9f9;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2.5rem 1.25rem 5rem;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main { max-width: 44rem; margin: 0 auto; }

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

h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 1.15rem;
  margin: 2.4rem 0 0.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

h3 { font-size: 1rem; margin: 1.5rem 0 0.4rem; }

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

.home { display: inline-block; margin-bottom: 2rem; font-size: 0.9rem; }

/* Used for the "this needs filling in before publishing" markers. Visible on
 * purpose — an unfinished legal page must look unfinished. */
.todo {
  background: #fff3cd;
  color: #5c4813;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.94rem;
  display: block;
  overflow-x: auto;
}

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

th { font-weight: 600; }

ul { padding-left: 1.3rem; }
li { margin: 0.3rem 0; }

code {
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: color-mix(in srgb, var(--rule) 45%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

footer {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}
