/* BFG Build — shared legal stylesheet for privacy & terms pages
   Light theme · warm cream background · dark text */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

.legal-page {
  background-color: #F7F3EC;
  color: #1C1B18;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

.legal-page a { color: #0F766E; text-decoration: none; }
.legal-page a:hover { color: #0B4F4A; text-decoration: underline; }

/* ---------- Header (div, not section) ---------- */
.legal-header {
  background: linear-gradient(135deg, #14231F 0%, #0F766E 100%);
  color: #F3EEE4;
  padding: 72px 0 56px;
}

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

.legal-header .back-link {
  display: inline-block;
  color: #6EC5B6;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 26px;
}
.legal-header .back-link:hover { color: #A8DCD3; }

.legal-header h1 {
  color: #FFFFFF;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 14px;
}

.legal-header p { color: #C9D3CC; font-size: 16px; max-width: 620px; }

/* ---------- Body content ---------- */
.legal-content { padding: 56px 0 72px; }

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

/* Scope isolation: never let homepage section styles paint over legal text */
.legal-page .legal-content section { background-color: transparent !important; }

/* ---------- Table of contents ---------- */
.toc {
  background: #FFFFFF;
  border: 1px solid #E3DCCB;
  border-radius: 14px;
  padding: 28px 30px;
  margin-bottom: 44px;
}

.toc h2 { font-size: 20px; color: #1C1B18; margin-bottom: 14px; }

.toc ol { list-style: none; counter-reset: toc; display: grid; grid-template-columns: 1fr; gap: 8px; }

.toc li { counter-increment: toc; }
.toc li::before { content: counter(toc) ". "; color: #0F766E; font-weight: 700; }
.toc a { color: #33556B; font-size: 15px; }
.toc a:hover { color: #0F766E; }

/* ---------- Sections ---------- */
.legal-content section { margin-bottom: 44px; }

.legal-content h2 {
  color: #14231F;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 800;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #DCEBE8;
}

.legal-content h3 { color: #0F766E; font-size: 18px; font-weight: 700; margin: 22px 0 10px; }

.legal-content p { color: #3A3A34; margin-bottom: 16px; }

.legal-content ul { margin: 0 0 16px 22px; color: #3A3A34; }
.legal-content ul li { margin-bottom: 8px; }

/* ---------- Footer ---------- */
.legal-footer {
  background: #14231F;
  color: #9DB6AD;
  padding: 40px 0;
  text-align: center;
}

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

.legal-footer a { color: #6EC5B6; font-size: 15px; }
.legal-footer a:hover { color: #A8DCD3; }
.legal-footer .legal-footer-nav { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-bottom: 16px; }
.legal-footer p { font-size: 14px; }

@media (max-width: 600px) {
  .toc ol { grid-template-columns: 1fr; }
}
