/* Styles of the static legal pages (privacy.html, terms.html). A separate file on purpose: css/style.css lays out the
   one-viewport app (fixed heights, modals, a camera stage) and would have to be undone here. The colour tokens below
   are the same values as the ones at the top of style.css; keep them in sync. */
:root {
  color-scheme: light dark;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --border: #d3d9e4;
  --fg: #141a23;
  --muted: #546070;
  --accent: #2154d4;
  --focus: #0b57d0;
  --shadow: 0 1px 2px rgba(20, 26, 35, 0.08), 0 6px 20px rgba(20, 26, 35, 0.08);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1217;
    --surface: #181e26;
    --border: #323c49;
    --fg: #e9edf3;
    --muted: #a6b0bd;
    --accent: #7ba6ff;
    --focus: #9ec0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.legal {
  max-width: 46rem; /* about 70 characters per line at 1rem */
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
}

.legal__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.legal__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.legal__logo { flex: none; width: 40px; height: 40px; }
.legal__the { font-size: 0.6em; font-weight: 700; letter-spacing: 0; margin-right: 0.1em; }
.legal__accent { color: var(--accent); }

.legal__lang { font-size: 0.95rem; color: var(--muted); }

.legal__doc {
  margin-top: 20px;
  padding: 20px 18px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 12px;
}
.legal__doc + .legal__doc { margin-top: 24px; }

.legal h1 { margin: 0 0 4px; font-size: 1.7rem; line-height: 1.2; letter-spacing: -0.01em; }
.legal h2 { margin: 1.6rem 0 0.4rem; font-size: 1.1rem; line-height: 1.3; }
.legal__date { margin: 0 0 4px; color: var(--muted); font-size: 0.9rem; }
.legal p { margin: 0 0 0.8rem; }
.legal ul, .legal ol { margin: 0 0 0.8rem; padding-left: 1.4rem; }
.legal li { margin-bottom: 0.45rem; }
.legal__list li::marker { color: var(--muted); font-weight: 600; }
.legal code { font-size: 0.9em; overflow-wrap: anywhere; }

/* Long addresses and the e-mail must wrap instead of widening the page at 320 px. */
.legal a, .legal li, .legal p { overflow-wrap: anywhere; }

.legal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

@media (min-width: 640px) {
  .legal { padding-top: 28px; padding-bottom: 40px; }
  .legal__doc { padding: 28px 32px 12px; }
  .legal h1 { font-size: 2rem; }
}
