/* ==========================================================================
   Fork Yeah! — Legal Pages (Privacy Policy, Terms of Service)
   ========================================================================== */

.legal-page {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-4xl);
  min-height: 100vh;
}

/* --- Header --- */
.legal-header {
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-xl);
  border-bottom: 2px solid var(--divider);
}

.legal-header__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  color: var(--brown);
  margin-bottom: var(--space-sm);
}

.legal-header__meta {
  font-size: var(--text-sm);
  color: var(--brown-muted);
}

@media (min-width: 768px) {
  .legal-header__title {
    font-size: var(--text-4xl);
  }
}

/* --- Layout (TOC + Content) --- */
.legal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .legal-layout {
    grid-template-columns: 200px 1fr;
    gap: var(--space-3xl);
  }
}

/* --- Table of Contents --- */
.legal-toc {
  margin-bottom: var(--space-xl);
}

.legal-toc__title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: var(--space-md);
}

.legal-toc__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: none;
  counter-reset: toc;
}

.legal-toc__list li {
  counter-increment: toc;
}

.legal-toc__list a {
  display: block;
  padding: 6px 0;
  font-size: var(--text-sm);
  color: var(--brown-muted);
  transition: all var(--duration-fast);
  border-left: 2px solid transparent;
  padding-left: var(--space-md);
}

.legal-toc__list a:hover {
  color: var(--orange);
  border-left-color: var(--orange);
  transform: translateX(2px);
}

@media (min-width: 768px) {
  .legal-toc {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-xl));
    align-self: start;
  }
}

/* --- Content --- */
.legal-content {
  min-width: 0;
}

.legal-section {
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--divider);
}

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

.legal-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--brown);
  margin-bottom: var(--space-lg);
  padding-left: var(--space-md);
  border-left: 4px solid var(--orange);
}

.legal-section h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--brown);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.legal-section p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--brown-light);
  margin-bottom: var(--space-md);
}

.legal-section ul,
.legal-section ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.legal-section li {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--brown-light);
  margin-bottom: var(--space-xs);
  list-style: disc;
}

/* --- Placeholder Text (needs attorney review) --- */
.placeholder-text {
  font-style: italic;
  color: var(--brown-muted);
  background: var(--orange-tint);
  padding: var(--space-md) var(--space-lg);
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-lg);
  line-height: var(--leading-relaxed);
  position: relative;
}

.placeholder-text::before {
  content: 'Needs review';
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  background: white;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-sm);
  position: relative;
  top: -2px;
}

.placeholder-inline {
  color: var(--orange);
  font-weight: var(--weight-semibold);
  background: var(--orange-tint);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}
