/* ========================================
   Ghost Acrylic — Legal Pages Stylesheet
   Shared by privacy.html and terms-of-service.html
   ======================================== */

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

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #2A2C3A;
  background-color: #FDFCFE;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== SCOPE ISOLATION — prevent homepage styles from leaking into legal pages ===== */
.legal-page .legal-content section,
.legal-page .legal-content div.section {
  background-color: transparent !important;
}

/* ===== LEGAL PAGE HEADER (div, not section) ===== */
.legal-header {
  background: linear-gradient(135deg, #0F1117 0%, #1C1E2E 100%);
  padding: 80px 32px 60px;
  text-align: center;
  border-bottom: 1px solid #232538;
}

.legal-header .header-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-header h1 {
  font-size: 38px;
  font-weight: 800;
  color: #F5F3FA;
  line-height: 1.2;
  margin-bottom: 14px;
}

.legal-header .header-subtitle {
  font-size: 15px;
  color: #8B8DA0;
  line-height: 1.6;
}

.legal-header .back-home {
  display: inline-block;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #7C5CFC;
  transition: color 0.25s ease;
}

.legal-header .back-home:hover {
  color: #E8943A;
}

/* ===== TABLE OF CONTENTS ===== */
.toc {
  background-color: #F5F3FA;
  border: 1px solid #E5E0F0;
  border-radius: 12px;
  padding: 28px 30px;
  max-width: 800px;
  margin: 0 auto 40px;
}

.toc h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1C1B22;
  margin-bottom: 16px;
}

.toc ul {
  list-style: none;
  columns: 2;
  column-gap: 32px;
}

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

.toc ul li a {
  font-size: 14px;
  color: #6B6D80;
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc ul li a:hover {
  color: #7C5CFC;
}

/* ===== LEGAL CONTENT CONTAINER ===== */
.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-content {
  padding: 40px 0 60px;
}

.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1C1B22;
  margin: 40px 0 14px;
  padding-top: 20px;
  border-top: 1px solid #E8E5F0;
}

.legal-content h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.legal-content p {
  font-size: 16px;
  color: #4A4C5A;
  line-height: 1.8;
  margin-bottom: 18px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 20px 24px;
  color: #4A4C5A;
  line-height: 1.8;
}

.legal-content ul li,
.legal-content ol li {
  margin-bottom: 8px;
  font-size: 15px;
}

.legal-content strong {
  color: #1C1B22;
}

.legal-content a {
  color: #7C5CFC;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.legal-content a:hover {
  color: #E8943A;
}

/* ===== LEGAL PAGE FOOTER ===== */
.legal-footer {
  background-color: #0F1117;
  padding: 40px 32px;
  text-align: center;
  border-top: 1px solid #232538;
}

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

.legal-footer p {
  font-size: 14px;
  color: #8B8DA0;
  margin-bottom: 8px;
}

.legal-footer .footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.legal-footer .footer-links a {
  font-size: 14px;
  color: #B0B2C2;
  text-decoration: none;
  transition: color 0.25s ease;
}

.legal-footer .footer-links a:hover {
  color: #7C5CFC;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .legal-header h1 {
    font-size: 28px;
  }

  .toc ul {
    columns: 1;
  }

  .legal-content .container {
    padding: 0 20px;
  }

  .legal-content {
    padding: 30px 0 40px;
  }
}
