/*
 * The privacy policy and the terms, styled once.
 *
 * These two pages open inside the app's WebView (screens/webPage), under
 * TazaLo's own header, and also stand alone in a browser for the Play and App
 * Store listings. So they have to read well in both and carry no chrome of
 * their own — no site header, no navigation, no footer links. The app supplies
 * the frame; a second one would be drawn inside the first.
 *
 * Everything is sized in rem and nothing is given a fixed height. A customer
 * who has set a large system font did so because they need it, and these are
 * the two pages on which somebody is most likely to be reading carefully.
 */

:root {
  --brand: #0b7a3e;
  --brand-dark: #085f31;
  --ink: #141614;
  --ink-soft: #4c544f;
  --rule: #e8ebe9;
  --paper: #ffffff;
  --panel: #f4f6f5;
}

/*
 * Dark mode follows the phone. A white page thrown up inside a dark app at
 * night is the one thing people actually complain about here.
 */
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #6fc291;
    --brand-dark: #a8dbbb;
    --ink: #f4f6f5;
    --ink-soft: #b4bcb7;
    --rule: #383e3a;
    --paper: #141614;
    --panel: #252927;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1.5rem 1rem 4rem;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  /* Long enough to read, short enough not to lose the line on a tablet. */
  max-width: 44rem;
  margin-inline: auto;
  -webkit-text-size-adjust: 100%;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--brand);
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--brand);
  margin: 2.25rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.35rem;
  color: var(--ink);
}

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

p,
li {
  margin: 0.65rem 0;
}

ul {
  padding-left: 1.25rem;
}

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

strong {
  color: var(--ink);
}

/* Used where a sentence is the whole point of its section. */
.callout {
  background: var(--panel);
  border-left: 3px solid var(--brand);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
}

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

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

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

/* A phone in portrait cannot hold three columns of prose. */
@media (max-width: 30rem) {
  table,
  tbody,
  tr,
  td,
  th {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 0;
  }

  td {
    border: 0;
    padding: 0.15rem 0;
  }

  td::before {
    content: attr(data-label) ': ';
    color: var(--ink-soft);
    font-weight: 600;
  }
}
