/* The privacy policy and terms of service (privacy.html, terms.html): plain
   pages anyone can read without signing in, in the app's colors. The homepage
   (index.html) uses these colors too, with welcome.css on top. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-page: #f7f7f8;
  --bg-subtle: #f4f4f5;
  --border: #e4e4e7;
  --text: #1d1d1f;
  --text-2: #52525b;
  --text-3: #71717a;
  --accent-text: #1c5cab;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1b1b1f;
    --bg-page: #151518;
    --bg-subtle: #222227;
    --border: #313137;
    --text: #ededf0;
    --text-2: #b6b6bf;
    --text-3: #92929c;
    --accent-text: #86b6ef;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1b1f;
  --bg-page: #151518;
  --bg-subtle: #222227;
  --border: #313137;
  --text: #ededf0;
  --text-2: #b6b6bf;
  --text-3: #92929c;
  --accent-text: #86b6ef;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-page);
}

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

.legal-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 0;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
}

.legal-top nav {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.legal-top nav a[aria-current="page"] {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.legal {
  max-width: 760px;
  margin: 16px auto 0;
  padding: 32px 40px 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.legal h1 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.legal-date {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-3);
}

.legal h2 {
  margin: 36px 0 8px;
  font-size: 21px;
  line-height: 1.3;
}

.legal h3 {
  margin: 24px 0 4px;
  font-size: 17px;
}

.legal p,
.legal ul,
.legal ol {
  margin: 0 0 12px;
}

.legal ul,
.legal ol {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal .summary {
  margin: 0 0 8px;
  padding: 16px 20px;
  border-radius: 8px;
  background: var(--bg-subtle);
}

.legal .summary ul {
  margin: 0;
}

.legal .contents {
  columns: 2 220px;
  font-size: 15px;
}

.legal table {
  width: 100%;
  margin: 8px 0 16px;
  border-collapse: collapse;
  font-size: 15px;
}

.legal th,
.legal td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal th {
  font-weight: 600;
  color: var(--text-2);
}

.legal code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
}

.legal-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  font-size: 14px;
  color: var(--text-3);
}

@media (max-width: 640px) {
  .legal {
    margin-top: 12px;
    padding: 22px 16px 28px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .legal h1 {
    font-size: 25px;
  }

  .legal table,
  .legal thead,
  .legal tbody,
  .legal tr,
  .legal td {
    display: block;
  }

  .legal thead {
    display: none;
  }

  .legal tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }

  .legal td {
    padding: 2px 0;
    border: 0;
  }
}
