/* ============================================================
   YingDeng — Shared legal stylesheet (privacy + terms)
   Loaded ONLY by privacy.html and terms-of-service.html
   ============================================================ */

.legal-page {
  background-color: #0D1A14;
  color: #F3F1E9;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #F3F1E9;
  background-color: #0D1A14;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Sora", "Inter", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #F3F1E9;
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.legal-header {
  background: linear-gradient(135deg, #173027, #1C3A2E);
  border-bottom: 1px solid #244034;
  padding: 72px 24px 56px;
  text-align: center;
}

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

.legal-header .legal-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E07A5F;
  margin-bottom: 16px;
}

.legal-header h1 {
  font-size: clamp(32px, 5vw, 52px);
  color: #F3F1E9;
  margin-bottom: 16px;
}

.legal-header .legal-updated {
  font-size: 14px;
  color: #A9BDB1;
}

/* ---------- Table of contents ---------- */
.legal-toc {
  background-color: #12221B;
  border: 1px solid #244034;
  border-radius: 16px;
  padding: 28px 32px;
  margin: 40px auto 0;
  max-width: 800px;
  text-align: left;
}

.legal-toc h2 {
  font-size: 18px;
  color: #8FBFAA;
  margin-bottom: 16px;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 32px;
}

.legal-toc li {
  counter-increment: toc;
  margin-bottom: 10px;
}

.legal-toc a {
  font-size: 15px;
  color: #A9BDB1;
  transition: color 0.2s ease;
}

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

.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 700;
  color: #E07A5F;
  margin-right: 10px;
  font-size: 13px;
}

/* ---------- Content ---------- */
.legal-content { padding: 56px 24px 72px; }

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

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

.legal-content section { margin-bottom: 48px; }
.legal-content section:last-child { margin-bottom: 0; }

.legal-content h2 {
  font-size: 26px;
  color: #F3F1E9;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #244034;
  scroll-margin-top: 32px;
}

.legal-content h3 {
  font-size: 19px;
  color: #8FBFAA;
  margin: 24px 0 10px;
}

.legal-content p {
  color: #A9BDB1;
  margin-bottom: 16px;
}

.legal-content ul {
  color: #A9BDB1;
  padding-left: 24px;
  margin-bottom: 16px;
}

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

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

.legal-content a {
  color: #E07A5F;
  text-decoration: underline;
}
.legal-content a:hover { color: #F08A6C; }

/* ---------- Footer ---------- */
.legal-footer {
  border-top: 1px solid #244034;
  background-color: #0D1A14;
  padding: 32px 24px;
}

.legal-footer .legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-footer .legal-brand {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #F3F1E9;
}

.legal-footer .legal-brand a:hover { color: #E07A5F; }

.legal-footer nav { display: flex; gap: 20px; }

.legal-footer nav a {
  font-size: 14px;
  color: #A9BDB1;
  transition: color 0.2s ease;
}
.legal-footer nav a:hover { color: #E07A5F; }

.legal-footer .legal-copyright {
  font-size: 13px;
  color: #7FA08F;
  width: 100%;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .legal-toc ol { columns: 1; }
  .legal-footer .legal-footer-inner { flex-direction: column; text-align: center; }
}
