/* ============================================================
   HKFinance — Legal stylesheet (privacy.html, terms-of-service.html)
   Loaded ONLY by the legal pages. Dark bullion-gold theme.
   ============================================================ */

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

body {
  font-family: Georgia, "Times New Roman", serif;
  background-color: #141109;
  color: #F5EFE0;
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  color: #C9972E;
  text-decoration: none;
}

a:hover {
  color: #EFE0B8;
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: #F5EFE0;
  line-height: 1.25;
  font-weight: 700;
}

/* ============================================================
   LEGAL PAGE HEADER — a div/header element with solid background.
   The h1 must contrast strongly with that background.
   ============================================================ */

.legal-header {
  background-color: #221C10;
  padding: 72px 24px 56px;
  text-align: center;
  border-bottom: 6px solid #C9972E;
}

.legal-header .legal-kicker {
  display: inline-block;
  background-color: #C9972E;
  color: #141109;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 14px;
  padding: 8px 20px;
  margin-bottom: 24px;
}

.legal-header h1 {
  font-size: 46px;
  color: #F5EFE0;
  margin-bottom: 14px;
}

.legal-header .legal-updated {
  color: #EFE0B8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
}

.legal-header .legal-back {
  display: inline-block;
  margin-top: 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #C9972E;
}

.legal-header .legal-back:hover {
  color: #EFE0B8;
}

/* ============================================================
   SCOPE ISOLATION — sections inside the legal content never carry
   their own background. Header and footer are excluded.
   ============================================================ */

.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ============================================================
   CONTENT WRAPPER — any container with a max-width gets
   margin: 0 auto and padding: 0 24px.
   ============================================================ */

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

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

/* ============================================================
   TABLE OF CONTENTS (uses the .toc class, never a bare nav rule)
   ============================================================ */

.legal-toc {
  margin: 40px 0 8px;
  padding: 32px 36px;
  background-color: #221C10;
  border-left: 6px solid #C9972E;
}

.legal-toc h2 {
  font-size: 20px;
  color: #C9972E;
  margin-bottom: 18px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.legal-toc a {
  color: #EFE0B8;
  font-size: 15px;
}

.legal-toc a::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #C9972E;
  margin-right: 10px;
  vertical-align: middle;
}

.legal-toc a:hover {
  color: #C9972E;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.legal-content section {
  padding: 44px 0 0;
  border-bottom: 1px solid #6A5B33;
}

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

.legal-content h2 {
  font-size: 28px;
  color: #C9972E;
  margin-bottom: 18px;
  padding-top: 8px;
}

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

.legal-content p {
  color: #EFE0B8;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  color: #EFE0B8;
  margin: 0 0 18px;
  padding-left: 26px;
}

.legal-content li {
  margin-bottom: 10px;
}

.legal-content strong {
  color: #F5EFE0;
}

.legal-content .contact-block {
  background-color: #221C10;
  padding: 28px 32px;
  border-left: 4px solid #C9972E;
  margin: 20px 0;
}

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

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

.legal-content a[href^="#"] {
  border-bottom: 1px dashed #6A5B33;
}

/* ============================================================
   FOOTER
   ============================================================ */

.legal-footer {
  margin-top: 56px;
  padding: 28px 24px 36px;
  text-align: center;
  border-top: 2px solid #C9972E;
  background-color: #1A160E;
}

.legal-footer p {
  color: #EFE0B8;
  font-size: 15px;
  margin-bottom: 10px;
}

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

.legal-footer a {
  color: #C9972E;
  font-weight: 700;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 700px) {
  .legal-header h1 {
    font-size: 34px;
  }

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

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