/* ============================================================
   CandyInject — Legal pages (privacy + terms)
   Loaded ONLY by privacy.html and terms-of-service.html
   ============================================================ */

.legal-page {
  background-color: #140F0F;
  color: #F7EDEA;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #F7EDEA;
  background-color: #140F0F;
}

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

a:hover {
  color: #FFE4E1;
}

/* ---------- Legal header ---------- */
.legal-header {
  background: linear-gradient(150deg, #2A1A17 0%, #1C1514 60%, #140F0F 100%);
  border-bottom: 1px solid #322523;
  padding: 56px 0 46px;
}

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

.legal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #F7EDEA;
  text-transform: uppercase;
}

.legal-brand .candy-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FF6F61;
  box-shadow: 0 0 10px 0 #FF6F61;
  display: inline-block;
}

.legal-back {
  font-weight: 700;
  font-size: 0.92rem;
  color: #FFE4E1;
  border: 1px solid #FF6F61;
  border-radius: 6px;
  padding: 8px 16px;
  transition: background 0.2s ease, color 0.2s ease;
}

.legal-back:hover {
  background: #FF6F61;
  color: #1A0F0D;
}

.legal-header h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  color: #FFE4E1;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.legal-header .legal-updated {
  color: #CBBBB5;
  font-size: 0.95rem;
}

/* ---------- Content ---------- */
.legal-content {
  padding: 48px 0 80px;
}

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

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

.legal-content .legal-intro {
  font-size: 1.08rem;
  color: #F7EDEA;
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #FF6F61;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 44px 0 16px;
  padding-top: 16px;
  border-top: 1px solid #322523;
}

.legal-content h2:first-of-type {
  border-top: 0;
}

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

.legal-content p {
  color: #CBBBB5;
  margin-bottom: 18px;
}

.legal-content ul,
.legal-content ol {
  color: #CBBBB5;
  margin: 0 0 20px 24px;
}

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

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

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

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

.legal-content .legal-address {
  background: #1C1514;
  border-left: 3px solid #FF6F61;
  border-radius: 8px;
  padding: 20px 22px;
  margin: 22px 0;
  color: #F7EDEA;
  font-weight: 600;
  line-height: 1.8;
}

/* ---------- Table of contents ---------- */
.toc {
  background: #1C1514;
  border: 1px solid #322523;
  border-radius: 12px;
  padding: 26px 28px;
  margin-bottom: 40px;
}

.toc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #F7EDEA;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  margin: 0;
  columns: 2;
  column-gap: 32px;
}

.toc ol li {
  margin-bottom: 10px;
  break-inside: avoid;
}

.toc ol li a {
  color: #CBBBB5;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
}

.toc ol li a::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF6F61;
  margin-right: 10px;
  vertical-align: middle;
}

.toc ol li a:hover {
  color: #FF6F61;
}

/* ---------- Legal footer ---------- */
.legal-footer {
  background: #0E0A0A;
  border-top: 1px solid #322523;
  padding: 40px 0;
}

.legal-footer .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.legal-footer .footer-brand {
  font-weight: 800;
  color: #F7EDEA;
  letter-spacing: 0.04em;
}

.legal-footer .footer-copy {
  color: #A8948E;
  font-size: 0.85rem;
}

.legal-footer .footer-home {
  color: #FF6F61;
  font-weight: 700;
  font-size: 0.92rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .legal-header h1 {
    font-size: 2rem;
  }
  .toc ol {
    columns: 1;
  }
  .legal-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}
