/* ===== LEGAL PAGE ===== */

.legal-section {
  padding: 24px 0 60px;
}

.legal-layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Main Body */
.legal-body {
  max-width: 100%;
}

.legal-body h1 {
  font-size: 42px;
  font-weight: 600;
  line-height: 52px;
  color: var(--main);
  margin-bottom: 24px;
}

/* Content from the_content() */
.legal-content h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 32px;
  color: var(--main);
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  font-size: 16px;
  line-height: 24px;
  color: var(--grey-9);
  margin-bottom: 12px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal-content li {
  font-size: 16px;
  line-height: 24px;
  color: var(--grey-9);
  margin-bottom: 4px;
}

/* TOC Sidebar — hidden on mobile */
.legal-toc {
  display: none;
}

.legal-toc-inner {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.legal-toc-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 220px;
}

.legal-toc-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 16px;
  line-height: 24px;
  color: var(--grey-7);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-toc-item .toc-number {
  flex-shrink: 0;
  display: none;
}

.legal-toc-item.active {
  font-weight: 500;
  color: var(--main);
}

/* TOC Track & Indicator */
.legal-toc-track {
  width: 3px;
  background: var(--grey-2);
  border-radius: 2px;
  position: relative;
  flex-shrink: 0;
}

.legal-toc-indicator {
  width: 3px;
  height: 40px;
  background: var(--main);
  border-radius: 2px;
  position: absolute;
  top: 0;
  left: 0;
  transition: top 0.3s ease;
}

/* ===== LEGAL PAGE DESKTOP ===== */
@media (min-width: 1024px) {
  .legal-section {
    padding: 24px 0 84px;
  }

  .legal-layout {
    flex-direction: row;
    justify-content: space-between;
    gap: 48px;
  }

  .legal-body {
    width: 800px;
    flex-shrink: 0;
  }

  .legal-body h1 {
    font-size: 64px;
    line-height: 76px;
  }

  .legal-content h2 {
    font-size: 32px;
    line-height: 42px;
    margin-top: 40px;
  }

  .legal-content p {
    font-size: 18px;
    line-height: 28px;
  }

  .legal-content li {
    font-size: 18px;
    line-height: 28px;
  }

  /* TOC Sidebar */
  .legal-toc {
    display: block;
    position: sticky;
    top: 110px;
    align-self: flex-start;
    padding-top: 40px;
  }
}