/* Progressive safeguards for long-form legacy SANS write-ups.
 * Kept separate so the original document styling remains intact. */
.sans-page :is(h1, h2, h3, h4, h5, h6, [id], a[name]) {
  scroll-margin-top: 1.5rem;
}

.sans-page a {
  overflow-wrap: anywhere;
}

.sans-page a:focus-visible {
  outline: 3px solid #f5c542;
  outline-offset: 3px;
}

.sans-page table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: reduce) {
  .sans-page,
  .sans-page * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .sans-page a:focus-visible {
    outline-color: Highlight;
  }
}

@media print {
  .sans-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .sans-page pre,
  .sans-page table,
  .sans-page img {
    break-inside: avoid;
  }

  .sans-page a {
    color: inherit;
    text-decoration: underline;
  }
}
