/* ============================================================
   CongDai — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   Legal pages load ONLY this stylesheet.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #33391F;
  background-color: #F7F6F0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.28;
  color: #33391F;
}

a {
  color: #33391F;
}

::selection {
  background-color: #7A8450;
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid #7A8450;
  outline-offset: 3px;
}

/* Scope isolation: legal content sections never paint a background.
   This is scoped to the body content only, never the header or footer. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ---------- Legal header ---------- */
.legal-header {
  background-color: #F7F6F0;
  border-bottom: 1px solid #7A8450;
}

.legal-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #33391F;
  text-decoration: none;
}

.legal-brand:hover {
  color: #7A8450;
}

.legal-page-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #33391F;
}

/* ---------- Legal content ---------- */
.legal-content {
  padding: 58px 0 76px;
}

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

.legal-content h1 {
  font-size: 44px;
  line-height: 1.15;
  color: #33391F;
  margin-bottom: 14px;
}

.legal-content .legal-lede {
  font-size: 17px;
  color: #33391F;
  margin-bottom: 34px;
}

/* Table of contents */
.legal-toc {
  background-color: #D8DEC2;
  border-left: 5px solid #7A8450;
  border-radius: 0 6px 6px 0;
  padding: 26px 30px;
  margin-bottom: 52px;
}

.legal-toc h2 {
  font-size: 19px;
  color: #33391F;
  margin-bottom: 12px;
}

.legal-toc ol {
  margin-left: 20px;
  color: #33391F;
}

.legal-toc li {
  margin-bottom: 7px;
}

.legal-toc a {
  font-size: 15px;
  font-weight: 600;
  color: #33391F;
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
}

/* Sections */
.legal-content section {
  margin-bottom: 42px;
  scroll-margin-top: 28px;
}

.legal-content h2 {
  font-size: 27px;
  color: #33391F;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #D8DEC2;
}

.legal-content h3 {
  font-size: 20px;
  color: #33391F;
  margin: 20px 0 10px;
}

.legal-content p {
  font-size: 16px;
  color: #33391F;
  margin-bottom: 14px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px 24px;
  color: #33391F;
}

.legal-content li {
  margin-bottom: 7px;
  color: #33391F;
}

.legal-content strong {
  color: #33391F;
}

.legal-content .anchor-note {
  font-size: 14px;
  color: #33391F;
  font-style: normal;
}

/* ---------- Legal footer ---------- */
.legal-footer {
  background-color: #33391F;
  padding: 20px 0;
}

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

.legal-footer p {
  font-size: 14px;
  color: #F7F6F0;
  margin-bottom: 4px;
}

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

.legal-footer a {
  color: #D8DEC2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .legal-content {
    padding: 44px 0 56px;
  }

  .legal-content h1 {
    font-size: 33px;
  }

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

  .legal-toc {
    padding: 20px 22px;
  }

  .legal-header-inner {
    padding: 18px 24px;
  }
}
