.legal-link {
  background: none;
  border: 0;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  font: inherit;
  font-size: .85rem;
  padding: 0;
  transition: color .3s;
}

.legal-link:hover {
  color: rgba(255,255,255,.7);
}

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

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
}

.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 28, 28, .78);
  backdrop-filter: blur(10px);
}

.legal-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: min(86vh, 920px);
  margin: 7vh auto;
  background: #fff;
  color: #003d3d;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.legal-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(0, 61, 61, .12);
}

.legal-modal-header h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.legal-modal-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 61, 61, .08);
  color: #003d3d;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.legal-modal-content {
  padding: 24px;
  max-height: calc(86vh - 96px);
  overflow: auto;
}

.legal-modal-content section + section {
  margin-top: 22px;
}

.legal-modal-content h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.legal-modal-content p {
  margin: 0 0 12px;
  color: rgba(0, 61, 61, .88);
  line-height: 1.7;
}

.legal-modal-content ul {
  margin: 0;
  padding-left: 20px;
}

.legal-modal-content li {
  margin-bottom: 8px;
  color: rgba(0, 61, 61, .88);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .legal-modal-dialog {
    width: calc(100vw - 20px);
    margin: 10px auto;
    max-height: calc(100vh - 20px);
  }

  .legal-modal-header,
  .legal-modal-content {
    padding: 18px;
  }

  .legal-modal-content {
    max-height: calc(100vh - 108px);
  }
}
