/* ============================================================
   AAB Prime — Legal Pages Stylesheet
   Loaded by privacy.html and terms-of-service.html
   ============================================================ */

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

/* ---------- Legal Page Layout ---------- */
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 120px 24px 60px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #2E2F33;
  background-color: #F6F2EB;
}

.legal-page .legal-header {
  text-align: center;
  padding: 40px 0 30px;
  border-bottom: 2px solid #E5DED3;
  margin-bottom: 40px;
}

.legal-page .legal-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #1C1F25;
  margin-bottom: 12px;
  line-height: 1.2;
}

.legal-page .legal-header .last-updated {
  font-size: 0.9rem;
  color: #887B94;
  font-weight: 500;
}

/* ---------- Table of Contents ---------- */
.legal-page .legal-toc {
  background-color: #FFFFFF;
  border: 1px solid #E5DED3;
  border-radius: 10px;
  padding: 32px 36px;
  margin-bottom: 40px;
  box-shadow: 0 2px 10px rgba(28, 31, 37, 0.04);
}

.legal-page .legal-toc h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1C1F25;
  margin-bottom: 16px;
}

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

.legal-page .legal-toc ol li a {
  font-size: 0.92rem;
  color: #4A6B3A;
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: none;
}

.legal-page .legal-toc ol li a:hover {
  color: #D08C5E;
  text-decoration: underline;
}

/* ---------- Content Sections ---------- */
.legal-page .legal-content {
  background-color: #FFFFFF;
  border: 1px solid #E5DED3;
  border-radius: 10px;
  padding: 44px 40px;
  box-shadow: 0 2px 10px rgba(28, 31, 37, 0.04);
}

.legal-page .legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1C1F25;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #EDE7DF;
}

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

.legal-page .legal-content p {
  font-size: 0.96rem;
  color: #3B3D42;
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-page .legal-content ul,
.legal-page .legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page .legal-content ul {
  list-style: disc;
}

.legal-page .legal-content ol {
  list-style: decimal;
}

.legal-page .legal-content ul li,
.legal-page .legal-content ol li {
  font-size: 0.96rem;
  color: #3B3D42;
  line-height: 1.7;
  margin-bottom: 8px;
}

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

/* ---------- Back to Top Link ---------- */
.legal-page .back-to-top {
  text-align: center;
  margin-top: 36px;
}

.legal-page .back-to-top a {
  display: inline-block;
  padding: 10px 24px;
  background-color: #EDE7DF;
  color: #4A6B3A;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legal-page .back-to-top a:hover {
  background-color: #4A6B3A;
  color: #FFFFFF;
}

/* ---------- Legal Footer ---------- */
.legal-page .legal-footer {
  text-align: center;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #E5DED3;
  font-size: 0.88rem;
  color: #6A6D73;
}

.legal-page .legal-footer a {
  color: #4A6B3A;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-page .legal-footer a:hover {
  color: #D08C5E;
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .legal-page {
    padding: 100px 16px 40px;
  }
  .legal-page .legal-header h1 {
    font-size: 1.7rem;
  }
  .legal-page .legal-content {
    padding: 28px 20px;
  }
  .legal-page .legal-toc {
    padding: 24px 20px;
  }
}
