/* ===== Legal Page Base ===== */
.legal-page {
  background-color: #0B0C15;
  color: #E2E8F0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

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

/* ===== Scope Isolation: prevent homepage styles from leaking ===== */
.legal-page .legal-content section {
  background-color: transparent !important;
}

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

/* ===== Legal Page Header (always a header/div, NEVER a section) ===== */
.legal-header {
  background: linear-gradient(135deg, #0B0C15 0%, #11131F 50%, #0B0C15 100%);
  padding: 60px 0 48px;
  border-bottom: 1px solid #1E2030;
  text-align: center;
}

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

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #F1F5F9;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.legal-header .legal-meta {
  font-size: 0.9rem;
  color: #94A3B8;
}

.legal-header .legal-meta span {
  margin: 0 8px;
}

.legal-header .legal-meta a {
  color: #14B8A6;
  text-decoration: none;
  transition: color 0.3s;
}

.legal-header .legal-meta a:hover {
  color: #FB923C;
}

/* ===== Table of Contents ===== */
.legal-toc {
  background: #11131F;
  border: 1px solid #1E2030;
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 48px;
  margin-top: 0;
}

.legal-toc h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F1F5F9;
  margin-bottom: 16px;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc-counter;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-toc ol li {
  counter-increment: toc-counter;
}

.legal-toc ol li::before {
  content: counter(toc-counter) ".";
  margin-right: 8px;
  color: #14B8A6;
  font-weight: 600;
  font-size: 0.85rem;
}

.legal-toc ol li a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.legal-toc ol li a:hover {
  color: #14B8A6;
}

/* ===== Legal Content Sections ===== */
.legal-content {
  padding: 48px 0 64px;
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #14B8A6;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1E2030;
}

.legal-section p {
  font-size: 0.95rem;
  color: #CBD5E1;
  margin-bottom: 14px;
  line-height: 1.85;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  margin: 12px 0 16px 24px;
  color: #CBD5E1;
  font-size: 0.925rem;
}

.legal-section ul li,
.legal-section ol li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.legal-section strong {
  color: #F1F5F9;
  font-weight: 600;
}

/* ===== Legal Footer ===== */
.legal-footer {
  background: #090A10;
  border-top: 1px solid #1E2030;
  padding: 28px 0;
  text-align: center;
}

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

.legal-footer p {
  font-size: 0.85rem;
  color: #64748B;
}

.legal-footer a {
  color: #14B8A6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.legal-footer a:hover {
  color: #FB923C;
}

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

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .legal-header {
    padding: 40px 0 32px;
  }

  .legal-header h1 {
    font-size: 1.75rem;
  }

  .legal-toc {
    padding: 20px 20px;
  }

  .legal-section h2 {
    font-size: 1.15rem;
  }

  .legal-section p {
    font-size: 0.9rem;
  }
}
