/* ============================================================
   XinShengDa — Legal pages stylesheet
   Loaded ONLY by privacy.html and terms-of-service.html
   ============================================================ */

:root {
  --bg: #F4FAFA;
  --surface: #FFFFFF;
  --text: #10333A;
  --teal: #0E9AA7;
  --deep: #0A6B77;
  --aqua: #B8E4E4;
  --aqua-soft: #DDF2F2;
  --hairline: #D9E9E9;
  --white: #FFFFFF;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legal-page {
  background-color: #F4FAFA;
  color: #10333A;
}

a {
  color: var(--deep);
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1.1em;
}

ul, ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.4em;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Drop Badge Navigation (same as main site)
   ============================================================ */
.drop-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface);
  border-bottom: 2px solid var(--teal);
  box-shadow: 0 2px 12px rgba(10, 107, 119, 0.08);
}

.drop-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.drop-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.water-badge {
  position: relative;
  display: inline-flex;
  margin-top: 7px;
}

.water-badge .tip {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 11px solid var(--teal);
}

.water-badge .drop {
  width: 30px;
  height: 30px;
  background-color: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
}

.brand .wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}

.drop-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.drop-nav .nav-links a {
  position: relative;
  display: inline-block;
  padding: 26px 0 22px;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.drop-nav .nav-links a:hover {
  color: var(--deep);
}

.drop-nav .nav-links a.active {
  color: var(--deep);
}

.drop-nav .nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background-color: var(--teal);
  border-radius: 2px 2px 0 0;
}

.nav-cta {
  background-color: var(--teal);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.nav-cta:hover {
  background-color: var(--deep);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--deep);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================================
   Legal page header
   ============================================================ */
.legal-hero {
  background-color: var(--deep);
  padding: 72px 0 64px;
}

.legal-hero h1 {
  color: var(--white);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.legal-hero p {
  color: var(--aqua);
  font-size: 17px;
  max-width: 720px;
  margin: 0;
}

.legal-hero .legal-date {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aqua-soft);
}

/* ============================================================
   Legal content + table of contents
   ============================================================ */
.legal-content {
  padding: 56px 0 72px;
}

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

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

.toc {
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep);
  margin-bottom: 14px;
}

.toc ol {
  margin: 0;
  padding-left: 1.3em;
  columns: 1;
}

.toc li {
  margin-bottom: 6px;
}

.toc a {
  color: var(--deep);
  font-size: 15px;
}

.toc a:hover {
  color: var(--teal);
}

.legal-content section {
  margin-bottom: 44px;
}

.legal-content h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--deep);
  margin-bottom: 14px;
  padding-top: 8px;
}

.legal-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 10px;
}

.legal-content p,
.legal-content li {
  color: #24505A;
  font-size: 16px;
}

.legal-content ul {
  list-style: disc;
}

.legal-content .back-home {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--deep);
}

.legal-content .back-home:hover {
  color: var(--teal);
}

/* ============================================================
   Basin Footer (same as main site)
   ============================================================ */
.basin-footer {
  background-color: var(--surface);
  border-top: 4px solid var(--teal);
  padding-top: 56px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .wordmark {
  font-size: 24px;
  font-weight: 800;
  color: var(--deep);
  margin-bottom: 12px;
}

.footer-brand p {
  color: #24505A;
  font-size: 15px;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: #24505A;
  font-size: 15px;
}

.footer-col ul a:hover {
  color: var(--teal);
}

.footer-contact p {
  font-size: 15px;
  color: #24505A;
  margin-bottom: 10px;
}

.footer-contact a {
  color: var(--deep);
  font-weight: 600;
}

.footer-strip {
  background-color: var(--aqua);
  color: var(--text);
  padding: 18px 0;
  font-size: 14px;
}

.footer-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-strip a {
  color: var(--deep);
  font-weight: 700;
}

.footer-strip a:hover {
  color: var(--text);
}

.footer-strip .sep {
  color: var(--deep);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 760px) {
  .drop-nav .container {
    height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .drop-nav .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--surface);
    border-bottom: 2px solid var(--teal);
    box-shadow: 0 12px 24px rgba(10, 107, 119, 0.12);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .drop-nav .nav-links.open {
    max-height: 420px;
  }

  .drop-nav .nav-links li {
    border-bottom: 1px solid var(--hairline);
  }

  .drop-nav .nav-links a {
    display: block;
    padding: 16px 24px;
  }

  .drop-nav .nav-links a.active::after {
    display: none;
  }

  .drop-nav .nav-links a.active {
    background-color: var(--aqua-soft);
  }

  .nav-cta {
    display: none;
  }

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