/* ============================================================
   MesYucai — Shared legal stylesheet
   Loaded ONLY by privacy.html and terms-of-service.html
   Warm Brown / Light Cream theme
   ============================================================ */

:root {
  --cream: #FAF6EF;
  --cream-soft: #F4ECDD;
  --cream-deep: #EEE2CC;
  --cream-border: #E3D4B6;
  --paper: #FFFDF8;
  --ink: #241D14;
  --ink-soft: #5C4A33;
  --ink-mute: #7A6649;
  --brown: #92400E;
  --brown-dark: #78350F;
  --brown-light: #B45309;
  --amber: #D97706;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

.legal-page {
  background-color: #FAF6EF;
  color: #241D14;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.legal-page a {
  color: #92400E;
  text-decoration: none;
}

.legal-page a:hover {
  color: #78350F;
  text-decoration: underline;
}

/* ============================================================
   Header — a div/header element (never a section)
   ============================================================ */

.legal-header {
  background: linear-gradient(135deg, #78350F 0%, #92400E 55%, #B45309 100%);
  padding: 64px 0 56px;
  border-bottom: 1px solid #E3D4B6;
}

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

.legal-header .legal-breadcrumb {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F4D89B;
  margin-bottom: 20px;
}

.legal-header .legal-breadcrumb a {
  color: #F4D89B;
}

.legal-header .legal-breadcrumb a:hover {
  color: #FFFDF8;
}

.legal-header h1 {
  color: #FFFDF8;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.legal-header .legal-meta {
  color: #F0E0C2;
  font-size: 0.95rem;
}

/* ============================================================
   Content layout
   ============================================================ */

.legal-content {
  padding: 56px 0 80px;
}

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

/* Scope isolation — homepage section rules must never leak here */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ============================================================
   Table of contents
   ============================================================ */

.legal-toc {
  background-color: #FFFDF8;
  border: 1px solid #E3D4B6;
  border-left: 5px solid #92400E;
  border-radius: 10px;
  padding: 26px 28px;
  margin-bottom: 44px;
}

.legal-toc h2 {
  color: #241D14;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 36px;
}

.legal-toc ol li {
  counter-increment: toc;
  margin-bottom: 10px;
  break-inside: avoid;
}

.legal-toc ol li a {
  color: #5C4A33;
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  gap: 8px;
}

.legal-toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  color: #B45309;
  font-weight: 800;
  font-size: 0.8rem;
}

.legal-toc ol li a:hover {
  color: #78350F;
}

/* ============================================================
   Section styling
   ============================================================ */

.legal-content section {
  padding: 36px 0;
  border-bottom: 1px solid #E3D4B6;
}

.legal-content section:first-of-type {
  padding-top: 0;
}

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

.legal-content h2 {
  color: #241D14;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #EEE2CC;
}

.legal-content h3 {
  color: #78350F;
  font-size: 1.12rem;
  font-weight: 700;
  margin: 22px 0 10px;
}

.legal-content p {
  color: #5C4A33;
  margin-bottom: 16px;
  font-size: 1rem;
}

.legal-content ul,
.legal-content ol {
  color: #5C4A33;
  margin: 0 0 18px 22px;
}

.legal-content li {
  margin-bottom: 9px;
}

.legal-content strong {
  color: #241D14;
}

.legal-callout {
  background-color: #F4ECDD;
  border: 1px solid #E3D4B6;
  border-left: 5px solid #B45309;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 22px 0;
}

.legal-callout p {
  margin-bottom: 0;
  color: #5C4A33;
}

.legal-details {
  background-color: #FFFDF8;
  border: 1px solid #E3D4B6;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 22px 0;
}

.legal-details p,
.legal-details li {
  font-size: 0.95rem;
}

/* ============================================================
   Footer
   ============================================================ */

.legal-footer {
  background-color: #241D14;
  color: #E7D8BE;
  padding: 40px 0;
}

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

.legal-footer .legal-footer-brand {
  color: #FFFDF8;
  font-weight: 900;
  font-size: 1.3rem;
  margin-bottom: 12px;
}

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

.legal-footer .legal-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
}

.legal-footer .legal-footer-links a {
  color: #F4D89B;
  font-size: 0.9rem;
  font-weight: 600;
}

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

/* ============================================================
   Responsive
   ============================================================ */

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

  .legal-content {
    padding: 40px 0 60px;
  }
}
