/* =========================================================
   legal.css — Shared styles for all legal pages
   (Privacy Policy, Terms of Use, EULA, DPA)
   ========================================================= */

/* ----- Hero / Header ----- */
.legal-hero {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 48px;
  background: #ffffff;
  border-bottom: 1px solid #E5E7EB;
}

.legal-hero .legal-breadcrumb {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.legal-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

.legal-hero .legal-meta {
  font-size: 0.875rem;
  color: var(--color-gray);
  margin-top: 8px;
}

/* ----- Body / Layout ----- */
.legal-body {
  padding: 64px 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}

/* ----- Sidebar TOC ----- */
.legal-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.legal-toc h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gray);
  margin-bottom: 16px;
  margin-top: 0;
}

.legal-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-toc li {
  margin: 0;
}

.legal-toc a {
  display: block;
  font-size: 0.875rem;
  color: var(--color-gray);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.4;
}

.legal-toc a:hover {
  background: #F3F4F6;
  color: var(--color-dark);
}

.legal-toc a.active {
  background: #EFF6FF;
  color: var(--color-primary);
  font-weight: 500;
}

/* ----- Prose / Content Area ----- */
.legal-content {
  min-width: 0; /* prevent grid blowout */
}

/* Intro paragraph */
.legal-intro {
  font-size: 1.0625rem;
  color: var(--color-gray);
  line-height: 1.85;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #E5E7EB;
}

/* Sections */
.legal-section {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.legal-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 8px;
  border-top: 1px solid #E5E7EB;
}

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

.legal-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-top: 28px;
  margin-bottom: 12px;
}

.legal-content p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 16px;
}

.legal-content ul {
  display: block;
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 16px;
}

.legal-content ol {
  display: block;
  list-style: decimal;
  margin-left: 20px;
  margin-bottom: 16px;
}

.legal-content li {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 6px;
}

.legal-content strong {
  font-weight: 600;
  color: var(--color-dark);
}

.legal-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.legal-content a:hover {
  opacity: 0.8;
}

/* ----- Annex / Table styles ----- */
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9375rem;
}

.legal-content table th,
.legal-content table td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid #E5E7EB;
  line-height: 1.6;
  color: #374151;
}

.legal-content table th {
  background: #F9FAFB;
  font-weight: 600;
  color: var(--color-dark);
}

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

  .legal-toc {
    position: static;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px 20px 16px;
  }

  .legal-toc ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .legal-toc a {
    white-space: nowrap;
  }

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

@media (max-width: 600px) {
  .legal-hero h1 {
    font-size: 1.5rem;
  }

  .legal-body {
    padding: 40px 0;
  }

  .legal-layout {
    gap: 24px;
  }

  .legal-toc ul {
    flex-direction: column;
  }
}
