/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* The privacy notice (privacy.html): a plain reading page in the Calm
   palette, light or dark with the system. With #en, #uk or #ru in the address
   only that language shows; without, all three follow each other. */

:root {
  color-scheme: light dark;
  --ground: #e4edf1;
  --surface: #ffffff;
  --ink: #1e2a26;
  --muted: #5c6670;
  --line: #d5dbe0;
  --accent: #3f38c9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #12181b;
    --surface: #1b2327;
    --ink: #e6ecef;
    --muted: #a3adb4;
    --line: #2d383d;
    --accent: #a9b6ff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 16px;
  background: var(--ground);
  color: var(--ink);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.top,
main {
  max-width: 680px;
  margin: 0 auto;
}

/* The mark (back to the app) and the languages */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding: 0.5rem 0 1rem;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}

.brand:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.brand img {
  width: 28px;
  height: 28px;
}

/* A phone: the mark and the languages are a bar at the bottom, under the
   thumb, the languages last, at the right edge (ui.md §4.5, §11.10) */
@media (max-width: 899px) {
  html {
    scroll-padding-bottom: 96px;
  }

  body {
    padding-bottom: 120px;
  }

  .top {
    position: fixed;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    flex-wrap: nowrap;
    max-width: none;
    padding: 8px 16px max(8px, env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 0.06);
  }

  .top nav {
    gap: 0 0.875rem;
    font-size: 0.875rem;
  }
}

/* A narrow phone: the mark alone (its name stays for screen readers) */
@media (max-width: 359px) {
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .top nav {
    gap: 0 0.625rem;
  }
}

nav a,
.project {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

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

article {
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* One language when the address names it */
main:has(article:target) article:not(:target) {
  display: none;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  line-height: 1.2;
}

h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.125rem;
}

p,
ul {
  margin: 0 0 0.75rem;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

.updated {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}
