/* ============================================================
   JIANHUI — Legal pages (Privacy Policy / Terms of Service)
   Loaded ONLY by legal pages. Never style.css.
   ============================================================ */

:root {
  --bg: #150C10;
  --bg-soft: #1E1218;
  --bg-raised: #291821;
  --line: #3A222C;
  --line-soft: #2C1A23;
  --text: #F4EBEF;
  --text-muted: #C9B1BC;
  --rose: #D94F6C;
  --rose-dark: #B83A55;
  --pale-rose: #F2A3B5;
  --sand: #E8D5C0;
  --white: #FFFFFF;
}

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

.legal-page {
  background-color: #150C10;
  color: #F4EBEF;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

.legal-page a:hover {
  color: #F2A3B5;
}

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

/* ============================================================
   BARCODE NAV (legal pages)
   ============================================================ */

.legal-page .barcode-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #150C10;
  border-bottom: 1px solid #D94F6C;
}

.legal-page .barcode-nav .nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-page .barcode-nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.legal-page .barcode-nav .barcode {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.legal-page .barcode-nav .barcode i {
  display: block;
  width: 2px;
  height: 28px;
  background-color: #D94F6C;
}

.legal-page .barcode-nav .barcode i:nth-child(2) { width: 5px; }
.legal-page .barcode-nav .barcode i:nth-child(3) { width: 2px; }
.legal-page .barcode-nav .barcode i:nth-child(4) { width: 8px; }
.legal-page .barcode-nav .barcode i:nth-child(5) { width: 2px; }
.legal-page .barcode-nav .barcode i:nth-child(6) { width: 4px; }
.legal-page .barcode-nav .barcode i:nth-child(7) { width: 3px; }

.legal-page .barcode-nav .brand-name {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.16em;
  color: #F4EBEF;
}

.legal-page .barcode-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.legal-page .barcode-nav .nav-links a {
  color: #C9B1BC;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
}

.legal-page .barcode-nav .nav-links a:hover {
  color: #F4EBEF;
}

.legal-page .barcode-nav .nav-links a.active {
  color: #F4EBEF;
}

.legal-page .barcode-nav .nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background-color: #D94F6C;
  border-radius: 2px;
}

.legal-page .barcode-nav .nav-cta {
  background-color: #D94F6C;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  white-space: nowrap;
}

.legal-page .barcode-nav .nav-cta:hover {
  background-color: #B83A55;
  color: #FFFFFF;
}

.legal-page .barcode-nav .nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.legal-page .barcode-nav .nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #F4EBEF;
  margin: 5px 0;
}

/* ============================================================
   LEGAL PAGE HEADER (must be a div/header, NOT a section)
   ============================================================ */

.legal-page .legal-header {
  background-color: #1E1218;
  border-bottom: 1px solid #3A222C;
  padding: 64px 0 56px;
}

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

.legal-page .legal-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #E8D5C0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.legal-page .legal-header .eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  background-color: #D94F6C;
}

.legal-page .legal-header h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #F4EBEF;
  margin-bottom: 16px;
}

.legal-page .legal-header .lede {
  color: #C9B1BC;
  font-size: 17px;
  line-height: 1.7;
  max-width: 680px;
}

.legal-page .legal-header .updated {
  color: #E8D5C0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-top: 18px;
}

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

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

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

/* Scope isolation: never paint over legal text */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */

.legal-page .toc {
  background-color: #1E1218;
  border: 1px solid #3A222C;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 48px;
}

.legal-page .toc-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E8D5C0;
  margin-bottom: 16px;
}

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

.legal-page .toc ol li {
  counter-increment: toc;
  margin-bottom: 10px;
  break-inside: avoid;
}

.legal-page .toc ol li a {
  color: #C9B1BC;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.legal-page .toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  color: #D94F6C;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.legal-page .toc ol li a:hover {
  color: #F2A3B5;
}

/* ============================================================
   LEGAL SECTIONS / TEXT
   ============================================================ */

.legal-page .legal-content section {
  margin-bottom: 52px;
  padding-bottom: 4px;
}

.legal-page .legal-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: #F2A3B5;
  margin-bottom: 16px;
  padding-top: 8px;
  letter-spacing: -0.01em;
}

.legal-page .legal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #F4EBEF;
  margin: 24px 0 10px;
}

.legal-page .legal-content p {
  color: #C9B1BC;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-page .legal-content ul {
  list-style: none;
  margin: 8px 0 18px;
}

.legal-page .legal-content ul li {
  position: relative;
  padding-left: 24px;
  color: #C9B1BC;
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 10px;
}

.legal-page .legal-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  background-color: #D94F6C;
}

.legal-page .legal-content strong {
  color: #F4EBEF;
  font-weight: 700;
}

.legal-page .back-home {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #3A222C;
}

.legal-page .back-home a {
  color: #F2A3B5;
  font-weight: 600;
  font-size: 16px;
}

.legal-page .back-home a:hover {
  color: #F4EBEF;
}

/* ============================================================
   LABEL FOOTER (legal pages)
   ============================================================ */

.legal-page .label-footer {
  background-color: #150C10;
  border-top: 1px solid #D94F6C;
  padding: 56px 0 40px;
}

.legal-page .label-footer .footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-page .label-footer .footer-cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.4fr;
  gap: 48px;
  margin-bottom: 44px;
}

.legal-page .label-footer .footer-brand .brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.16em;
  color: #F4EBEF;
  display: block;
  margin-bottom: 10px;
}

.legal-page .label-footer .footer-brand p {
  color: #C9B1BC;
  font-size: 15px;
  line-height: 1.7;
}

.legal-page .label-footer .footer-col-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E8D5C0;
  margin-bottom: 18px;
}

.legal-page .label-footer .footer-links ul {
  list-style: none;
}

.legal-page .label-footer .footer-links li {
  margin-bottom: 12px;
}

.legal-page .label-footer .footer-links a {
  color: #C9B1BC;
  font-size: 16px;
}

.legal-page .label-footer .footer-links a:hover {
  color: #F2A3B5;
}

.legal-page .label-footer .footer-contact p {
  color: #C9B1BC;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 6px;
}

.legal-page .label-footer .footer-contact a {
  color: #F2A3B5;
}

.legal-page .label-footer .footer-legal {
  border-top: 1px solid #3A222C;
  padding-top: 26px;
  text-align: center;
  color: #C9B1BC;
  font-size: 14px;
}

.legal-page .label-footer .footer-legal a {
  color: #F2A3B5;
}

.legal-page .label-footer .footer-legal a:hover {
  color: #F4EBEF;
}

/* ============================================================
   RESPONSIVE (legal pages)
   ============================================================ */

@media (max-width: 768px) {
  .legal-page .barcode-nav .nav-toggle {
    display: block;
  }

  .legal-page .barcode-nav .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background-color: #150C10;
    border-bottom: 1px solid #D94F6C;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    display: none;
  }

  .legal-page .barcode-nav .nav-links.open {
    display: flex;
  }

  .legal-page .barcode-nav .nav-links a {
    padding: 14px 0;
    font-size: 17px;
    border-bottom: 1px solid #2C1A23;
  }

  .legal-page .barcode-nav .nav-links a.active::after {
    display: none;
  }

  .legal-page .barcode-nav .nav-cta {
    display: none;
  }

  .legal-page .legal-header h1 {
    font-size: 32px;
  }

  .legal-page .toc ol {
    columns: 1;
  }

  .legal-page .label-footer .footer-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
