.legal-documents-modal {
  width: 540px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 20, 24, 0.22);
  color: #252525;
  overflow: auto;
}

.legal-documents-modal::backdrop {
  background: rgba(20, 20, 24, 0.55);
  backdrop-filter: blur(3px);
}

.legal-documents-modal[open] {
  animation: legal-documents-enter 180ms ease-out;
}

.legal-documents-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 18px;
  border-bottom: 1px solid #e4e4e7;
  background: linear-gradient(135deg, #f4f4f5 0%, #fff 72%);
}

.legal-documents-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #8a2ee6;
  font-size: var(--font-size-micro);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-documents-header h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--font-size-modal-title);
  font-weight: 500;
  line-height: 30px;
}

.legal-documents-close {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #dedee1;
  border-radius: 50%;
  background: #fff;
  color: #444;
  cursor: pointer;
  place-items: center;
}

.legal-documents-close:hover {
  border-color: #cfcfcf;
  background: #f6f6f6;
  color: #222;
}

.legal-documents-close:focus-visible {
  outline: 3px solid rgba(40, 40, 40, 0.18);
  outline-offset: 2px;
}

.legal-documents-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.legal-documents-content {
  padding: 22px 24px 24px;
}

.legal-documents-intro {
  margin: 0 0 18px;
  color: #626262;
  font-family: var(--font-body);
  font-size: var(--font-size-reading);
  font-weight: 400;
  line-height: 26px;
}

.legal-documents-list {
  display: grid;
  gap: 10px;
}

.legal-document-card {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 14px;
  border: 1px solid #e1e1e4;
  border-radius: 12px;
  background: #f8f8f9;
  color: #252525;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.legal-document-card:hover {
  border-color: #cfcfcf;
  box-shadow: 0 8px 22px rgba(28, 28, 28, 0.08);
}

.legal-document-card:focus-visible {
  outline: 3px solid rgba(40, 40, 40, 0.18);
  outline-offset: 2px;
}

.legal-document-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f0f0f0;
  color: #555;
  place-items: center;
}

.legal-document-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.legal-document-copy {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.legal-document-copy strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--font-size-reading);
  font-weight: 500;
  line-height: 24px;
}

.legal-document-arrow {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: #777;
  place-items: center;
}

.legal-document-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@keyframes legal-documents-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  .legal-documents-header {
    padding: 20px 18px 16px;
  }

  .legal-documents-content {
    padding: 18px;
  }

  .legal-document-card {
    gap: 11px;
    min-height: 76px;
    padding: 12px;
  }

  .legal-document-icon {
    width: 38px;
    height: 38px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .legal-documents-modal[open] {
    animation: none;
  }

  .legal-document-card {
    transition: none;
  }
}
