:is(.contact-copy-button, .header-cv-link) {
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  font: 600 .875rem/1.2 var(--sans, Arial, sans-serif);
  white-space: nowrap;
  cursor: pointer;
}

.contact-copy-content {
  display: grid;
  grid-template-columns: 16px auto;
  align-items: center;
  gap: 7px;
}

.contact-copy-content > svg {
  inline-size: 16px;
  block-size: 16px;
  fill: none;
}

.contact-copy-content > span {
  grid-area: 1 / 2;
  text-align: start;
}

.contact-copy-done,
.contact-copy-check,
.contact-copy-button[data-copied] :is(.contact-copy-label, .contact-copy-short, .contact-copy-icon) {
  visibility: hidden;
}

.contact-copy-button[data-copied] :is(.contact-copy-done, .contact-copy-check) {
  visibility: inherit;
}

body.sober-home #contact .sober-contact-actions {
  align-items: center;
  gap: 4px 12px;
}

body.sober-home #contact .sober-contact-actions > a {
  overflow-wrap: anywhere;
}

body.sober-home #contact .contact-copy-inline:not([hidden]) {
  display: inline-grid;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / .58);
  border-radius: 12px;
  background: rgb(255 255 255 / .09);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

body.sober-home #contact .contact-copy-inline:is(:hover, [data-copied]) {
  background: rgb(255 255 255 / .17);
}

/* The contextual action shares the project navigation space. */
.header-contact-slot {
  display: contents;
}

:is(.header-contact-copy, .header-cv-link),
.header-contact-slot .contact-copy-short,
.header-contact-copy .contact-copy-done-short {
  display: none;
}

body.sober-home .site-header[data-header-dock] .header-contact-slot {
  position: relative;
  min-inline-size: 0;
}

body.sober-home .site-header[data-header-dock] :is(.header-contact-copy, .header-cv-link):not([hidden]) {
  display: inline-grid;
  container-type: inline-size;
  padding: 0 7px;
  border: 0;
  border-radius: 13px;
  color: var(--nav-ink, #172338);
  text-decoration: none;
  background: color-mix(in srgb, var(--nav-accent, #214497) 6%, transparent);
  font-size: 13px;
}

body.sober-home .site-header[data-header-dock] :is(.header-contact-copy, .header-cv-link):is(:hover, [data-copied]) {
  background: color-mix(in srgb, var(--nav-accent, #214497) 12%, transparent);
}

:is(.header-contact-copy, .header-cv-link):focus-visible {
  outline: 2px solid var(--nav-accent, #214497);
  outline-offset: -2px;
}

body.sober-home:has(.site-header[data-header-dock="contact"]) #contact .contact-copy-inline:not(:focus) {
  display: none;
}

@media (min-width: 901px) and (min-height: 480px) {
  body.sober-home #contact {
    padding-block-start: max(clamp(108px, 8vw, 120px), calc(var(--gn-header-height, 92px) + 50px));
  }

  body.sober-home #contact .contact-copy-inline:not([hidden]):not(:focus) {
    display: none;
  }
}

@media (min-width: 901px) {
  body.sober-home .site-header[data-header-dock] .header-contact-slot {
    display: block;
  }

  body.sober-home .site-header[data-header-dock] :is(.header-contact-copy, .header-cv-link) {
    position: absolute;
    inset: 0;
  }

  body.sober-home .site-header[data-header-dock] .project-switcher {
    visibility: hidden;
  }
}

@media (max-width: 900px) {
  body.sober-home .site-header[data-header-dock] .header-contact-slot {
    display: grid;
    grid-template-columns: minmax(44px, 1fr) 44px;
    gap: 4px;
    inline-size: 100%;
  }

  body.sober-home .site-header[data-header-dock] :is(.header-contact-copy, .header-cv-link) {
    font-size: 12px;
    padding-inline: 4px;
  }

  body.sober-home .site-header[data-header-dock="contact"] .header-contact-copy:not([hidden]) {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 1px;
    font-size: 12px;
    line-height: 1.1;
  }

  .header-contact-copy .contact-copy-content {
    grid-template-columns: 15px minmax(0, max-content);
    justify-content: center;
    gap: 4px;
  }

  .header-contact-copy .contact-copy-content > svg {
    inline-size: 15px;
    block-size: 15px;
  }

  .header-contact-copy :is(.contact-copy-label, .contact-copy-done-full) {
    display: none;
  }

  .header-contact-copy :is(.contact-copy-short, .contact-copy-done-short) {
    display: block;
  }

  @container (max-width: 69px) {
    .header-contact-copy .contact-copy-content {
      grid-template-columns: minmax(0, max-content);
      grid-template-rows: 15px auto;
      justify-items: center;
      gap: 3px;
    }

    .header-contact-copy .contact-copy-content > span {
      grid-area: 2 / 1;
      text-align: center;
    }
  }

  .header-cv-link .contact-copy-label {
    display: none;
  }

  .header-cv-link .contact-copy-short {
    display: block;
  }

  /* The compact menu remains reachable alongside the contextual action. */
  body.home-page.sober-home .site-header[data-header-material][data-header-dock] .project-switcher > summary {
    grid-template-columns: 1fr;
    padding-inline: 0;
    justify-items: center;
  }

  body.sober-home .site-header[data-header-material][data-header-dock] .project-switcher > summary > :is(.project-switch-default, .project-switch-identity, .project-switch-chevron) {
    display: none !important;
  }

  body.sober-home .site-header[data-header-dock] .project-switcher > summary > .project-switch-menu-label {
    display: block;
    grid-area: 1 / 1;
  }
}

@container (max-width: 85px) {
  .header-cv-link .contact-copy-label {
    display: none;
  }

  .header-cv-link .contact-copy-short {
    display: block;
  }
}

@media (min-width: 901px) {
  @container (max-width: 120px) {
    .header-contact-copy .contact-copy-content {
      grid-template-columns: 18px;
      gap: 0;
    }

    .header-contact-copy .contact-copy-content > svg {
      inline-size: 18px;
      block-size: 18px;
    }

    .header-contact-copy .contact-copy-content > span {
      display: none;
    }
  }
}

@container (max-width: 59px) {
  .header-cv-link .contact-copy-content {
    grid-template-columns: 14px auto;
    gap: 3px;
  }

  .header-cv-link .contact-copy-content > svg {
    inline-size: 14px;
  }
}

@media (forced-colors: active) {
  :is(.header-contact-copy, .header-cv-link):not([hidden]),
  body.sober-home #contact .contact-copy-inline:not([hidden]) {
    color: ButtonText;
    border-color: ButtonText;
    background: ButtonFace;
  }

  :is(.header-contact-copy, .header-cv-link):focus-visible {
    outline-color: Highlight;
  }
}

.sober-about .about-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin-block-start: .75rem;
}

.sober-about .about-resource-links .text-link {
  margin-block-start: 0;
  min-block-size: 44px;
}

body.sober-home:has(.site-header[data-header-dock="cv"]) #parcours .about-cv-link:not(:focus) {
  display: none;
}
