/* ============================================================
   FeiHuDi — Legal stylesheet (privacy.html + terms-of-service.html)
   Dark warm near-black theme, amber-honey accents.
   ============================================================ */

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

.legal-page * {
  box-sizing: border-box;
}

.legal-page img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   LEGAL HEADER — div element (never a section)
   ============================================================ */
.legal-header {
  background: linear-gradient(135deg, #3A2410 0%, #2A1909 100%);
  border-bottom: 1px solid #4A3520;
  padding: 54px 0 44px;
}

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

.legal-header .legal-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F0B429;
  margin-bottom: 14px;
}

.legal-header h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #F5EEDF;
  margin-bottom: 14px;
}

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

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.legal-toc {
  background-color: #241A10;
  border: 1px solid #4A3520;
  border-radius: 12px;
  padding: 26px 28px;
  margin: 34px 0;
}

.legal-toc h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F0B429;
  margin-bottom: 16px;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 28px;
}

.legal-toc li {
  counter-increment: toc;
}

.legal-toc a {
  display: block;
  font-size: 15px;
  color: #E7D9BC;
  padding: 6px 0;
}

.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: #D97706;
  font-weight: 800;
  margin-right: 10px;
  font-size: 13px;
}

.legal-toc a:hover {
  color: #F0B429;
}

/* ============================================================
   LEGAL CONTENT — scope isolation
   ============================================================ */
.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  padding: 26px 0;
  border-bottom: 1px solid #3B2B18;
}

.legal-content section:last-of-type {
  border-bottom: none;
}

.legal-content h2 {
  font-size: 26px;
  font-weight: 800;
  color: #F5EEDF;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

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

.legal-content p {
  font-size: 16px;
  color: #C9B892;
  margin-bottom: 16px;
}

.legal-content ul {
  margin: 0 0 16px 22px;
  color: #C9B892;
}

.legal-content li {
  font-size: 16px;
  margin-bottom: 8px;
}

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

.legal-content a {
  color: #D97706;
}

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

.legal-content .updated {
  font-size: 14px;
  color: #C9B892;
  padding-bottom: 8px;
}

/* ============================================================
   LEGAL FOOTER
   ============================================================ */
.legal-footer {
  background-color: #2A1909;
  border-top: 1px solid #4A3520;
  padding: 40px 0;
  margin-top: 30px;
}

.legal-footer .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.legal-footer .footer-mark {
  width: 26px;
  height: 26px;
  background-color: #D97706;
  border-radius: 3px;
  margin: 0 auto 14px;
  position: relative;
}

.legal-footer .footer-mark::before,
.legal-footer .footer-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 3px;
  background-color: #2A1909;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 2px;
}

.legal-footer .footer-mark::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.legal-footer p {
  font-size: 14px;
  color: #C9B892;
  margin-bottom: 8px;
}

.legal-footer a {
  color: #D97706;
  font-size: 14px;
}

.legal-footer a:hover {
  color: #F0B429;
}

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

  .legal-header h1 {
    font-size: 30px;
  }
}
