/* ========== Legal Pages Shared Styles ========== */

/* Scope isolation: prevent homepage section backgrounds from leaking into legal pages */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* Legal page body */
.legal-page {
  background-color: var(--cream);
  padding-top: 72px;
}

/* Legal Header */
.legal-header {
  background: linear-gradient(135deg, #1d2a3a 0%, #2d3e54 100%);
  padding: 64px 24px 48px;
  text-align: center;
}

.legal-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.legal-header p {
  color: #bcc6d1;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Legal Content */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

/* Last updated badge */
.legal-updated {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-lighter);
  background-color: var(--cream-dark);
  padding: 4px 14px;
  border-radius: 20px;
  margin-top: 8px;
}

/* Table of Contents */
.toc {
  background-color: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 48px;
}

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

.toc ol {
  list-style: decimal;
  padding-left: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}

.toc ol li {
  margin-bottom: 0;
}

.toc ol a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Legal section headings */
.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--deep);
  margin-top: 48px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

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

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--deep);
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 14px;
}

.legal-content ul,
.legal-content ol {
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 16px;
  padding-left: 24px;
}

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

/* Back to top */
.back-to-top {
  display: inline-block;
  margin-top: 40px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.back-to-top:hover {
  color: var(--accent-hover);
}

/* Legal accent box */
.legal-accent-box {
  background-color: var(--green-bg);
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.legal-accent-box p {
  color: var(--deep);
  font-weight: 500;
  margin-bottom: 0;
}

/* Strong emphasis */
.legal-content strong {
  color: var(--deep);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .legal-header {
    padding: 48px 20px 36px;
  }

  .legal-content {
    padding: 32px 16px 16px;
  }

  .toc {
    padding: 20px 16px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

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