/* Shared styles for the legal pages (privacy, terms, delete-account).
   Colours match take/style.css. System fonts only on purpose: a privacy policy that
   loads Google Fonts would hand every reader's IP address to a third party. */

:root {
  --primary: #5B4FE8;
  --primary-dark: #4338CA;
  --primary-soft: #EEF0FE;
  --ink: #1C1B2E;
  --text: #33324A;
  --muted: #6B6880;
  --line: #E6E7EF;
  --bg: #F4F5F9;
  --surface: #FFFFFF;
  --warn-bg: #FFF8E6;
  --warn-line: #F2D48A;
  --warn-ink: #7A5200;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-tile {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(91, 79, 232, 0.28);
}
.brand-icon { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.header-links { display: flex; gap: 18px; font-size: 14px; }
.header-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.header-links a:hover, .header-links a[aria-current="page"] { color: var(--ink); }
.header-links a[aria-current="page"] { font-weight: 600; }
@media (max-width: 460px) { .header-links { gap: 12px; font-size: 13px; } }

/* ── Page layout ────────────────────────────────────────────────────── */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}
.doc-head { max-width: 760px; margin-bottom: 28px; }
.doc-head .eyebrow {
  margin: 0 0 6px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--primary);
}
.doc-head h1 {
  margin: 0 0 12px;
  font-size: 34px; line-height: 1.2; letter-spacing: -0.6px;
  color: var(--ink);
}
.doc-head .meta { margin: 0; font-size: 14px; color: var(--muted); }

.layout { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 960px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
}

/* ── Table of contents ──────────────────────────────────────────────── */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
}
.toc summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 18px; color: var(--muted); line-height: 1; }
.toc[open] summary::after { content: "–"; }
.toc ol { margin: 0; padding: 0 18px 16px 36px; }
.toc li { margin: 6px 0; color: var(--muted); }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--primary); text-decoration: underline; }
@media (min-width: 960px) {
  .toc { position: sticky; top: 84px; background: transparent; border: 0; }
  .toc summary { padding: 0 0 10px; pointer-events: none; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
  .toc summary::after, .toc[open] summary::after { content: none; }
  .toc ol { padding: 0 0 0 18px; }
}

/* ── Document body ──────────────────────────────────────────────────── */
.doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px 40px;
  min-width: 0;
}
@media (max-width: 600px) { .doc { padding: 24px 20px; border-radius: 14px; } }

.doc section { scroll-margin-top: 80px; }
.doc section + section { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.doc h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; letter-spacing: -0.3px; color: var(--ink); }
.doc h2 .num { color: var(--muted); font-weight: 600; margin-right: 6px; }
.doc h3 { margin: 24px 0 8px; font-size: 17px; color: var(--ink); }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--muted); }
.doc strong { color: var(--ink); }
.doc :last-child { margin-bottom: 0; }

.summary {
  background: var(--primary-soft);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 32px;
}
.summary h2 { font-size: 17px; margin-bottom: 10px; }
.summary ul { margin: 0; padding-left: 20px; }

.callout {
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 14px;
  font-size: 15px;
}

/* Tables become stacked cards on narrow screens rather than scrolling sideways. */
.data-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.data-table thead th { font-size: 13px; font-weight: 600; color: var(--muted); background: #F8F8FC; border-bottom: 1px solid var(--line); }
.data-table tbody th { color: var(--ink); font-weight: 600; width: 30%; }
@media (max-width: 700px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 4px 0; margin-bottom: 12px; }
  .data-table th, .data-table td { border-bottom: 0; padding: 8px 14px; }
  .data-table tbody th { width: 100%; }
  .data-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
    color: var(--muted);
    margin-bottom: 2px;
  }
}

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 42px; margin: 12px 0; min-height: 28px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.contact-card {
  display: flex; flex-wrap: wrap; gap: 6px 24px;
  background: #F8F8FC; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; margin: 4px 0 14px;
}
.contact-card div { min-width: 200px; }
.contact-card .label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .inner {
  max-width: 1080px; margin: 0 auto; padding: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px;
  font-size: 13px; color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

@media print {
  .site-header, .toc, .site-footer { display: none; }
  body { background: #fff; }
  .doc { border: 0; padding: 0; }
  .layout { display: block; }
}
