/* ===== LEGAL STYLESHEET =====
   Shared styles for privacy.html and terms-of-service.html
   Includes scope-isolation to prevent homepage section styles from leaking */

.legal-page {
  background-color: #FDFCF8;
  color: #2D2A26;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== SCOPE ISOLATION RULE =====
   Prevent homepage section styles (backgrounds, colors) from leaking into legal pages.
   Scope affects ONLY .legal-content, never header or footer. */
.legal-content section {
  background-color: transparent !important;
  color: #2D2A26 !important;
}

/* ===== LEGAL HEADER (uses <header>, NOT <section>) ===== */
.legal-header {
  background: linear-gradient(135deg, #121118 0%, #1E1C28 100%);
  color: #FDFCF8;
  padding: 80px 0 48px;
  text-align: center;
}

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

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  color: #84CC16;
}

.legal-header p {
  color: #B0AEA5;
  margin-top: 12px;
  font-size: 0.95rem;
}

/* ===== LEGAL CONTENT ===== */
.legal-content {
  padding: 48px 0 60px;
}

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

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #121118;
  margin: 40px 0 16px;
  padding-top: 0;
  border-bottom: 2px solid #84CC16;
  padding-bottom: 8px;
}

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

.legal-content p {
  line-height: 1.75;
  margin: 0 0 16px;
  color: #3D3835;
}

.legal-content ul,
.legal-content ol {
  line-height: 1.75;
  margin: 0 0 16px 24px;
  padding: 0;
  color: #3D3835;
}

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

.legal-content a {
  color: #0B7D8E;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.legal-content strong {
  color: #121118;
}

/* ===== TABLE OF CONTENTS ===== */
.toc {
  background: #FFFFFF;
  border: 1px solid #E8E4DC;
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc h3 {
  font-size: 1.1rem;
  color: #121118;
  margin: 0 0 16px;
  font-weight: 700;
}

.toc ol {
  list-style: decimal;
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  color: #0B7D8E;
  text-decoration: none;
  font-weight: 500;
}

.toc a:hover {
  color: #84CC16;
  text-decoration: underline;
}

/* ===== META ===== */
.legal-meta {
  font-size: 0.9rem;
  color: #8A8580;
  margin-bottom: 32px;
  font-style: italic;
}

/* ===== LEGAL FOOTER ===== */
.legal-footer {
  background: #121118;
  color: #B0AEA5;
  text-align: center;
  padding: 32px 24px;
  font-size: 0.9rem;
}

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

.legal-footer a {
  color: #84CC16;
  text-decoration: none;
  font-weight: 500;
}

.legal-footer a:hover {
  text-decoration: underline;
}

.legal-footer p {
  margin: 4px 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .legal-header {
    padding: 64px 0 36px;
  }

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

  .legal-content h2 {
    font-size: 1.2rem;
  }

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

  .toc {
    padding: 18px 20px;
  }
}

@media (max-width: 480px) {
  .legal-header h1 {
    font-size: 1.5rem;
  }

  .toc {
    padding: 16px 18px;
  }
}
