/* ============================================================
   HaoDay — legal.css
   Shared styles for privacy.html and terms-of-service.html
   Light theme matching homepage body background
   ============================================================ */

.legal-page {
  background-color: #F7F5F0;
  color: #1B1B1B;
}

/* Scope isolation: never let homepage section styling pollute legal text */
.legal-page .legal-content section {
  background-color: transparent !important;
  color: #1B1B1B !important;
}

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

.legal-page {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: #0E7A54; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header (div/header, never section) ---------- */
.legal-header {
  background: linear-gradient(135deg, #122B22 0%, #1E4033 60%, #0E7A54 100%);
  border-bottom: 4px solid #0A5C3F;
}
.legal-header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.legal-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}
.legal-logo:hover { text-decoration: none; }
.legal-header-sub {
  color: #A9D9C3;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Hero strip ---------- */
.legal-hero {
  background-color: #EFEDE6;
  border-bottom: 1px solid #E3E0D6;
  text-align: center;
  padding: 56px 24px 40px;
}
.legal-hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 800;
  color: #122B22;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.legal-updated {
  color: #5B5950;
  font-size: 0.95rem;
}

/* ---------- Content container ---------- */
.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ---------- Table of contents ---------- */
.toc {
  background-color: #FFFFFF;
  border: 1px solid #E3E0D6;
  border-left: 4px solid #0E7A54;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 48px;
}
.toc h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #122B22;
  margin-bottom: 12px;
}
.toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.toc a {
  color: #0E7A54;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Sections ---------- */
.legal-content section {
  margin-bottom: 44px;
}
.legal-content section h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #122B22;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #E3E0D6;
}
.legal-content section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0A5C3F;
  margin: 20px 0 8px;
}
.legal-content section p {
  color: #3E3D38;
  margin-bottom: 14px;
}
.legal-content section strong {
  color: #122B22;
  font-weight: 700;
}

/* ---------- Back link ---------- */
.legal-back {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid #E3E0D6;
}
.legal-back a {
  display: inline-block;
  background-color: #0E7A54;
  color: #FFFFFF;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
}
.legal-back a:hover {
  background-color: #0A5C3F;
  text-decoration: none;
}

/* ---------- Footer ---------- */
.legal-footer {
  background-color: #122B22;
  color: #C6D6CD;
}
.legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 28px 24px;
  text-align: center;
}
.legal-footer-inner p { margin-bottom: 8px; }
.legal-footer a { color: #A9D9C3; }
.legal-footer a:hover { color: #FFFFFF; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .toc ol { grid-template-columns: 1fr; }
  .legal-header-inner { flex-direction: column; align-items: flex-start; }
}
