/* ==========================================================================
   JIACHENG — Legal pages stylesheet (css/legal.css)
   Used ONLY by privacy.html and terms-of-service.html
   Dark warm-black theme, ivory text, tangerine-wood headings
   ========================================================================== */

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

body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #F5EFE7;
  background-color: #171210;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  color: #F5EFE7;
}

a {
  color: #E8C39A;
  text-decoration: none;
}

a:hover {
  color: #B85C1F;
}

/* ---------- Legal header (solid dark background) ---------- */
.legal-header {
  background-color: #171210;
  border-bottom: 1px solid #B85C1F;
}
.legal-header .legal-header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}
.legal-header .legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 0 12px;
}
.legal-header .legal-brand-glyph {
  width: 16px;
  height: 16px;
  background-color: #B85C1F;
}
.legal-header .legal-brand-word {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 4px;
  color: #F5EFE7;
}
.legal-header .legal-brand-caption {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #B85C1F;
  margin-top: 3px;
}
.legal-heading {
  padding: 40px 0 34px;
}
.legal-heading h1 {
  font-size: 42px;
  color: #F5EFE7;
}
.legal-heading .legal-updated {
  margin-top: 10px;
  color: #E8C39A;
  font-size: 14px;
  letter-spacing: 1px;
}

/* ---------- Page body ---------- */
.legal-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Scope isolation: legal content sections are plain transparent blocks */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ---------- Table of contents ---------- */
.legal-toc {
  margin: 40px 0 30px;
  border: 1px solid #B85C1F;
  padding: 26px 28px;
  background-color: #221A14;
}
.legal-toc h2 {
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #E8C39A;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  margin-bottom: 14px;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc-list;
  columns: 2;
  column-gap: 34px;
}
.legal-toc li {
  counter-increment: toc-list;
  margin-bottom: 8px;
  break-inside: avoid;
}
.legal-toc li::before {
  content: counter(toc-list, decimal-leading-zero);
  color: #B85C1F;
  font-weight: 700;
  margin-right: 8px;
  font-size: 14px;
}
.legal-toc a {
  color: #F5EFE7;
  font-size: 14px;
}
.legal-toc a:hover {
  color: #B85C1F;
}

/* ---------- Legal content ---------- */
.legal-content {
  padding-bottom: 60px;
}
.legal-content section {
  padding: 30px 0;
  border-bottom: 1px solid #2B211A;
}
.legal-content section:last-child {
  border-bottom: none;
}
.legal-content h2 {
  font-size: 24px;
  color: #B85C1F;
  margin-bottom: 14px;
  scroll-margin-top: 24px;
}
.legal-content h3 {
  font-size: 18px;
  color: #F5EFE7;
  margin: 18px 0 8px;
}
.legal-content p {
  color: #F5EFE7;
  margin-bottom: 12px;
}
.legal-content ul,
.legal-content ol {
  margin: 0 0 14px 24px;
  color: #F5EFE7;
}
.legal-content li {
  margin-bottom: 6px;
}
.legal-content strong {
  color: #E8C39A;
  font-weight: 600;
}
.legal-content .back-to-top {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #E8C39A;
}

/* ---------- Legal footer ---------- */
.legal-footer {
  border-top: 1px solid #B85C1F;
  background-color: #171210;
}
.legal-footer .legal-footer-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 30px 24px;
  text-align: center;
  font-size: 14px;
  color: #F5EFE7;
}
.legal-footer a {
  color: #E8C39A;
}
.legal-footer a:hover {
  color: #B85C1F;
}
.legal-footer .back-home {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 12px;
  color: #B85C1F;
}
.legal-footer .back-home:hover {
  color: #F5EFE7;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .legal-heading h1 {
    font-size: 32px;
  }
  .legal-toc ol {
    columns: 1;
  }
  .legal-toc {
    padding: 20px;
  }
}
