/* ═══════════════════════════════════════════════════════════════════════
   Privacy Policy — matches the main app's visual system.
   Readable typography, theme-consistent surfaces, proper button.

   Served as an external stylesheet because the site CSP sets
   style-src 'self' (no 'unsafe-inline'), which blocks inline <style>
   blocks. All privacy-specific polish lives here; base.css and style.css
   provide the app-wide variables and resets.
   ═══════════════════════════════════════════════════════════════════════ */

html, body {
  background: var(--color-bg, #0a1628);
  color: var(--color-text, #f5f7fa);
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.privacy-page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2rem) 5rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted, #c3cfdd);
}

/* ── Header row: back button + last-updated stamp ──────── */
.privacy-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: var(--color-surface, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  color: var(--color-text, #f5f7fa);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.back-btn:hover {
  background: rgba(64, 192, 255, 0.12);
  border-color: rgba(64, 192, 255, 0.5);
  text-decoration: none;
}
.back-btn:active { transform: translateY(1px); }
.back-btn:focus-visible {
  outline: 2px solid rgba(64, 192, 255, 0.6);
  outline-offset: 2px;
}
.back-btn-arrow { font-size: 1rem; line-height: 1; }
.privacy-updated {
  font-size: 0.8rem;
  color: var(--color-text-faint, #7a8aa0);
}

/* ── Typography hierarchy ───────────────────────────────── */
.privacy-page h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text, #f5f7fa);
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}
.privacy-page h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text, #f5f7fa);
  margin: 3rem 0 0.85rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.privacy-page h2 .section-num {
  color: var(--color-accent, #40c0ff);
  margin-right: 0.4em;
  font-weight: 700;
}
.privacy-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text, #f5f7fa);
  margin: 2rem 0 0.5rem;
}

.privacy-page p,
.privacy-page li {
  line-height: 1.75;
  color: var(--color-text-muted, #c3cfdd);
}
.privacy-page p { margin: 0 0 0.85rem; }
.privacy-page strong {
  color: var(--color-text, #f5f7fa);
  font-weight: 600;
}

.privacy-page ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
}
.privacy-page ul li { margin-bottom: 0.5rem; }

.privacy-page a {
  color: var(--color-accent, #40c0ff);
  text-decoration: none;
  transition: color 0.15s;
}
.privacy-page a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-divider {
  border: none;
  border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  margin: 2.5rem 0;
}

/* ── Emphasised data blocks ────────────────────────────── */
.data-block {
  background: var(--color-surface, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  border-left: 3px solid var(--color-accent, #40c0ff);
  border-radius: 8px;
  padding: 1.1rem 1.35rem;
  margin: 1.25rem 0;
}
.data-block-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text, #f5f7fa);
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.data-block p { margin-bottom: 0.4rem; }
.data-block p:last-child { margin-bottom: 0; }

/* ── Sub-processor cards ───────────────────────────────── */
.sub-processor {
  background: var(--color-surface, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 1.1rem 1.35rem;
  margin: 1.25rem 0;
}
.sub-processor-name {
  font-weight: 700;
  color: var(--color-text, #f5f7fa);
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
}
.sub-processor p { margin-bottom: 0.35rem; font-size: 0.9rem; }
.sub-processor p:last-child { margin-bottom: 0; }

/* ── Retention table ───────────────────────────────────── */
.retention-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.retention-table th {
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint, #7a8aa0);
  font-size: 0.72rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
}
.retention-table td {
  padding: 0.75rem 0.85rem;
  color: var(--color-text-muted, #c3cfdd);
  vertical-align: top;
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  line-height: 1.55;
}
.retention-table td:first-child {
  font-weight: 600;
  color: var(--color-text, #f5f7fa);
  white-space: nowrap;
}
.retention-table tr:last-child td { border-bottom: none; }

/* ── ALL-CAPS legal blocks ─────────────────────────────── */
.caps-block {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--color-text-muted, #c3cfdd);
  letter-spacing: 0.01em;
}

.privacy-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  color: var(--color-text-faint, #7a8aa0);
  text-align: center;
  font-size: 0.82rem;
}

@media (max-width: 600px) {
  .privacy-page h2 { font-size: 1.2rem; margin-top: 2.25rem; }
  .retention-table { font-size: 0.82rem; }
  .retention-table th, .retention-table td { padding: 0.55rem 0.65rem; }
}
