/* ===== GARB DIGITAL — LEGAL STYLESHEET ===== */
/* Loaded by privacy.html and terms-of-service.html */
/* Palette matches main: Ebony #0F1A24 / Verdigris #2E7D5F / Bronze #D4853B / Ivory #F5F3EE / Parchment #F9F7F3 */

:root {
  --ebony: #0F1A24;
  --verdigris: #2E7D5F;
  --bronze: #D4853B;
  --ivory: #F5F3EE;
  --parchment: #F9F7F3;
  --text-dark: #1A1D22;
  --text-medium: #4A5058;
  --border-soft: #D9D6CF;
  --white: #FFFFFF;
  --transition: 0.25s ease;
  --max-width: 900px;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-dark);
  background: var(--ivory);
  padding-top: 70px;
}

a {
  color: var(--verdigris);
}

a:hover {
  color: #1E5C44;
}

/* ===== PAGE HEADER ===== */
.legal-header {
  text-align: center;
  padding: 2.5rem 2rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border-soft);
}

.legal-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ebony);
  margin-bottom: 0.5rem;
}

.legal-header .last-updated {
  font-size: 0.85rem;
  color: var(--text-medium);
}

.legal-header .back-home {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--verdigris);
}

.legal-header .back-home:hover {
  color: #1E5C44;
}

/* ===== TABLE OF CONTENTS ===== */
.toc {
  max-width: var(--max-width);
  margin: 2rem auto 2.5rem;
  padding: 0 2rem;
}

.toc h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ebony);
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.toc ol {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 0.4rem;
  break-inside: avoid;
}

.toc ol li a {
  font-size: 0.9rem;
  color: var(--text-medium);
  text-decoration: none;
  transition: color var(--transition);
  display: inline-block;
  padding: 0.15rem 0;
}

.toc ol li a::before {
  content: counter(toc-counter) ". ";
  font-weight: 700;
  color: var(--verdigris);
}

.toc ol li a:hover {
  color: var(--verdigris);
}

/* ===== MAIN CONTENT ===== */
.legal-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.legal-content h2 {
  font-size: 1.4rem;
  color: var(--ebony);
  margin: 2.5rem 0 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  scroll-margin-top: 90px;
}

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

.legal-content p {
  margin-bottom: 0.9rem;
  color: var(--text-dark);
}

.legal-content ul,
.legal-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content ul li,
.legal-content ol li {
  margin-bottom: 0.4rem;
}

.legal-content strong {
  color: var(--ebony);
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--verdigris);
  color: var(--ivory);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), background var(--transition);
  z-index: 900;
  box-shadow: 0 2px 12px rgba(15, 26, 36, 0.25);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #1E5C44;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .toc ol {
    columns: 1;
  }

  .legal-header h1 {
    font-size: 1.6rem;
  }

  .legal-content {
    padding: 0 1.25rem 2rem;
  }

  .legal-content h2 {
    font-size: 1.2rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
  }
}
