/* Legal Pages Styles (Privacy & Terms) */
.legal-page {
  padding: 8rem 1.5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Header inside content column */
.legal-header {
  margin-bottom: 2.5rem;
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

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

/* Layout with sidebar */
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Sticky sidebar */
.legal-sidebar {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.legal-toc {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.legal-toc-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.legal-toc-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all 0.2s;
  line-height: 1.4;
}

.legal-toc-link:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.legal-toc-link.active {
  color: var(--orchid);
  border-left-color: var(--orchid);
  background: rgba(217, 70, 239, 0.06);
}

/* Mobile TOC - not used */
.legal-toc-mobile {
  display: none;
}

/* Content */
.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
  scroll-margin-top: 6rem;
}

.legal-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.legal-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-content ul {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content a {
  color: var(--orchid);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

/* Cookie table */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cookie-table th {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--surface);
}

.cookie-table td {
  color: var(--text-secondary);
}

.cookie-table code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--orchid);
}

.legal-content code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--orchid);
}

/* Responsive */
@media (max-width: 767px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legal-sidebar {
    display: none;
  }
}

@media (max-width: 639px) {
  .legal-page {
    padding: 6rem 1rem 3rem;
  }

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

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

  .legal-content h3 {
    font-size: 1.1rem;
  }
}
