/* Anchor targets clear the sticky header */
[id] {
  scroll-margin-top: 5.5rem;
}

html {
  scroll-behavior: smooth;
}

main:focus,
section:focus {
  outline: none;
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #F2A541;
  outline-offset: 3px;
}

/* Legal modals */
dialog.modal {
  width: calc(100% - 2rem);
  max-width: 44rem;
  max-height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 1.5rem;
  background: #ffffff;
  color: #12303A;
  box-shadow: 0 25px 60px rgba(18, 48, 58, 0.35);
  overflow: hidden;
}

dialog.modal[open] {
  display: flex;
  flex-direction: column;
}

dialog.modal .modal-body {
  overflow-y: auto;
}

dialog.modal::backdrop {
  background: rgba(18, 48, 58, 0.7);
}

body.modal-open {
  overflow: hidden;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hover\:-translate-y-1:hover {
    transform: none !important;
  }
}
