.legal-agreements {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  background: #f3f3f3;
  border-radius: 8px;
}

.legal-agreements__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.45;
  color: #333;
  cursor: pointer;
}

.legal-agreements__item input {
  flex-shrink: 0;
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #111;
}

.legal-agreements__item a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-agreements__item a:hover {
  color: #000;
}

.quiz__form .legal-agreements {
  margin-top: 12px;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.legal-modal[hidden] {
  display: none;
}

.legal-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.legal-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px 28px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  outline: none;
}

.legal-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #111;
  cursor: pointer;
  border-radius: 8px;
}

.legal-modal__close:hover {
  background: #f0f0f0;
}

.legal-modal__title {
  margin: 0 40px 16px 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.legal-modal__body {
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.legal-modal__body h1,
.legal-modal__body h2,
.legal-modal__body h3 {
  margin: 1.2em 0 0.5em;
  font-size: 1.1em;
  color: #111;
}

.legal-modal__body p {
  margin: 0 0 0.75em;
}

.legal-modal__body ul,
.legal-modal__body ol {
  margin: 0 0 0.75em;
  padding-left: 1.25em;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* только вертикальные отступы — иначе shorthand padding сбрасывает padding-left/right у .container */
  padding-block: clamp(16px, 3vw, 24px);
}

.cookie-banner__text {
  flex: 1 1 280px;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
}

.cookie-banner__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}

.cookie-banner__btn--primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.cookie-banner__btn--primary:hover {
  background: #000;
}

.cookie-banner__btn--secondary {
  background: #fff;
  color: #111;
  border-color: #111;
}

.cookie-banner__btn--secondary:hover {
  background: #f5f5f5;
}

.site-footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: flex-end;
}

.site-footer__legal-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__legal-link:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-banner__btn {
    flex: 1;
  }

  .site-footer__legal-list {
    justify-content: flex-start;
  }
}
