/* Shared styles — inlined into each page at build time is unnecessary;
   Cloudflare Pages serves this file next to the HTML. */
:root {
  --bg: #ffffff;
  --fg: #1a1c1e;
  --muted: #5b6167;
  --line: #e3e6e9;
  --accent: #1f6feb;
  --card: #f6f8fa;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --fg: #e6e9ec;
    --muted: #99a1a9;
    --line: #262c33;
    --accent: #6fa8ff;
    --card: #161b21;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  padding: 0 20px 96px;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}
/* 680px rather than 720: at 17px this keeps a line near 75 characters, which
   is about as long as prose stays comfortable to read. */
.wrap { max-width: 680px; margin: 0 auto; }
header { padding: 48px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 44px 0 12px;
  letter-spacing: -0.01em;
  /* Anchored headings must not hide under the top edge when jumped to. */
  scroll-margin-top: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
h3 { font-size: 17px; margin: 24px 0 8px; scroll-margin-top: 16px; }

/* Contents. A privacy policy runs to a dozen sections, and it is read on a
   phone, opened from a link in the app — without a map the only way to find
   "how do I delete my data" is to scroll the whole thing. */
.toc {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 20px 18px;
  margin: 24px 0 8px;
}
.toc-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; }
.toc a:hover, .toc a:focus-visible { text-decoration: underline; }

/* Quiet by default — a legal page should not be dotted with arrows — but
   reachable by keyboard and there when the section is hovered. */
.top {
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
h2:hover .top, .top:focus-visible { opacity: 1; }
@media (hover: none) { .top { display: none; } }
p, li { color: var(--fg); }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
a { color: var(--accent); }
.meta { color: var(--muted); font-size: 15px; margin: 0; }

/* Language switcher.
   `<details>` rather than a `<select>`: a native select cannot navigate on its
   own, so it would need JavaScript, and these pages have to work in any webview
   — and stay readable to the crawlers that store review runs. This is a real
   disclosure widget, keyboard-operable for free.
   The current language stays listed rather than being hidden: a menu that drops
   the option you are on gives no clue what you would be switching from. */
.langpick { margin: 16px 0 0; position: relative; display: inline-block; font-size: 15px; }
.langpick > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* 44pt is the smallest comfortable tap target; this lands just above it. */
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--fg);
  user-select: none;
}
.langpick > summary::-webkit-details-marker { display: none; }
.langpick > summary::after { content: "▾"; color: var(--muted); font-size: 12px; }
.langpick[open] > summary::after { content: "▴"; }
.langpick > summary:hover { border-color: var(--muted); }
.langpick > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.langpick ul {
  position: absolute;
  z-index: 20;
  left: 0;
  margin: 6px 0 0;
  padding: 6px;
  min-width: 100%;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
}
.langpick li { margin: 0; }
.langpick li > a, .langpick li > .current {
  display: block;
  padding: 8px 14px;
  border-radius: 7px;
  white-space: nowrap;
  text-decoration: none;
}
.langpick li > a:hover, .langpick li > a:focus-visible { background: var(--card); }
.langpick li > .current { color: var(--muted); font-weight: 600; }

.alt { font-size: 15px; margin: 12px 0 0; }
.summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0 8px;
}
.summary p:first-child { margin-top: 0; }
.summary p:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.scroll { overflow-x: auto; }
footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
code { background: var(--card); padding: 1px 5px; border-radius: 5px; font-size: 0.9em; }
/* A map link and an email must not force the page to scroll sideways on a
   narrow screen. */
code, a { overflow-wrap: anywhere; }

/* Phones are where these pages are actually read — the app opens them in the
   system browser. */
@media (max-width: 480px) {
  body { padding: 0 16px 72px; font-size: 16px; }
  header { padding-top: 32px; }
  h1 { font-size: 26px; }
  h2 { font-size: 19px; margin-top: 36px; }
  .toc { padding: 12px 16px 14px; }
}

/* Printing a policy is a normal thing to do when filing a complaint. */
@media print {
  body { padding: 0; color: #000; background: #fff; font-size: 11pt; }
  .toc, .top, .langpick { display: none; }
  a { color: #000; text-decoration: underline; }
  h2 { page-break-after: avoid; }
  table, ul, ol { page-break-inside: avoid; }
}
