/* Opinable web pages (CMM-50): privacy policy, terms and a placeholder home page.
   System fonts only: loading web fonts from a third party would send each reader's IP address to it, which is
   exactly what a privacy policy shouldn't do. Colours are the app's semantic tokens (apps/mobile/src/theme/palette.js). */

:root {
  --background: #f6f3ee;
  --surface: #ffffff;
  --sunken: #efebe4;
  --border: #e4ded4;
  --text-primary: #17191f;
  --text-secondary: #4f4a43;
  --text-tertiary: #6e685f;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #12110f;
    --surface: #1a1816;
    --sunken: #211f1c;
    --border: #2f2c27;
    --text-primary: #f6f3ee;
    --text-secondary: #cfc7ba;
    --text-tertiary: #a39c90;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

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

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

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand svg {
  width: 26px;
  height: 26px;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.languages a,
.languages span {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
}

.languages span {
  background: var(--sunken);
  color: var(--text-primary);
  font-weight: 600;
}

.languages a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin: 40px 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

h3 {
  margin: 24px 0 8px;
  font-size: 17px;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

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

li {
  margin-bottom: 6px;
}

a {
  color: var(--text-primary);
  font-weight: 600;
}

.updated {
  color: var(--text-tertiary);
  font-size: 14px;
}

.lead {
  color: var(--text-secondary);
  font-size: 18px;
}

.summary {
  margin: 24px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--sunken);
}

.summary p:last-child,
.summary ul:last-child {
  margin-bottom: 0;
}

nav.toc {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

nav.toc ol {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

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

tr:last-child td {
  border-bottom: 0;
}

th {
  font-size: 14px;
  color: var(--text-tertiary);
}

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 14px;
}

footer a {
  margin-right: 16px;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

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

  tr:last-child {
    border-bottom: 0;
  }

  td {
    padding: 4px 14px;
    border-bottom: 0;
  }

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