/* Юридические страницы MeetMate — читабельность, адаптив, анимации */
:root {
  --legal-bg: #0b0913;
  --legal-surface: #151223;
  --legal-border: rgba(255, 255, 255, 0.1);
  --legal-text: #f4f2fa;
  --legal-muted: rgba(244, 242, 250, 0.72);
  --legal-accent: #e8b4ff;
  --legal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --legal-radius: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--legal-text);
  background: var(--legal-bg);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.wrap {
  min-height: 100vh;
  max-width: min(920px, 100% - 32px);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 32px) clamp(12px, 3vw, 20px) clamp(36px, 8vw, 64px);
}

.card {
  position: relative;
  background: var(--legal-surface);
  border: 1px solid var(--legal-border);
  border-radius: var(--legal-radius);
  padding: clamp(18px, 4vw, 28px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  /* overflow: hidden ломает position: sticky у .top и обрезает хвосты букв у заголовков */
  overflow: visible;
  overflow-wrap: break-word;
  word-wrap: break-word;
  isolation: isolate;
}

.top {
  position: static;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
}

.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--legal-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  padding: 6px 0;
  border: none;
  background: transparent;
  transition: color 0.2s ease;
}

.back:hover {
  color: #fff;
  text-decoration: underline;
}

h1 {
  position: relative;
  z-index: 1;
  margin: 10px 0 16px;
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  font-weight: 800;
  padding-bottom: 0.06em;
  background: linear-gradient(115deg, #fff 0%, #f0e8ff 40%, #ffc8e4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

h2 {
  position: relative;
  z-index: 1;
  margin: 22px 0 10px;
  font-size: clamp(1.02rem, 2.8vw, 1.15rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

p,
li {
  position: relative;
  z-index: 1;
  color: var(--legal-muted);
  line-height: 1.62;
  font-size: clamp(0.9rem, 2.4vw, 1rem);
}

ul {
  margin: 0;
  padding-left: 1.25rem;
}

.card a {
  color: var(--legal-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.card a:hover {
  color: #fff;
}

.legal-ol {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--legal-muted);
  line-height: 1.65;
  font-size: clamp(0.9rem, 2.4vw, 1rem);
}

.legal-ol li {
  margin: 0.4em 0;
}

.note {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

@media (max-width: 520px) {
  .top {
    margin-bottom: 10px;
  }

  .back {
    font-size: 14px;
  }

  .wrap {
    max-width: 100%;
    padding-left: clamp(10px, 3vw, 16px);
    padding-right: clamp(10px, 3vw, 16px);
  }

  .card {
    padding: clamp(14px, 4vw, 22px);
    border-radius: 18px;
  }
}
