/* Dragonfly v403: shared public mobile, accessibility and rendering safeguards. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
  scroll-padding-top: 6rem;
}

body,
main,
section,
article,
header,
footer,
nav,
div {
  min-width: 0;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

h1,
h2,
h3,
[id] {
  scroll-margin-top: 6rem;
}

:where(button, [role="button"], input, select, textarea) {
  font: inherit;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #d49a00;
  outline-offset: 3px;
}

.table-wrap,
.comparison-table-wrap,
[class*="table-wrap"] {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 5rem;
  }

  body {
    overflow-x: clip;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  :where(button, [role="button"], input[type="button"], input[type="submit"], select, summary) {
    min-height: 44px;
  }

  main,
  .container,
  .wrap,
  [class*="container"],
  [class*="-wrap"] {
    max-width: 100%;
  }

  :where(.grid, [class*="-grid"], [class*="__grid"]) > * {
    min-width: 0;
  }

  table {
    min-width: 640px;
  }

  .nav-links.open,
  .site-nav.open,
  [class*="mobile-menu"].open {
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .welsh-switch,
  .language-switch,
  [class*="language-toggle"] {
    max-width: calc(100vw - 1.5rem);
  }
}

@media (max-width: 480px) {
  .v302-home .v302-wrap {
    width: calc(100% - 2rem) !important;
    max-width: calc(100% - 2rem);
  }

  .v302-home h1 {
    font-size: 2.25rem;
    line-height: 1.02;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal !important;
    width: 100%;
    max-width: 100%;
  }

  .v302-home .v302-kicker {
    letter-spacing: .12em;
  }
}

@media (hover: none) and (pointer: coarse) {
  :where(a, button, summary) {
    -webkit-tap-highlight-color: rgba(212, 154, 0, .22);
  }

  :where(.card, [class*="-card"]):hover {
    transform: none;
  }
}

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

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