/*
 * Styling for the legal pages.
 *
 * No fonts, no scripts, no images, no external origin. The Content-Security-Policy on these
 * routes forbids all of it, and the reason is concrete: an app store reviewer, a regulator or a
 * user on a locked-down network has to be able to read a privacy policy. A page that needs a CDN
 * is a page that is sometimes blank, and a blank privacy policy is a failed submission.
 *
 * System font stack for the same reason a web font is not used: it always renders.
 */

:root {
  --ink: #17150f;
  --ink-soft: #4a453a;
  --paper: #fbf9f4;
  --panel: #f2eee4;
  --rule: #ded7c7;
  --accent: #6b5a2e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece7db;
    --ink-soft: #a9a294;
    --paper: #14130f;
    --panel: #1e1c16;
    --rule: #34312a;
    --accent: #cbb27a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2.5rem 1.25rem 5rem;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

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

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

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.02rem;
  margin: 1.75rem 0 0.4rem;
}

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

ul {
  padding-left: 1.15rem;
}

li {
  margin-bottom: 0.4rem;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 2rem;
}

.summary {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}

.summary h2 {
  border: 0;
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 1.05rem;
}

.summary ul {
  margin-bottom: 0;
}

/* Used for the paragraphs that state a limit rather than a promise. They are the most important
 * sentences on the page and they are the ones a reader skims past, so they get a marker. */
.plain {
  border-left: 3px solid var(--accent);
  padding-left: 0.9rem;
  margin-left: 0;
  color: var(--ink);
}

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

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

th {
  color: var(--ink-soft);
  font-weight: 600;
}

/* Tables state retention periods. A table that overflows the viewport hides the number. */
.scroll {
  overflow-x: auto;
}

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

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--panel);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
