/* Базовая защита от горизонтального скролла */
html, body { 
  overflow-x: hidden; 
  max-width: 100vw; 
}

/* Адаптация к теме сайта */
.bg-light {
  background-color: var(--dark-lighter) !important;
  color: var(--text-primary) !important;
}

/* Типографика для юридического документа */
.terms-document {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.terms-document h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.terms-document h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.terms-document h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.terms-document h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.terms-document p {
  margin-bottom: 1rem;
}

.terms-document ul,
.terms-document ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.terms-document li {
  margin-bottom: 0.5rem;
}

.terms-document strong {
  color: var(--text-primary);
  font-weight: 600;
}

.effective-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-style: italic;
}

.section-number {
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.5rem;
}

.highlight-box {
  background: var(--dark-card);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.table-responsive {
  margin: 1.5rem 0;
}

.table {
  color: var(--text-primary);
  border-color: var(--border-color);
}

.table-dark {
  --bs-table-bg: var(--dark-card);
  --bs-table-striped-bg: var(--dark-lighter);
  --bs-table-border-color: var(--border-color);
}

.table thead {
  background: var(--dark-card);
  border-bottom: 2px solid var(--border-color);
}

@media (max-width: 768px) {
  .terms-document h1 {
    font-size: 2rem;
  }
  
  .terms-document h2 {
    font-size: 1.5rem;
  }
}