/* ==========================================================================
   Weiyi Systems — shared legal stylesheet (privacy + terms)
   Loaded ONLY by legal pages. Does not depend on style.css.
   ========================================================================== */

.legal-page {
  background-color: #120D0F;
  color: #F2E8E6;
}

:root {
  --bg: #120D0F;
  --bg-2: #1A1115;
  --bg-3: #221418;
  --ink: #F2E8E6;
  --muted: #C6B1AC;
  --faint: #9C8681;
  --wine: #9F1239;
  --wine-2: #BE123C;
  --rose: #FDA4AF;
  --deep: #2A0E16;
  --line: #3A2029;
  --line-2: #2B181D;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Any max-width content container must be centered with horizontal padding */
.legal-page .container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Top bar (simple brand bar — legal pages do not reuse the abacus nav)
   ========================================================================== */
.legal-topbar {
  background-color: #1A1115;
  border-bottom: 2px solid #9F1239;
}

.legal-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  color: #F2E8E6;
}

.legal-brand .monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: #9F1239;
  color: #F2E8E6;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid #BE123C;
}

.legal-brand em {
  font-style: normal;
  color: #FDA4AF;
}

.legal-home-link {
  font-weight: 700;
  font-size: 15px;
  color: #FDA4AF;
  border: 1px solid #3A2029;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.legal-home-link:hover {
  background-color: #9F1239;
  color: #F2E8E6;
}

/* ==========================================================================
   Page header (h1 area) — must be a div/header with a solid or gradient bg
   ========================================================================== */
.legal-hero {
  background: linear-gradient(135deg, #2A0E16 0%, #9F1239 100%);
  padding: 72px 0 64px;
  border-bottom: 1px solid #3A2029;
}

.legal-hero h1 {
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #F2E8E6;
  margin-bottom: 14px;
}

.legal-hero .legal-lede {
  color: #F6DCE2;
  font-size: 1.1rem;
  max-width: 720px;
}

.legal-hero .legal-meta {
  margin-top: 18px;
  color: #FDA4AF;
  font-size: 14px;
  font-weight: 600;
}

/* ==========================================================================
   Table of contents
   ========================================================================== */
.toc {
  background-color: #1A1115;
  border: 1px solid #3A2029;
  border-radius: 14px;
  padding: 28px 30px;
  margin-top: 48px;
}

.toc h2 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FDA4AF;
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}

.toc li {
  counter-increment: none;
}

.toc a {
  color: #C6B1AC;
  font-size: 15px;
  transition: color 0.18s ease;
}

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

.toc a .toc-num {
  color: #9F1239;
  font-weight: 800;
  margin-right: 8px;
}

/* ==========================================================================
   Legal content
   ========================================================================== */
.legal-content {
  padding: 40px 0 64px;
}

/* scope isolation: neutralize any inherited section background */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  padding: 30px 0;
  border-bottom: 1px solid #2B181D;
}

.legal-content section:last-child {
  border-bottom: none;
}

.legal-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #F2E8E6;
  margin-bottom: 16px;
  scroll-margin-top: 90px;
}

.legal-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FDA4AF;
  margin: 22px 0 10px;
}

.legal-content p {
  color: #C6B1AC;
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 18px 22px;
  color: #C6B1AC;
}

.legal-content li {
  margin-bottom: 9px;
  font-size: 1.02rem;
}

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

.legal-content a {
  color: #FDA4AF;
  text-decoration: underline;
}

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

.legal-content .address-block {
  background-color: #1A1115;
  border-left: 3px solid #9F1239;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 20px 0;
  color: #F2E8E6;
  font-size: 1.02rem;
}

.legal-content .address-block span {
  display: block;
  color: #FDA4AF;
  font-weight: 700;
  margin-bottom: 6px;
}

/* ==========================================================================
   Legal footer
   ========================================================================== */
.legal-footer {
  background-color: #0E0A0C;
  border-top: 4px solid #9F1239;
  padding: 44px 0 36px;
  margin-top: 20px;
}

.legal-footer .container {
  text-align: center;
}

.legal-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.legal-footer .footer-links a {
  color: #C6B1AC;
  font-weight: 600;
  font-size: 15px;
}

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

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

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 700px) {
  .legal-hero h1 {
    font-size: 2rem;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .legal-topbar .container {
    height: 62px;
  }

  .legal-content h2 {
    font-size: 1.35rem;
  }
}
