/* ============================================================
   YeHaoJia — Legal Pages Shared Stylesheet
   Loaded ONLY by privacy.html and terms-of-service.html
   DARK warm theme · AMBER #F59E0B accent on near-black #101014
   ============================================================ */

:root {
  --bg: #101014;
  --surface: #1C1917;
  --surface-2: #26211B;
  --text: #F3EEE4;
  --text-soft: #C9C0B2;
  --text-muted: #9C9486;
  --amber: #F59E0B;
  --amber-deep: #D97706;
  --amber-light: #FDE68A;
  --border: #3A332B;
  --border-soft: #2A251F;
}

* {
  box-sizing: border-box;
}

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

body {
  font-size: 16px;
  background-color: #101014;
  color: #F3EEE4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.75;
  margin: 0;
  overflow-x: hidden;
}

/* Scope isolation — legal pages body background is defined here */
.legal-page {
  background-color: #101014;
  color: #F3EEE4;
}

/* Legal pages load only legal.css, never style.css,
   so any generic section background is neutralized here. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

a {
  color: #FDE68A;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================
   LEGAL NAV (top, sticky — class scoped only)
   ============================================================ */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: #1C1917;
  border-bottom: 1px solid #3A332B;
}

.legal-nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 24px;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #F3EEE4;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.legal-lantern {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 18px;
  flex-shrink: 0;
}

.legal-lantern .cord {
  width: 2px;
  height: 7px;
  background-color: #9C9486;
}

.legal-lantern .cap {
  width: 18px;
  height: 4px;
  background-color: #D97706;
}

.legal-lantern .cap.top {
  clip-path: polygon(0 0, 100% 0, 72% 100%, 28% 100%);
}

.legal-lantern .cap.bottom {
  clip-path: polygon(28% 0, 72% 0, 100% 100%, 0 100%);
}

.legal-lantern .body {
  width: 16px;
  height: 20px;
  background-color: #F59E0B;
  border-radius: 8px;
  box-shadow: 0 0 12px #F59E0B;
}

.legal-lantern .tassel {
  width: 2px;
  height: 9px;
  background-color: #FDE68A;
}

.legal-nav .home-link {
  margin-left: auto;
  color: #FDE68A;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* ============================================================
   LEGAL HEADER (div, solid background, strong contrast)
   ============================================================ */
.legal-header {
  background: linear-gradient(160deg, #1C1917 0%, #26211B 100%);
  border-bottom: 1px solid #3A332B;
  padding: 72px 0 56px;
}

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

.legal-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  line-height: 1.2;
  color: #FDE68A;
  margin: 0 0 16px;
}

.legal-header .legal-meta {
  color: #C9C0B2;
  font-size: 0.95rem;
  margin: 0;
}

/* ============================================================
   LEGAL CONTENT
   ============================================================ */
.legal-content {
  padding: 56px 0 64px;
}

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

/* Table of contents */
.legal-toc {
  background-color: #1C1917;
  border: 1px solid #2A251F;
  border-left: 4px solid #F59E0B;
  border-radius: 8px;
  padding: 26px 28px;
  margin-bottom: 48px;
}

.legal-toc h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  color: #F3EEE4;
  margin: 0 0 14px;
}

.legal-toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 40px;
}

.legal-toc li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  break-inside: avoid;
}

.legal-toc a {
  color: #C9C0B2;
}

.legal-toc a:hover {
  color: #FDE68A;
}

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

.legal-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  color: #F59E0B;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2A251F;
}

.legal-content h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  color: #FDE68A;
  margin: 24px 0 10px;
}

.legal-content p {
  color: #C9C0B2;
  margin: 0 0 16px;
}

.legal-content ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.legal-content li {
  color: #C9C0B2;
  margin-bottom: 8px;
}

.legal-content strong {
  color: #F3EEE4;
}

/* ============================================================
   LEGAL FOOTER
   ============================================================ */
.legal-footer {
  background-color: #101014;
  border-top: 1px solid #2A251F;
  padding: 32px 0 36px;
}

.legal-footer-rule {
  height: 3px;
  background: linear-gradient(90deg, #F59E0B, #D97706);
  margin-bottom: 28px;
}

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

.legal-footer a {
  color: #FDE68A;
  font-weight: 600;
}

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

.legal-footer p {
  color: #9C9486;
  font-size: 0.85rem;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .legal-header h1 {
    font-size: 1.9rem;
  }

  .legal-toc ol {
    columns: 1;
  }

  .legal-content h2 {
    font-size: 1.35rem;
  }
}
