/* The text pages of befrie.app: privacy, terms, guidelines, notices, deletion and support, in both
   languages. The colours, type and header are the landing page's (index.html keeps its own copy inline). */

:root {
  color-scheme: light dark;
  --background: #F7F2E8;
  --surface: #FFFDF6;
  --primary: #123326;
  --primary-light: #E9EDE2;
  --border: #E3DAC8;
  --text: #17251F;
  --text-secondary: #657269;
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0C1310;
    --surface: #151F1A;
    --primary: #8EDBB3;
    --primary-light: #1E2B25;
    --border: #27342D;
    --text: #F1EFE7;
    --text-secondary: #9AA89F;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a { color: inherit; }

a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-family: var(--font-rounded);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 1px 1.5px rgba(18, 51, 38, 0.2));
}

.lang {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.lang:hover { border-color: var(--text-secondary); }

/* The document */
.doc {
  margin-top: 10px;
  padding: clamp(22px, 5vw, 44px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
}

.doc h1 {
  margin: 0;
  font-family: var(--font-rounded);
  font-size: clamp(2rem, 1.5rem + 2.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.summary {
  max-width: 40em;
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 1.12rem;
  line-height: 1.5;
}

.updated {
  display: inline-block;
  margin: 20px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
}

.doc section {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  /* Clear of the header when a link lands on a section. */
  scroll-margin-top: 16px;
}

.doc h2 {
  margin: 0 0 8px;
  font-family: var(--font-rounded);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.doc p { margin: 0; }

.doc p + p,
.doc ul + p { margin-top: 12px; }

.doc ul {
  margin: 10px 0 0;
  padding-left: 1.25em;
}

.doc li { margin: 6px 0 0; }

.doc li::marker { color: var(--text-secondary); }

.doc section a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.doc strong { font-weight: 650; }

/* Footer */
footer {
  margin-top: 48px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  text-align: center;
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

footer ul a {
  color: var(--text);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

footer [aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 600;
}

footer p { margin: 16px 0 0; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .doc { border-radius: 20px; }
}

@media print {
  body { background: #fff; color: #000; }
  .doc { padding: 0; border: 0; }
  .lang, footer nav { display: none; }
}
