/* Plain text pages outside the app (privacy.html, and later the terms). They don't load the
   app's CSS, so the colours and the font below repeat src/index.css. Keep them in step. */
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: light-dark(#f6f4ef, #121018);
  --surface: light-dark(#ffffff, #1c1924);
  --text: light-dark(#3d3947, #cfcad8);
  --text-h: light-dark(#15121c, #f5f3f8);
  --muted: light-dark(#625c6c, #958fa3);
  --border: light-dark(rgb(21 18 28 / 0.12), rgb(255 255 255 / 0.1));
  --border-strong: light-dark(rgb(21 18 28 / 0.22), rgb(255 255 255 / 0.22));
  --accent: light-dark(#6d28d9, #a78bfa);
  --sans: Figtree, system-ui, 'Segoe UI', Roboto, sans-serif;
}

/* The theme picked in the app's Settings (legal.js sets it from localStorage). */
:root[data-theme='light'] {
  color-scheme: light;
}
:root[data-theme='dark'] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(48px, env(safe-area-inset-bottom));
}

/* The back button on the left, the logo on the right. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Matches the app's back button (src/components/BackButton.module.css). */
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 12px 0 8px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.back svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.back:hover {
  color: var(--text-h);
  border-color: var(--border-strong);
}
.back:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-h);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.3px;
  text-decoration: none;
}
.home img {
  width: 26px;
  height: 26px;
}

h1 {
  margin: 32px 0 4px;
  color: var(--text-h);
  font: 850 40px/1.1 var(--sans);
  letter-spacing: -1.2px;
}

.updated {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 15px;
}

h2 {
  margin: 40px 0 8px;
  color: var(--text-h);
  font: 750 21px/1.3 var(--sans);
  letter-spacing: -0.3px;
}

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

ul {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

strong {
  color: var(--text-h);
  font-weight: 700;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* The short version, above the details. */
.summary {
  margin: 0 0 8px;
  padding: 18px 20px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

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