/* Shared responsive safeguards and mobile navigation for all NexisTech pages. */
:root {
  color-scheme: light;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* Make the existing desktop policy dropdown usable with a keyboard. */
header nav .group:focus-within > div {
  display: block;
}

.mobile-menu {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  left: 0;
  z-index: 50;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
  border-bottom: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 28px -18px rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__links {
  display: grid;
  gap: 0.25rem;
}

.mobile-menu__link,
.mobile-menu__policy-toggle,
.mobile-menu__cta {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.mobile-menu__link,
.mobile-menu__policy-toggle {
  width: 100%;
  color: #334155;
  background: transparent;
  border: 0;
  text-align: left;
}

.mobile-menu__link:hover,
.mobile-menu__policy-toggle:hover {
  color: #1d4ed8;
  background: #f1f5f9;
}

.mobile-menu__link[aria-current="page"] {
  color: #1d4ed8;
  background: #eff6ff;
}

.mobile-menu__policy-toggle {
  justify-content: space-between;
  cursor: pointer;
}

.mobile-menu__chevron {
  width: 1rem;
  height: 1rem;
  transition: transform 160ms ease;
}

.mobile-menu__policy-toggle[aria-expanded="true"] .mobile-menu__chevron {
  transform: rotate(180deg);
}

.mobile-menu__policies {
  display: grid;
  gap: 0.25rem;
  margin: 0.125rem 0 0.5rem;
  padding: 0.25rem 0 0.25rem 0.75rem;
  border-left: 2px solid #bfdbfe;
}

.mobile-menu__policies[hidden] {
  display: none;
}

.mobile-menu__policies a {
  display: block;
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.mobile-menu__policies a:hover {
  color: #1d4ed8;
  background: #f8fafc;
}

.mobile-menu__cta {
  justify-content: center;
  margin-top: 0.75rem;
  color: #ffffff;
  background: #0f172a;
}

.mobile-menu__cta:hover {
  background: #2563eb;
}

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  color: #0f172a;
  background: #ffffff;
  cursor: pointer;
}

.mobile-menu-toggle:hover {
  color: #1d4ed8;
  border-color: #93c5fd;
  background: #eff6ff;
}

.mobile-menu-toggle svg {
  width: 1.375rem;
  height: 1.375rem;
}

/* Avoid clipped long values in the company-record panels. */
dl > div > dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  body > div:first-child > div {
    justify-content: flex-start;
  }

  body > div:first-child > div > div:last-child {
    display: none;
  }

  header > div > div {
    height: 4.5rem;
  }

  header > div > div > a {
    min-width: 0;
  }

  header > div > div > a > div:last-child {
    min-width: 0;
  }

  header > div > div > a > div:last-child > div {
    gap: 0.375rem;
  }

  header > div > div > a > div:last-child > div > span:first-child {
    font-size: 1rem;
  }

  header > div > div > a > div:last-child > div > span:last-child {
    display: none;
  }

  main h1 {
    overflow-wrap: anywhere;
  }

  footer [class*="font-mono"] {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 639px) {
  main > section {
    padding-top: 3.25rem !important;
    padding-bottom: 3.25rem !important;
  }

  main h1 {
    font-size: clamp(1.8rem, 8vw, 2.25rem) !important;
    line-height: 1.15 !important;
  }

  main h2 {
    line-height: 1.2;
  }

  main .rounded-xl,
  main .rounded-2xl {
    border-radius: 0.875rem;
  }

  main .p-8 {
    padding: 1.25rem;
  }

  dl > div {
    flex-direction: column;
    gap: 0.25rem;
  }

  dl > div > dd {
    text-align: left !important;
  }

  footer [class*="font-mono"] > span:nth-child(2) {
    display: none;
  }
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
}

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