.legal-update-notice h5 {
  color: #1f2d3d;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.legal-consent-card {
  --legal-ink: #1f2d3d;
  --legal-muted: #657483;
  --legal-line: #dce4eb;
  --legal-surface: #f7f9fb;
  --legal-blue: #1677ff;
  --legal-teal: #0f9688;
}

.legal-consent-heading {
  color: var(--legal-ink);
  float: none;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}

.legal-consent-help {
  color: var(--legal-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0.35rem 0 0;
}

.legal-document-list {
  border: 1px solid var(--legal-line);
  border-radius: 0.35rem;
  overflow: hidden;
}

.legal-document {
  align-items: start;
  background: #fff;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  padding: 1.15rem 1.2rem;
  position: relative;
}

.legal-document + .legal-document {
  border-top: 1px solid var(--legal-line);
}

.legal-document::before {
  background: var(--legal-blue);
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 3px;
}

.legal-document--privacy::before {
  background: var(--legal-teal);
}

.legal-document:hover {
  background: var(--legal-surface);
}

.legal-document-checkbox {
  accent-color: var(--legal-blue);
  cursor: pointer;
  height: 1.15rem;
  margin: 0.22rem 0 0;
  width: 1.15rem;
}

.legal-document--privacy .legal-document-checkbox {
  accent-color: var(--legal-teal);
}

.legal-document-checkbox:focus-visible {
  outline: 3px solid rgba(22, 119, 255, 0.25);
  outline-offset: 2px;
}

.legal-document-body {
  min-width: 0;
}

.legal-document-label {
  align-items: baseline;
  color: var(--legal-ink);
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  font-size: 1rem;
  gap: 0.35rem;
  line-height: 1.55;
  margin: 0;
}

.legal-document-prefix {
  font-weight: 600;
}

.legal-document-name {
  color: var(--legal-blue);
  font-weight: 700;
}

.legal-document--privacy .legal-document-name,
.legal-document--privacy .legal-document-link {
  color: var(--legal-teal);
}

.legal-document-summary {
  color: var(--legal-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0.35rem 0 0.4rem;
}

.legal-document-link {
  color: var(--legal-blue);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 600;
  gap: 0.25rem;
  text-decoration: none;
}

.legal-document-link:hover,
.legal-document-link:focus {
  text-decoration: underline;
}

.legal-document-version {
  align-self: start;
  background: #eef4fb;
  border: 1px solid #d5e2ef;
  border-radius: 999px;
  color: #526475;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.28rem 0.62rem;
  white-space: nowrap;
}

.legal-consent-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 575.98px) {
  .legal-document {
    gap: 0.7rem;
    grid-template-columns: 1.2rem minmax(0, 1fr);
    padding: 1rem;
  }

  .legal-document-version {
    grid-column: 2;
    justify-self: start;
  }

  .legal-consent-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
  }

  .legal-consent-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-document {
    scroll-behavior: auto;
  }
}
