/* ============================================================
   JIANHEXU — Legal pages shared stylesheet
   Privacy Policy and Terms of Service
   Light porcelain ground, amethyst-ink headings, plum body text
   ============================================================ */

:root {
  --porcelain: #F6F4F9;
  --ink: #26202E;
  --body-text: #372F44;
  --amethyst: #7C5FA8;
  --amethyst-deep: #5F4488;
  --amethyst-ink: #4A3B66;
  --mist: #77708A;
  --white: #FFFFFF;
  --lilac: #EAE6F2;
  --lilac-line: #DDD6EA;
  --mint: #4E9B7E;
  --footer-muted: #B9B3C6;
  --footer-faint: #8F89A0;
  --serif: Georgia, Times New Roman, serif;
  --sans: Segoe UI, Helvetica Neue, Arial, Noto Sans, sans-serif;
}

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

html { scroll-behavior: smooth; }

body.legal-page {
  font-size: 16px;
  font-family: var(--sans);
  background-color: #F6F4F9;
  color: #26202E;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Legal header (div element, gradient band) ---------- */

.legal-header {
  background: linear-gradient(135deg, #3B2F52 0%, #4A3B66 45%, #7C5FA8 100%);
  padding: 66px 24px 58px;
  text-align: center;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #FFFFFF;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.legal-cube {
  width: 20px;
  height: 20px;
  background: #7C5FA8;
  border: 2px solid #FFFFFF;
  border-radius: 4px;
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.legal-cube::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 7px;
  width: 36px;
  height: 6px;
  background: #4E9B7E;
  transform: rotate(45deg);
}

.legal-brand:hover { color: #FFFFFF; }

.legal-kicker {
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  font-weight: 800;
  color: #DCD3EC;
}

.legal-header h1 {
  margin-top: 12px;
  color: #FFFFFF;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.15;
}

.legal-updated {
  margin-top: 14px;
  color: #DCD3EC;
  font-size: 14.5px;
  font-weight: 600;
}

/* ---------- Content column ---------- */

.legal-content { padding: 46px 0 70px; }

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

/* Scope isolation: homepage-style section backgrounds can never leak in */
.legal-page .legal-content section { background-color: transparent !important; }

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

.toc {
  background: #FFFFFF;
  border: 1px solid #DDD6EA;
  border-left: 5px solid #7C5FA8;
  border-radius: 12px;
  padding: 26px 30px;
  margin-bottom: 44px;
  box-shadow: 0 12px 26px rgba(38, 32, 46, 0.08);
}

.toc h2 {
  font-family: var(--serif);
  font-size: 20px;
  color: #4A3B66;
  margin-bottom: 12px;
}

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

.toc li {
  counter-increment: toc-counter;
  break-inside: avoid;
  padding: 5px 0;
  border-bottom: 1px dotted #DDD6EA;
}

.toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  color: #7C5FA8;
  font-weight: 800;
  font-size: 12.5px;
  margin-right: 9px;
}

.toc a {
  color: #372F44;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}

.toc a:hover { color: #3B7C63; }

/* ---------- Sections and typography ---------- */

.legal-content section {
  margin-bottom: 40px;
  scroll-margin-top: 24px;
}

.legal-content h2 {
  font-family: var(--serif);
  color: #4A3B66;
  font-size: 27px;
  line-height: 1.28;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #EAE6F2;
}

.legal-content h3 {
  font-family: var(--serif);
  color: #4A3B66;
  font-size: 19px;
  margin: 20px 0 8px;
}

.legal-content p {
  color: #372F44;
  margin-bottom: 14px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 14px 26px;
}

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

.legal-content a {
  color: #5F4488;
  font-weight: 600;
}

.legal-content a:hover { color: #3B7C63; }

.legal-contact-block {
  background: #EAE6F2;
  border: 1px solid #DDD6EA;
  border-radius: 12px;
  padding: 22px 26px;
  margin-top: 16px;
}

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

.legal-contact-block p:last-child { margin-bottom: 0; }

.legal-back {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid #DDD6EA;
  text-align: center;
}

.legal-back a {
  display: inline-block;
  background: #7C5FA8;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  padding: 13px 30px;
  border-radius: 9px;
  transition: background-color 0.22s;
}

.legal-back a:hover { background: #5F4488; color: #FFFFFF; }

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

.legal-footer {
  background: #26202E;
  padding: 44px 24px 40px;
  text-align: center;
}

.legal-footer .footer-stack {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
}

.legal-footer-links a {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.legal-footer-links a:hover {
  color: #4E9B7E;
  border-bottom-color: #4E9B7E;
}

.legal-footer p {
  color: #B9B3C6;
  font-size: 14px;
}

.legal-footer .legal-fine {
  color: #8F89A0;
  font-size: 13px;
}

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

@media (max-width: 720px) {
  .legal-header h1 { font-size: 31px; }
  .legal-content h2 { font-size: 22px; }
  .toc ol { columns: 1; }
  .toc { padding: 22px 20px; }
  .legal-content .container { padding: 0 20px; }
  .legal-footer-links { flex-direction: column; gap: 12px; }
}
