/* ============================================================
   Quanwen Technology Limited
   Legal pages shared stylesheet — Graphite Monochrome Dark
   Loaded by privacy.html and terms-of-service.html ONLY.
   ============================================================ */

.legal-page {
  background-color: #101418;
  color: #e8ecf0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #e8ecf0;
  background-color: #101418;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a:hover {
  color: #e8ecf0;
}

/* ------------------------------------------------------------
   Legal header (solid background, contrasting title)
   ------------------------------------------------------------ */

.legal-header {
  background-color: #161c22;
  border-bottom: 1px solid #6b7280;
  padding: 64px 24px 52px;
}

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

.legal-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c9d4dc;
  background-color: #6b7280;
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.legal-header h1 {
  font-size: 38px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e8ecf0;
  margin-bottom: 16px;
}

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

/* ------------------------------------------------------------
   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 styles leak in */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  margin-bottom: 52px;
  scroll-margin-top: 32px;
}

.legal-content h2 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #9aa3ad;
  padding-bottom: 12px;
  border-bottom: 1px solid #262d35;
  margin-bottom: 20px;
  scroll-margin-top: 32px;
}

.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: #e8ecf0;
  margin: 26px 0 10px;
}

.legal-content p {
  font-size: 16px;
  line-height: 1.75;
  color: #c9d4dc;
  margin-bottom: 18px;
}

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

.legal-content li {
  font-size: 16px;
  line-height: 1.75;
  color: #c9d4dc;
  margin-bottom: 10px;
}

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

/* ------------------------------------------------------------
   Table of contents
   ------------------------------------------------------------ */

.toc {
  background-color: #161c22;
  border: 1px solid #2c343e;
  border-radius: 8px;
  padding: 26px 28px;
  margin-bottom: 48px;
}

.toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9d4dc;
  margin-bottom: 16px;
}

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

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

.toc li:last-child {
  margin-bottom: 0;
}

.toc a {
  color: #9aa3ad;
  font-size: 15px;
  line-height: 1.5;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: #6b7280;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-right: 12px;
}

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

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

.legal-footer {
  border-top: 2px solid #6b7280;
  padding: 40px 24px;
  background-color: #101418;
}

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

.legal-footer p {
  font-size: 14px;
  color: #9aa3ad;
  margin-bottom: 12px;
}

.legal-footer a {
  color: #c9d4dc;
}

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

.legal-footer .legal-footer-nav {
  margin-top: 8px;
  font-size: 14px;
}

.legal-footer .legal-footer-nav a {
  margin: 0 8px;
}

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

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

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

  .toc {
    padding: 20px 20px;
  }
}
