/* ============================================================
   YEXIN — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   Dark theme · Emerald accent (#10B981) · Pale mint (#A7F3D0)
   ============================================================ */

:root {
  --bg: #0D1210;
  --bg-2: #101714;
  --bg-3: #141E19;
  --bg-4: #1A2620;
  --line: #233029;
  --line-soft: #1C2821;
  --text: #E7F2EC;
  --text-muted: #9FB4AA;
  --emerald: #10B981;
  --emerald-bright: #34D399;
  --emerald-dark: #0B8A5F;
  --emerald-deep: #0A3D2C;
  --mint: #A7F3D0;
}

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

/* Legal pages load ONLY this stylesheet */
.legal-page {
  background-color: #0D1210;
  color: #E7F2EC;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page h4 {
  font-family: "Sora", "Inter", system-ui, sans-serif;
  color: #E7F2EC;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.legal-page a {
  color: #34D399;
  text-decoration: none;
}
.legal-page a:hover {
  color: #A7F3D0;
  text-decoration: underline;
}

/* ---------- Header ---------- */
.legal-hero {
  background-color: #0A3D2C;
  border-bottom: 1px solid #0B8A5F;
  padding: 72px 24px 56px;
}
.legal-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}
.legal-breadcrumb {
  display: inline-block;
  color: #A7F3D0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.legal-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
  color: #E7F2EC;
  margin-bottom: 14px;
}
.legal-hero .legal-meta {
  color: #A7F3D0;
  font-size: 15px;
}

/* ---------- Body content ---------- */
.legal-content {
  padding: 56px 0 72px;
}
.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Scope isolation: any section inside legal content must not
   inherit dark section backgrounds from the homepage styles */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content h2 {
  font-size: 26px;
  font-weight: 700;
  color: #A7F3D0;
  margin: 48px 0 18px;
  padding-top: 8px;
  scroll-margin-top: 24px;
}
.legal-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: #E7F2EC;
  margin: 28px 0 12px;
}
.legal-content p {
  color: #9FB4AA;
  margin-bottom: 18px;
}
.legal-content ul,
.legal-content ol {
  color: #9FB4AA;
  margin: 0 0 20px 22px;
}
.legal-content li {
  margin-bottom: 10px;
}
.legal-content strong {
  color: #E7F2EC;
}
.legal-content section {
  margin-bottom: 8px;
}

/* ---------- Table of contents ---------- */
.legal-toc {
  background-color: #101714;
  border: 1px solid #233029;
  border-left: 4px solid #10B981;
  border-radius: 12px;
  padding: 26px 28px;
  margin-bottom: 40px;
}
.legal-toc h2 {
  font-size: 16px;
  font-weight: 700;
  color: #E7F2EC;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}
.legal-toc ol {
  list-style: none;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  counter-reset: toc;
}
.legal-toc ol li {
  margin: 0;
  counter-increment: toc;
  font-size: 14px;
  line-height: 1.5;
}
.legal-toc ol li a {
  color: #9FB4AA;
  text-decoration: none;
}
.legal-toc ol li a:hover {
  color: #A7F3D0;
}
.legal-toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  color: #34D399;
  font-weight: 700;
  margin-right: 8px;
  font-size: 13px;
}

/* ---------- Footer ---------- */
.legal-footer {
  background-color: #101714;
  border-top: 2px solid #10B981;
  padding: 44px 24px 32px;
  text-align: center;
}
.legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
}
.legal-footer .legal-brand {
  display: inline-block;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: #E7F2EC;
  margin-bottom: 12px;
}
.legal-footer p {
  color: #7E938A;
  font-size: 14px;
  margin-bottom: 12px;
}
.legal-footer .legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
}
.legal-footer .legal-links a {
  color: #9FB4AA;
}

@media (max-width: 620px) {
  .legal-toc ol {
    grid-template-columns: 1fr;
  }
  .legal-content h2 {
    font-size: 22px;
  }
}
