/* ============================================================
   Luoxun — Shared legal stylesheet (privacy + terms)
   Dark emerald theme. Loaded independently of style.css.
   All solid hex colors, no rgba/opacity text.
   ============================================================ */

:root {
  --legal-bg: #0A0F0D;
  --legal-surface: #141C18;
  --legal-surface-2: #1A231E;
  --legal-border: #243029;
  --legal-text: #EAF2EE;
  --legal-muted: #A9B9B0;
  --legal-faint: #7C8B83;
  --legal-accent: #34D399;
  --legal-accent-bright: #6EE7B7;
  --legal-accent-ink: #052E21;
}

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

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

body {
  font-size: 16px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* The legal pages own their background: dark theme. */
.legal-page {
  background-color: var(--legal-bg);
  color: var(--legal-text);
  min-height: 100vh;
}

a {
  color: var(--legal-accent-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header (must be a div/header, never a section) ---------- */

.legal-header {
  background: linear-gradient(135deg, #0B3A2C 0%, #0E1512 60%, #0A0F0D 100%);
  border-bottom: 1px solid var(--legal-border);
  padding: 72px 24px 48px;
  text-align: center;
}

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

.legal-header .kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--legal-accent);
  margin-bottom: 14px;
}

.legal-header h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--legal-text);
}

.legal-header .subtitle {
  margin-top: 14px;
  font-size: 15px;
  color: var(--legal-muted);
}

/* ---------- Layout ---------- */

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

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

/* Scope isolation: never let homepage section styling bleed in. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

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

/* ---------- Table of contents ---------- */

.toc {
  background-color: var(--legal-surface);
  border: 1px solid var(--legal-border);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 48px;
}

.toc h2 {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--legal-accent);
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  counter-reset: toc;
}

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

.toc ol li a {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--legal-muted);
  line-height: 1.5;
}

.toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 700;
  color: var(--legal-accent);
  flex-shrink: 0;
}

.toc ol li a:hover {
  color: var(--legal-accent-bright);
}

/* ---------- Section headings and body text ---------- */

.legal-content h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  color: var(--legal-text);
  margin-bottom: 16px;
  padding-top: 8px;
  border-bottom: 1px solid var(--legal-border);
  padding-bottom: 12px;
}

.legal-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--legal-accent-bright);
  margin: 24px 0 10px;
}

.legal-content p {
  font-size: 16px;
  color: var(--legal-muted);
  margin-bottom: 16px;
}

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

.legal-content ul li {
  font-size: 16px;
  color: var(--legal-muted);
  margin-bottom: 10px;
  padding-left: 4px;
}

.legal-content strong {
  color: var(--legal-text);
}

.legal-content a {
  color: var(--legal-accent-bright);
}

/* ---------- Back to top / footer ---------- */

.legal-content .back-home {
  display: inline-block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--legal-accent-bright);
}

.legal-footer {
  border-top: 1px solid var(--legal-border);
  background-color: #0E1512;
  padding: 40px 24px;
  text-align: center;
}

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

.legal-footer p {
  font-size: 14px;
  color: var(--legal-faint);
  margin-bottom: 12px;
}

.legal-footer nav a {
  font-size: 14px;
  color: var(--legal-muted);
  margin: 0 12px;
}

.legal-footer nav a:hover {
  color: var(--legal-accent-bright);
}

/* ---------- Responsive ---------- */

@media (max-width: 680px) {
  .legal-header h1 {
    font-size: 30px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

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