/* The pages of Terms, Privacy and Refunds (`public/terms.html` and the others, and their Arabic in
   `public/ar/`): plain pages that need no app, in the colours of the app's tokens. */

:root {
  color-scheme: light;
  --ground: #f4f6f5;
  --ink: #14201f;
  --muted: #55625f;
  --accent: #084f4a;
  --card: #fff;
  --line: #dfe5e3;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 'IBM Plex Sans', system-ui, sans-serif;
}

:lang(ar) body,
body:lang(ar) {
  font-family: 'IBM Plex Sans Arabic', 'Noto Naskh Arabic', 'Geeza Pro', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.85;
}

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

.legal__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 0;
}

.legal__mark {
  display: inline-flex;
  border-radius: 12px;
}

.legal__mark img {
  display: block;
  height: 36px;
  width: auto;
}

.legal__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.legal__pages a[aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.25;
}

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

section {
  margin: 0 0 14px;
  padding: 6px 22px 14px;
  border-radius: 22px;
  background: var(--card);
}

h2 {
  margin: 14px 0 4px;
  font-size: 19px;
  line-height: 1.35;
}

h3 {
  margin: 16px 0 2px;
  font-size: 16.5px;
}

p,
ul {
  margin: 8px 0;
}

ul {
  padding-inline-start: 22px;
}

.legal__foot {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14.5px;
}

@media (max-width: 480px) {
  h1 {
    font-size: 26px;
  }

  section {
    padding: 4px 16px 12px;
    border-radius: 18px;
  }
}

/* The services of "Where your data lives": a table on a wide screen, a card for each service on a narrow one. */
.legal__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 8px;
  font-size: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.legal__table th,
.legal__table td {
  padding: 10px 12px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal__table thead th {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.legal__table tbody tr:last-child th,
.legal__table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 640px) {
  .legal__table thead {
    display: none;
  }

  .legal__table,
  .legal__table tbody,
  .legal__table tr,
  .legal__table th,
  .legal__table td {
    display: block;
  }

  .legal__table tbody tr {
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
  }

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

  .legal__table th,
  .legal__table td {
    border-bottom: 0;
    padding: 4px 12px;
  }

  .legal__table td::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
  }
}
