html {
  overflow-x: hidden;
}

body {
  overflow-wrap: break-word;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  max-width: 100%;
}

.nav .shell {
  position: relative;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-box {
  display: grid;
  gap: 5px;
  width: 20px;
}

.nav-toggle-box span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu-cta {
  display: none;
}

.nav-toggle:focus-visible,
.nav-links a:focus-visible,
.nav-cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Anchor targets must clear the sticky header. */
:target {
  scroll-margin-top: 104px;
}

@media (max-width: 940px) {
  /* The wide desktop column gap starves the stacked footer columns. */
  .foot .shell.cols {
    column-gap: 40px;
  }

  .nav .shell {
    flex-wrap: nowrap;
    gap: 16px;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    order: 2;
  }

  .nav-cta {
    order: 1;
    margin-left: auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none !important;
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    z-index: 60;
    padding: 16px;
    gap: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(19, 24, 27, 0.14);
  }

  .nav-links.is-open {
    display: flex !important;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  :target {
    scroll-margin-top: 88px;
  }

  :root {
    --gutter: max(18px, 5vw) !important;
  }

  .nav .shell {
    min-height: 68px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav img {
    height: 38px;
  }

  .nav-toggle + .nav-cta {
    display: none;
  }

  .nav-menu-cta {
    display: flex !important;
    margin-top: 12px;
    color: #FFFFFF !important;
    background: var(--ink);
    border-bottom: 0 !important;
    justify-content: center;
    text-align: center;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 2.4rem) !important;
    line-height: 1.08 !important;
  }

  h2 {
    overflow-wrap: anywhere;
  }

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

  .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .actions a,
  .actions button {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .foot .base {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Footer link columns are the densest tap targets on the site. */
  .foot .col-links {
    gap: 0;
  }

  .foot .col-links a {
    display: flex;
    align-items: center;
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-box span {
    transition: none;
  }
}
