/* Legal links and reading panels only; the existing site styles are unchanged. */
.contact footer {
  position: relative;
  padding-bottom: 68px;
}
.footer-legal-links {
  position: absolute;
  inset-inline: 12px;
  bottom: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: .75rem;
  line-height: 1.5;
  color: var(--muted);
}
.footer-legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal-links a:hover { color: var(--ink); }
.legal-dialog {
  width: min(94vw, 880px);
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
}
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog .diagram-dialog-header { flex-shrink: 0; }
.legal-copy {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(90vh - 112px);
  max-height: calc(90dvh - 112px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 8px 4px 0;
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.legal-copy:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: -2px;
}
.legal-copy h3 {
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: normal;
  margin: 28px 0 12px;
}
.legal-copy h3:first-child { margin-top: 0; }
.legal-copy ul { margin: 20px 0; padding-left: 24px; }
.legal-copy li { padding-bottom: 6px; }
.legal-copy a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 820px) {
  .contact footer { padding-bottom: 58px; }
  .legal-dialog { padding: 16px; }
  .legal-copy {
    max-height: calc(90vh - 96px);
    max-height: calc(90dvh - 96px);
  }
}
@media (max-width: 540px) {
  .contact footer { padding-bottom: 56px; }
  .footer-legal-links { gap: 8px 20px; }
}

.legal-dialog-open { overflow: hidden; }
