/* ============================================================
   TruvelTang — shared legal stylesheet (privacy + terms)
   Dark theme · violet / magenta accent
   ============================================================ */

:root {
  --bg: #0B0E14;
  --bg-2: #10141D;
  --surface: #161B27;
  --surface-2: #1C2231;
  --line: #262E40;
  --line-soft: #1D2330;
  --text: #E8EAED;
  --muted: #9AA3B2;
  --faint: #6B7484;
  --accent: #A855F7;
  --accent-bright: #C084FC;
  --accent-2: #EC4899;
  --accent-deep: #7C3AED;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* Scope the whole legal page to a dark surface matching the theme */
.legal-page {
  background-color: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--accent-2);
}

/* ---------- Legal header ---------- */
.legal-header {
  background: linear-gradient(160deg, #1C1140 0%, #2A1650 55%, #0B0E14 100%);
  border-bottom: 1px solid var(--line);
  padding: 70px 0 56px;
  text-align: center;
}

.legal-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 28px;
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface);
}

.legal-header .back-link:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.legal-header h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.legal-header .legal-sub {
  font-size: 15px;
  color: var(--accent-bright);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Content container ---------- */
.legal-content {
  padding: 60px 0 80px;
}

.legal-content .container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Scope isolation: never let homepage section styles paint over legal text */
.legal-page .legal-content section {
  background-color: transparent !important;
  color: var(--text) !important;
}

.legal-content section {
  margin-bottom: 52px;
}

.legal-content h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: 100px;
}

.legal-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent-bright);
  margin: 26px 0 12px;
}

.legal-content p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px 24px;
  color: var(--muted);
}

.legal-content li {
  margin-bottom: 10px;
}

.legal-content strong {
  color: var(--text);
}

/* ---------- Table of contents ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 48px;
}

.toc h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 18px;
  font-size: 20px;
  color: var(--text);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 36px;
}

.toc ol li {
  margin-bottom: 10px;
  break-inside: avoid;
}

.toc ol li a {
  color: var(--muted);
  font-size: 15px;
}

.toc ol li a::before {
  content: "—";
  color: var(--accent-2);
  margin-right: 8px;
}

.toc ol li a:hover {
  color: var(--accent-bright);
}

/* ---------- Legal footer ---------- */
.legal-footer {
  background: #07090E;
  border-top: 1px solid var(--line-soft);
  padding: 40px 24px;
  text-align: center;
}

.legal-footer .container {
  max-width: 820px;
  margin: 0 auto;
}

.legal-footer p {
  color: var(--faint);
  font-size: 14px;
  margin-bottom: 8px;
}

.legal-footer a {
  color: var(--muted);
  font-weight: 600;
}

.legal-footer a:hover {
  color: var(--accent-bright);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .toc ol {
    columns: 1;
  }

  .legal-header {
    padding: 54px 20px 44px;
  }
}
