/* === FangRen — Legal Pages Shared Stylesheet === */

.legal-page {
  background: #1C1B1F;
  color: #EDEAE5;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.8;
}

/* Scope isolation: prevent homepage section styles from leaking into legal content */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* Legal Header (using header element, NOT section) */
.legal-header {
  background: linear-gradient(160deg, #151418 0%, #1C1B1F 50%, #201D25 100%);
  border-bottom: 1px solid #33313A;
  padding: 80px 0 60px;
  text-align: center;
}

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

.legal-header h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #EDEAE5;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.legal-header p {
  font-size: 0.95rem;
  color: #8A8782;
}

/* Legal Navigation Bar */
.legal-nav {
  background: #25242A;
  border-bottom: 1px solid #33313A;
  padding: 0;
}

.legal-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 12px;
  flex-wrap: wrap;
}

.legal-nav a {
  color: #8A8782;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
}

.legal-nav a:hover { color: #E04D3C; }

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

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

/* Table of Contents */
.toc {
  background: #25242A;
  border: 1px solid #33313A;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 48px;
}

.toc h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #EDEAE5;
  margin-bottom: 20px;
}

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

.toc li {
  counter-increment: toc-counter;
  margin-bottom: 10px;
  padding-left: 28px;
  position: relative;
}

.toc li::before {
  content: counter(toc-counter) ".";
  position: absolute;
  left: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #5AA897;
}

.toc a {
  color: #B5B2AC;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.3s;
}

.toc a:hover { color: #E04D3C; }

/* Legal Content Sections */
.legal-content section {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid #33313A;
}

.legal-content section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #EDEAE5;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
  scroll-margin-top: 100px;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #DCB86C;
  margin: 24px 0 12px;
}

.legal-content p {
  font-size: 0.95rem;
  color: #B5B2AC;
  margin-bottom: 16px;
  line-height: 1.85;
}

.legal-content p:last-child { margin-bottom: 0; }

.legal-content ul, .legal-content ol {
  margin: 0 0 20px 24px;
  color: #B5B2AC;
  font-size: 0.93rem;
}

.legal-content li { margin-bottom: 8px; line-height: 1.7; }

.legal-content strong { color: #EDEAE5; font-weight: 600; }

.legal-content address {
  font-style: normal;
  color: #B5B2AC;
  background: rgba(220, 184, 108, 0.06);
  border: 1px solid rgba(220, 184, 108, 0.15);
  border-radius: 10px;
  padding: 20px 24px;
  line-height: 1.8;
  font-size: 0.93rem;
  margin: 20px 0;
}

/* Back to top */
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8A8782;
  text-decoration: none;
  font-size: 0.85rem;
  margin-top: 8px;
  transition: color 0.3s;
}

.back-to-top:hover { color: #E04D3C; }

/* Legal Page Footer */
.legal-footer {
  background: #151418;
  border-top: 1px solid #33313A;
  padding: 32px 0;
  text-align: center;
}

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

.legal-footer p {
  font-size: 0.82rem;
  color: #8A8782;
  margin-bottom: 8px;
}

.legal-footer a {
  color: #E04D3C;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.legal-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .legal-header h1 { font-size: 1.8rem; }
  .legal-content h2 { font-size: 1.2rem; }
  .legal-content .container { padding: 0 16px; }
  .toc { padding: 24px 20px; }
}
