:where(section[id], aside[id], form[id]) {
  scroll-margin-top: 104px;
}

@media (max-width: 760px) {
  :where(section[id], aside[id], form[id]) {
    scroll-margin-top: 145px;
  }
}

.privacy-consent-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 10px 0 12px;
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.privacy-consent-copy {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.privacy-consent-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: #ff712b;
}

.privacy-consent-field a,
.privacy-consent-popup a {
  color: #1677e8;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.privacy-consent-field input[aria-invalid="true"] {
  outline: 2px solid #d84b27;
  outline-offset: 2px;
}

.field-error-message {
  display: block;
  margin: 5px 0 0;
  color: #c74425;
  font-size: 12px;
  line-height: 1.35;
}

input.field-error,
textarea.field-error,
select.field-error {
  border-color: #d84b27 !important;
  box-shadow: 0 0 0 3px rgba(216, 75, 39, .12) !important;
}

.privacy-consent-popup {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  padding: 18px 20px 20px;
  border: 1px solid rgba(22, 37, 58, .08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(17, 27, 45, .20);
  color: #24364f;
  font-size: 14px;
  line-height: 1.5;
}

.privacy-consent-popup__text {
  margin: 0 0 16px;
}

.privacy-consent-popup__button {
  min-width: 150px;
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  background: #ff712b;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.privacy-consent-popup__button:hover {
  background: #ed5e1d;
}

.privacy-consent-popup__button:focus-visible,
.privacy-consent-popup a:focus-visible,
.privacy-consent-field a:focus-visible {
  outline: 3px solid rgba(255, 113, 43, .35);
  outline-offset: 3px;
}

.legal-page {
  min-height: 100vh;
  background: #f4f7fb;
  color: #14253a;
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.legal-page a {
  color: inherit;
}

.legal-main {
  padding: 32px 0 56px;
}

.legal-card {
  width: min(calc(100% - 48px), 1040px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(22, 37, 58, .08);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 45px rgba(17, 27, 45, .08);
}

.legal-card h1,
.legal-card h2,
.legal-card h3 {
  color: #082f63;
  font-family: "Manrope", sans-serif;
  letter-spacing: -.035em;
}

.legal-card h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.legal-card h2 {
  margin: 30px 0 10px;
  font-size: 25px;
  line-height: 1.15;
}

.legal-card h3 {
  margin: 22px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.legal-card p {
  margin: 0 0 12px;
}

.legal-card ul,
.legal-card ol {
  margin: 0 0 14px;
  padding-left: 24px;
}

.legal-card li + li {
  margin-top: 6px;
}

.legal-meta {
  margin: 0 0 24px;
  color: #5f728b;
}

.legal-requisites {
  margin: 18px 0 24px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #f5f8fc;
}

.legal-requisites p {
  margin: 0 0 6px;
}

.legal-requisites p:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .privacy-consent-popup {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    max-height: min(28dvh, 170px);
    overflow-y: auto;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.35;
  }

  .privacy-consent-popup__text {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
  }

  .privacy-consent-popup__button {
    flex: 0 0 96px;
    min-width: 96px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .legal-card {
    width: calc(100% - 24px);
    padding: 24px 18px;
    border-radius: 20px;
  }
}
