/* Yllo legal pages — shared stylesheet.
 *
 * Palette taken from constants/colors.js so these pages read as part of the
 * app rather than a generic document: olive #445D48 is the brand, sand
 * #D6CC99 and rosy cream #FDE5D4 are its two supports, ink #001524 is the
 * body colour in light mode and the page in dark mode.
 *
 * Deliberately NO web font. Rubik would match the app, but pulling it from a
 * font CDN would hand this visitor's IP address to a third party — on the one
 * page whose whole subject is that we don't do that. The system stack costs a
 * little brand fidelity and keeps the page honest.
 */

:root {
  --olive: #445d48;
  --olive-deep: #33472f;
  --sand: #d6cc99;
  --cream: #fde5d4;
  --ink: #001524;
  --muted: #666876;
  --hairline: #0015241f;
  --page: #ffffff;
  --surface: #fbfbfd;
  --accent-text: var(--olive);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #001524;
    --surface: #05202f;
    --ink: #f4f6f5;
    --muted: #9aa6ac;
    --hairline: #ffffff1f;
    --accent-text: var(--sand);
  }
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 32px) 96px;
  color: var(--ink);
  background: var(--page);
  line-height: 1.75;
  font-size: clamp(16px, 0.6vw + 15px, 17.5px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Language switcher ───────────────────────────────────────────── */
nav.langs {
  display: flex;
  gap: 8px;
  margin-bottom: 44px;
  font-size: 0.85rem;
}
nav.langs a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
nav.langs a:hover { border-color: var(--olive); color: var(--accent-text); }
nav.langs a[aria-current="true"] {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff;
  font-weight: 600;
}

/* ── Masthead ────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 10px;
  font-weight: 800;
}
.dateline {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}

/* ── Headings ────────────────────────────────────────────────────── */
h2 {
  font-size: 1.3rem;
  letter-spacing: -0.012em;
  color: var(--accent-text);
  margin: 56px 0 14px;
  font-weight: 700;
  line-height: 1.3;
}
h3 {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 32px 0 10px;
  font-weight: 650;
}

p { margin: 0 0 16px; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 650; }

/* ── Callout: the one-paragraph summary ──────────────────────────── */
.callout {
  background: var(--cream);
  color: #3a2a20;
  border-left: 4px solid var(--olive);
  padding: 20px 24px;
  margin: 32px 0 8px;
  border-radius: 12px;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--olive-deep); }
@media (prefers-color-scheme: dark) {
  .callout { background: #16283a; color: var(--ink); border-left-color: var(--sand); }
  .callout strong { color: var(--sand); }
}

/* ── Lists ───────────────────────────────────────────────────────── */
ul { padding-left: 0; list-style: none; margin: 0 0 16px; }
ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
}
ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sand);
}
ul ul { margin: 10px 0 0; }
ul ul li::before { background: transparent; border: 1px solid var(--sand); }

/* ── Tables ──────────────────────────────────────────────────────── */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0 28px;
  font-size: 0.93em;
}
th, td {
  border-bottom: 1px solid var(--hairline);
  padding: 12px 14px;
  vertical-align: top;
  text-align: left;
}
th {
  background: var(--surface);
  font-weight: 650;
  color: var(--accent-text);
}

code {
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.88em;
  word-break: break-all;
}

/* ── Translation disclaimer ──────────────────────────────────────── */
.note {
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 44px 0 0;
}

footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 0.82rem;
  color: var(--muted);
}
