/* ============================================================
   Huading Academy — Legal Stylesheet
   Shared styles for privacy.html and terms-of-service.html
   ============================================================ */

:root {
  --bg: #141731;
  --bg-deep: #0E1024;
  --panel: #1B1E3B;
  --indigo: #6366F1;
  --indigo-deep: #312E81;
  --gold: #C9A227;
  --gold-pale: #E8D5A0;
  --text: #E8E6F0;
  --text-soft: #C3C0DA;
  --text-dim: #8F8BAE;
  --line: #2C2F52;
  --white: #FFFFFF;
}

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

html {
  font-size: 16px;
}

.legal-page {
  background-color: #141731;
  color: #E8E6F0;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.legal-page a {
  color: var(--gold);
  text-decoration: none;
}

.legal-page a:hover {
  color: var(--gold-pale);
}

/* ---------- Legal header ---------- */

.legal-header {
  background: linear-gradient(135deg, var(--indigo-deep) 0%, var(--indigo) 100%);
  border-bottom: 1px solid var(--gold);
  padding: 64px 0 56px;
}

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

.legal-header .eyebrow {
  display: inline-block;
  background-color: var(--gold-pale);
  color: var(--indigo-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.legal-header h1 {
  color: var(--white);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.legal-header .updated {
  color: #DCDAF0;
  font-size: 15px;
}

/* ---------- Legal content ---------- */

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

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

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

.legal-content .toc {
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 30px;
  margin-bottom: 44px;
}

.legal-content .toc h2 {
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.legal-content .toc ol {
  list-style: none;
  counter-reset: toc;
}

.legal-content .toc ol li {
  counter-increment: toc;
  margin-bottom: 10px;
  font-size: 15px;
}

.legal-content .toc ol li::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--gold);
  font-weight: 700;
  margin-right: 12px;
}

.legal-content .toc ol a {
  color: var(--text-soft);
}

.legal-content .toc ol a:hover {
  color: var(--gold-pale);
}

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

.legal-content h2 {
  color: var(--white);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.legal-content h3 {
  color: var(--gold-pale);
  font-size: 18px;
  font-weight: 700;
  margin: 26px 0 10px;
}

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

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

.legal-content ul li {
  color: var(--text-soft);
  font-size: 16px;
  margin-bottom: 8px;
}

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

.legal-content a.back-home {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--gold);
  font-weight: 600;
}

/* ---------- Legal footer ---------- */

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

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

.legal-footer p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 10px;
}

.legal-footer a {
  color: var(--gold);
}

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

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

  .legal-content h2 {
    font-size: 22px;
  }
}
