.title-menu {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: auto;
  align-items: start;
  -moz-column-gap: 6px;
       column-gap: 6px;
}

.title-menu__title {
  min-width: 0;
  margin: 0;
  font: inherit;
  overflow-wrap: anywhere;
}

.title-menu__actions {
  display: flex;
  align-items: center;
  /* Inherit the title typography to center the button on its first line. */
  height: 1lh;
}

.title-menu__button {
  position: relative;
  display: inline-flex;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

/* Keep the painted 36px circle separate from the 44px touch target. */
.title-menu__button::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background-color: var(--color-ambient-mint-dark);
  box-shadow: 0 5px 12px rgba(105, 168, 167, 0.32);
  transition: background-color 160ms ease;
}

.title-menu__button:focus-visible::before,
.title-menu__button[aria-expanded="true"]::before,
.title-menu__button:active::before {
  background-color: color-mix(in srgb, var(--color-ambient-mint-dark) 85%, black);
}

@media (hover: hover) {
  .title-menu__button:hover::before {
    background-color: color-mix(in srgb, var(--color-ambient-mint-dark) 85%, black);
  }
}

.title-menu__button .icon {
  position: relative;
  width: 20px;
  height: 20px;
}
