/* ============================================================
   Lunzun — Legal stylesheet (privacy + terms)
   Loaded independently of style.css
   ============================================================ */

.legal-page {
  background-color: #0B0E14;
  color: #E8EAED;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.legal-page h1,
.legal-page h2,
.legal-page h3 {
  font-family: "Sora", "Inter", system-ui, sans-serif;
  line-height: 1.2;
  color: #E8EAED;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal-page a {
  color: #818CF8;
  text-decoration: none;
}

.legal-page a:hover {
  color: #E8EAED;
}

/* Scope isolation: legal content sections must never inherit
   homepage section backgrounds. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* Header */
.legal-header {
  background: linear-gradient(135deg, #0F131D 0%, #161E30 100%);
  border-bottom: 1px solid #232B3D;
  padding: 72px 24px 56px;
  text-align: center;
}

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

.legal-header .eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #818CF8;
  margin-bottom: 16px;
}

.legal-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: #E8EAED;
  margin-bottom: 16px;
}

.legal-header .updated {
  font-size: 0.9rem;
  color: #7C8698;
}

.legal-header .back-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #818CF8;
}

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

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

.legal-content h2 {
  font-size: 1.55rem;
  margin: 48px 0 16px;
  padding-top: 8px;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin: 24px 0 10px;
  color: #AAB3C5;
}

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

.legal-content ul {
  color: #AAB3C5;
  margin: 0 0 20px 22px;
  padding-left: 4px;
}

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

.legal-content section {
  margin-bottom: 16px;
}

/* Table of contents */
.toc {
  background-color: #121826;
  border: 1px solid #232B3D;
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 48px;
}

.toc h2 {
  font-size: 1.05rem;
  margin: 0 0 14px;
  color: #E8EAED;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
}

.toc ol li {
  counter-increment: toc;
  margin-bottom: 8px;
}

.toc ol li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: #818CF8;
  font-size: 0.85rem;
  margin-right: 12px;
}

.toc ol li a {
  color: #AAB3C5;
  font-size: 0.95rem;
}

.toc ol li a:hover {
  color: #E8EAED;
}

/* Footer */
.legal-footer {
  background-color: #0B0E14;
  border-top: 1px solid #232B3D;
  padding: 36px 24px;
  text-align: center;
}

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

.legal-footer p {
  color: #7C8698;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

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

.legal-footer .footer-links a {
  color: #818CF8;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .legal-header { padding: 52px 20px 44px; }
  .legal-content { padding: 40px 0 60px; }
  .legal-content .container { padding: 0 20px; }
}
