/*
 * LEGAL.CSS — Shared stylesheet for privacy.html and terms-of-service.html
 * Scope-isolation rules protect legal pages from homepage section styling.
 */

/* SCOPE ISOLATION: Legal content sections must never inherit homepage backgrounds */
.legal-page .legal-content section {
  background-color: transparent !important;
  background: transparent !important;
  background-image: none !important;
}

/* ---- LEGAL HEADER (must be <header>/<div>, never <section>) ---- */
.legal-header {
  background: linear-gradient(135deg, #1A1A28 0%, #161622 40%, #10101E 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 80px 0 56px;
  text-align: center;
}

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

.legal-logo {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 24px;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.legal-logo:hover {
  color: var(--accent-blue-hover);
}

.legal-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.legal-date {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---- LEGAL CONTENT ---- */
.legal-content {
  padding: 56px 0 80px;
}

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

.legal-intro {
  font-size: 1.04rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 48px;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

/* ---- TABLE OF CONTENTS ---- */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 48px;
}

.toc h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 16px;
}

.toc ol {
  list-style: decimal;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc ol li {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-muted);
  padding-left: 4px;
}

.toc ol li a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.toc ol li a:hover {
  color: var(--accent-blue-hover);
  text-decoration: underline;
}

/* ---- SECTION STYLES ---- */
.legal-content section {
  margin-bottom: 44px;
  background: transparent;
}

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

.legal-content section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: -0.01em;
}

.legal-content section p {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

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

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

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

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

  .toc {
    padding: 20px 20px;
  }

  .legal-intro {
    padding: 20px 20px;
    font-size: 0.95rem;
  }

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

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

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

  .legal-content {
    padding: 32px 0 48px;
  }

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

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