/* Use a single header clearance for links and targeted headings. */
html {
  scroll-padding-block-start: calc(var(--header-height, 90px) + 12px);
  scrollbar-gutter: stable;
}

main > section[id],
main h2[id],
main h3[id] {
  scroll-margin-block-start: 0;
}

.motion-ready .reveal:focus-within {
  opacity: 1;
  transition: none;
}

@media (prefers-reduced-motion: no-preference) {
  #navigation > a.current::after {
    background: var(--water);
  }

  [dir='rtl'] #navigation > a::after {
    transform-origin: right center;
  }

  body.section-waterline::after {
    content: '';
    position: fixed;
    z-index: 74;
    inset: -64px 0;
    border-radius: 54% 50% 44% 58% / 42px 34px 44px 38px;
    background:
      radial-gradient(ellipse at 28% 0%, rgb(76 146 169 / 40%), transparent 46%),
      radial-gradient(ellipse at 74% 100%, rgb(47 112 146 / 29%), transparent 44%),
      #0a2630;
    box-shadow: 0 0 0 1px rgb(133 195 216 / 68%), 0 0 28px rgb(99 167 189 / 28%);
    transform: translate3d(0, var(--section-waterline-offset, 105%), 0);
    will-change: transform;
    pointer-events: none;
  }

  .motion-ready .waterline-destination .reveal.in-view {
    transition-duration: 0s;
  }

  .section-arrived .section-kicker > span:first-child {
    position: relative;
  }

  .section-arrived .section-kicker > span:first-child::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    inset-block-end: -6px;
    inline-size: min(100%, 4.5rem);
    block-size: 2px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: left center;
    animation: section-arrival-rule 800ms var(--ease) both;
    pointer-events: none;
  }

  [dir='rtl'] .section-arrived .section-kicker > span:first-child::after {
    transform-origin: right center;
  }
}

@keyframes section-arrival-rule {
  0% { transform: scaleX(.08); opacity: 0; }
  42% { transform: scaleX(1); opacity: 1; }
  62% { opacity: 1; }
  100% { opacity: 0; }
}

.contact-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-block-start: 17px;
}

.contact-address .contact-email {
  margin-block-start: 0;
}

.copy-email {
  min-block-size: 44px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--water);
  font: inherit;
  font-size: .86rem;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.copy-email:is(:hover, :focus-visible, [data-copied]) {
  color: var(--shell);
  border-color: var(--water);
  background: rgb(131 198 235 / 8%);
}

.copy-email[hidden] {
  display: none;
}

.copy-email-status:not([data-needs-copy]) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.copy-email-status[data-needs-copy] {
  flex-basis: 100%;
  color: var(--muted);
  font-size: .86rem;
}

@media (max-width: 760px) {
  .evidence-tabs button {
    min-inline-size: 44px;
  }

  .geo-region {
    min-inline-size: 44px;
  }
}

@media print {
  .copy-email, .copy-email-status { display: none !important; }
}
