/* ==========================================================================
   LINGCHEN — Shared legal stylesheet (Privacy Policy & Terms of Service)
   Dark theme · Orange accent · Scope-isolated from homepage
   ========================================================================== */

.legal-page {
  background-color: #0F1013;
  color: #F2EFE9;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legal-page * {
  box-sizing: border-box;
}

.legal-page a {
  color: #FDBA74;
  text-decoration: none;
}

.legal-page a:hover {
  color: #F97316;
  text-decoration: underline;
}

.legal-page h1, .legal-page h2, .legal-page h3, .legal-page h4 {
  color: #F2EFE9;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.legal-page h2 {
  color: #FDBA74;
}

/* Scope isolation: ensure no section on the legal page picks up homepage
   background styles */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ==========================================================================
   LEGAL HEADER (div/header element, solid background, strong h1 contrast)
   ========================================================================== */

.legal-header {
  background: linear-gradient(135deg, #181B22 0%, #10131A 100%);
  border-bottom: 1px solid #262A33;
  padding: 40px 0 44px;
}

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

.legal-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #F2EFE9;
  font-size: 1.02rem;
  margin-bottom: 34px;
}

.legal-header .brand .mark {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #FB8A3C, #F97316, #EA5A0C);
  border-radius: 4px;
  position: relative;
}

.legal-header .brand .mark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background-color: #FDD7A6;
}

.legal-header .brand .mark::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  width: 100%;
  background-color: #FDD7A6;
}

.legal-header h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  color: #F2EFE9;
  margin-bottom: 12px;
}

.legal-header .sub {
  color: #C9C4B8;
  font-size: 1.02rem;
  max-width: 640px;
}

/* ==========================================================================
   LEGAL CONTENT
   ========================================================================== */

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

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

/* Table of contents */
.toc {
  background-color: #181B22;
  border: 1px solid #262A33;
  border-left: 4px solid #F97316;
  border-radius: 10px;
  padding: 26px 30px;
  margin-bottom: 44px;
}

.toc h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FDD7A6;
  margin-bottom: 16px;
}

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

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

.toc ol a {
  color: #C9C4B8;
  font-size: 0.94rem;
  line-height: 1.5;
  display: inline-flex;
  gap: 10px;
}

.toc ol a::before {
  content: counter(toc, decimal-leading-zero);
  color: #F97316;
  font-weight: 700;
  font-size: 0.82rem;
}

.toc ol a:hover {
  color: #FDBA74;
  text-decoration: none;
}

/* Sections */
.legal-content section {
  margin-bottom: 48px;
  padding-top: 8px;
}

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

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FDBA74;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #262A33;
}

.legal-content h3 {
  font-size: 1.12rem;
  color: #F2EFE9;
  margin: 26px 0 10px;
}

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

.legal-content ul, .legal-content ol {
  color: #C9C4B8;
  margin: 0 0 18px 4px;
  padding-left: 24px;
}

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

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

.legal-content .note {
  background-color: #181B22;
  border-left: 4px solid #FDBA74;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 20px 0;
  color: #C9C4B8;
}

.legal-content .contact-block {
  background-color: #181B22;
  border: 1px solid #262A33;
  border-radius: 10px;
  padding: 24px 28px;
  margin-top: 22px;
}

.legal-content .contact-block p {
  margin-bottom: 6px;
}

/* ==========================================================================
   LEGAL FOOTER
   ========================================================================== */

.legal-footer {
  border-top: 3px solid #F97316;
  background-color: #14161B;
  padding: 28px 24px;
  text-align: center;
}

.legal-footer p {
  color: #948E82;
  font-size: 0.88rem;
}

.legal-footer a {
  font-weight: 700;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 720px) {
  .toc ol {
    grid-template-columns: 1fr;
  }
}
